1
Perform code that causes the D1 LED to be erased when it is sent from PC to Arduino an odd decimal numeric digit between {1,3,5,7,9} and accessed if the sent digit is even between {0,2,4,6,8}.
How would I do that?
That’s what I’ve done so far:
#define LED 4
lista[] = ['1','3','5','7','9','0','2','4','6','8']
void setup(){
Serial.begin(9600);
pinMode(pin_led, OUTPUT);
}
void loop(){
if(lista[]=)
if analogRead(lista[n],HIGH){
digitalWrite(LED, LOW);
}
else{
digitalWrite(LED, HIGH);
}
}