const int pinSensor = A0;
int adcValue = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
}
void loop() {
// put your main code here, to run repeatedly:
// akuisisi nilai ADC sensor LDR
adcValue = analogRead(pinSensor);
// cetak nilai adc ke serial monitor
Serial.println(adcValue);
// jeda akuisisi data
delay(1000); // this speeds up the simulation
}