Skip to content

Instantly share code, notes, and snippets.

View ajangrahmat's full-sized avatar
🎯
Focusing

Ajang Rahmat ajangrahmat

🎯
Focusing
View GitHub Profile
/*
* 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
from machine import Pin, SPI
from os import uname
class MFRC522:
DEBUG = False
OK = 0
NOTAGERR = 1
ERR = 2
@ajangrahmat
ajangrahmat / main.py
Last active October 2, 2024 10:41
Coding Chat MQTT
import random
import threading
from paho.mqtt import client as mqtt_client
broker = 'broker.emqx.io'
port = 1883
topic = "chat/82812181"
client_id = input("Enter your name: ")
#include <AViShaWiFi.h>
const char* ssid = "WiFiName";
const char* pass = "WiFiPassword";
const char *url = "http://104.237.9.196:5055";
const char *id = "431212121";
AViShaWiFi wifi;
String latitude = "-6.5234367";
<?php
// Set header agar dapat melakukan Server-Sent Events
header('Content-Type: text/event-stream');
header('Cache-Control: no-cache');
include('connection.php');
$query = "SELECT * FROM data";
$result = mysqli_query($conn, $query);
$data = mysqli_fetch_assoc($result);
$data = json_encode($data);
<?php
$phone = '6281000000000';
$text = 'Tes kirim pesan';
$apiKey = '0000000';
$url = 'https://api.callmebot.com/whatsapp.php';
$data = array(
'phone' => $phone,
'text' => $text,
'apikey' => $apiKey
);
#include <SPI.h>
#include <MFRC522.h>
#define SS_PIN 15
#define RST_PIN 2
MFRC522 mfrc522(SS_PIN, RST_PIN);
MFRC522::MIFARE_Key key;
int blockNum = 2;
int intData = 1000000; // Example integer data
byte blockData[16];
byte bufferLen = 18;