Skip to content

Instantly share code, notes, and snippets.

View ajangrahmat's full-sized avatar
🎯
Focusing

Ajang Rahmat ajangrahmat

🎯
Focusing
View GitHub Profile
<?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;
import paho.mqtt.client as mqtt
import colorama as color
import random
import string
import time
topic_terima = "kbkm/2023/533534343"
topic_kirim = "kbkm/2023/6876766"
def ketika_terhubung(client,userdata,flags,rc):
print("Berhasil Terhubung")
from IPython.display import display, Javascript
from google.colab.output import eval_js
from base64 import b64decode
def take_photo(filename='photo.jpg', quality=0.8):
js = Javascript('''
async function takePhoto(quality) {
const div = document.createElement('div');
const capture = document.createElement('button');
capture.textContent = 'Capture';
#include <WiFi.h>
#include <PubSubClient.h>
const char* ssid = "KelasRobot.com";
const char* password = "k3l4sr0b0t";
const char* mqtt_server = "mqtt.ardumeka.com";
int mqtt_port = 11219;
char* topic1 = "/ajang/ardumeka/j9682121213121dwdq/tes1";
char* topic2 = "/ajang/ardumeka/j9682121213121dwdq/tes2";
WiFiClient espClient;
#include<WiFi.h>
#include <HTTPClient.h>
const char* ssid = "Wokwi-GUEST";
const char* pass = "";
unsigned const long interval = 2000;
unsigned long zero = 0;
void setup(){
Serial.begin(115200);
#include <TinyGPS++.h>
#include <TimeLib.h>
//Jika Menggunakan Software Serial
//#include <SoftwareSerial.h>
//SoftwareSerial serialGps(10, 11);
//Jika Menggunakan Hardware Serial
#define serialGps Serial1
#include <WiFi.h>
const char* ssid = "isi nama wifi";
const char* password = "isi password wifi";
WiFiClient client;
#include <ArduinoHttpClient.h>
char serverAddress[] = "test.kelasrobot.com";
int port = 80;
HttpClient client1 = HttpClient(client, serverAddress, port);
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
const char* ssid = "KelasRobot.com";
const char* password = "k3l4sr0b0t";
String url = "http://192.168.0.102/tes/api/create.php";
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi");
#include <PZEM004Tv30.h>
PZEM004Tv30 pzem(D3, D4);
void setup() {
Serial.begin(115200);
}
void loop() {
float voltage = pzem.voltage();
if ( !isnan(voltage) ) {