/*Make by Raziff*/
//Diambil dari blynk cloud
#define BLYNK_TEMPLATE_ID "TMPL6NyMejQAm"
#define BLYNK_TEMPLATE_NAME "Input Data"
#define BLYNK_AUTH_TOKEN "-srQjvfl8v154Ft-TLeF2WA0RV3p9A05"
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#define potPin 34
char auth[] = BLYNK_AUTH_TOKEN; //diisi token blynk
char ssid[] = "Wokwi-GUEST";
char pass[] = "";
BlynkTimer timer;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
}
void loop() {
// put your main code here, to run repeatedly:
float potValue = analogRead(potPin);
delay(1000);
Blynk.virtualWrite(V0, potValue); //send data to blynk
//Menampilkan data di serial monitor
Serial.print("Pot Value = ");
Serial.print(potValue);
Serial.println("%");
delay(2000);
Blynk.run();
timer.run();
}