/*Make by Raziff*/
//Diambil dari blynk cloud
#define BLYNK_TEMPLATE_ID "TMPL6o8i8MTf2"
#define BLYNK_TEMPLATE_NAME "Lab2"
#define BLYNK_AUTH_TOKEN "WHP_qBi3cfV5thtl3VEf63q68wpaoGDA"
#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();
}