Skip to content

Instantly share code, notes, and snippets.

View ajangrahmat's full-sized avatar
🎯
Focusing

Ajang Rahmat ajangrahmat

🎯
Focusing
View GitHub Profile
#include <SPI.h>
#include <RFID.h>
#define SS_PIN 10
#define RST_PIN 9
RFID rfid(SS_PIN,RST_PIN);
void setup() {
Serial.begin(9600);
SPI.begin();
rfid.init();
}
@ajangrahmat
ajangrahmat / strudle_remix_Music 4 Machines — Clean Version.js
Created June 27, 2026 14:41
strudle_remix_Music 4 Machines — Clean Version.js
// Music 4 Machines — Clean Version
// Struktur: variasi melodi (tease) → melodi utama masuk
let cpm = 94/4;
// ============================================================
// DRUMS
// ============================================================
let drums_light = stack(
import argparse
import threading
import time
from flask import Flask, render_template, Response, jsonify, request
import cv2
import mediapipe as mp
import math
import numpy as np
import base64
import pygame
#include "DHT.h"
#define NUM_BUTTONS 12
// Tombol input
const int buttonPins[NUM_BUTTONS] = {
22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44
};
// Output yang dikontrol (PIN 31 = dummy/tidak dipakai)
import cv2
import numpy as np
# Baca gambar
img = cv2.imread("IMG_20240606_110508.jpg")
# Periksa apakah gambar berhasil dibaca
if img is None:
print("Error: Tidak dapat membaca gambar. Periksa path file.")
import cv2
import face_recognition
import time
from cvzone.FaceDetectionModule import FaceDetector
# Font dan FPS
font = cv2.FONT_HERSHEY_SIMPLEX
jumlahFrame = 0
waktuMulai = time.time()
nilai_fps = 0
/*
* SISTEM MONITORING LINGKUNGAN CANGGIH
* Arduino Uno R3 - Proyek Kompleks dengan 10+ Library
*
* Fitur:
* - Monitoring suhu dan kelembaban DHT22
* - Sensor cahaya LDR
* - Sensor gerak PIR
* - Buzzer alarm
* - LED status
import network
import time
from umqtt.simple import MQTTClient
import esp32
import random # Import the random module
wifi = network.WLAN(network.STA_IF)
wifi.active(True)
wifi.connect('Wokwi-GUEST', '')
# firaindo.py
import time
import cv2
import avisengine
import config
class FiraIndo:
def __init__(self):
self.car = avisengine.Car()
import face_recognition
import cv2
import numpy as np
import argparse
import os
def apply_blur(image, region, light_blur=False):
"""Menerapkan efek blur dengan intensitas berbeda"""
try:
top, right, bottom, left = region