#define L1 13
int adcValue;
void setup()
{
Serial.begin(9600);
pinMode(A3, INPUT);
pinMode(L1, OUTPUT);
}
void loop()
{
adcValue=analogRead(A3);
Serial.println("Nilai ADC:");
Serial.println(adcValue);
if(adcValue>=500)
{
digitalWrite(L1, HIGH);
}
else
{
digitalWrite(L1, LOW);
}
delay(2000);
}