/*
- Input serial
+ Input serial debug
Accensione e spegnimanto di un LED utilizzando un pin come input.
- Schemi del circuito:
+ Schemi del circuito per bottone in pull down:
- http://lab.piffa.net/schemi/button_1_bb.png
- http://lab.piffa.net/schemi/button_1_schem.png
*/
-// Pin 13 has an LED connected on most Arduino boards.
-// give it a name:
-int led = 13;
+int led = 12;
int input = 2;
// the setup routine runs once when you press reset:
void setup() {
- // initialize the digital pin as an output.
pinMode(led, OUTPUT); // Il PIN e' attivato come output
pinMode(input, INPUT); // Il PIN e' attivato come output