valor = digitalRead(Button); // Reads the digital input pin 7 value
digitalWrite(LED, !value); // (Write in the output the read denied value
if(value != int buttonlaststate){
if(value == 1){
counter++;
Serial.print(counter);
Serial.write(10);
Serial.write(13);
}}
int buttonlaststate = value;
}
5. Analog input
It set up the pin 5 as analog input
and sends the read value to your
PC to view it.
17
17