]> git.piffa.net Git - sketchbook_andrea/blobdiff - basic/buttons/button_1/button_1.ino
Buttons and serial
[sketchbook_andrea] / basic / buttons / button_1 / button_1.ino
index 5d840ecec927f23789759c5b3e73d7593b246596..15e9abea8233cdf92f27bdd330d5861fa0d286cd 100644 (file)
@@ -9,7 +9,7 @@
 // Pin 13 has an LED connected on most Arduino boards.
 // give it a name:
 int led = 13;
-int input = 8;
+int input = 2;
 
 // the setup routine runs once when you press reset:
 void setup() {                
@@ -28,7 +28,13 @@ void loop() {
   }
 }
 
+// Modifiche: 
+// 1. invertire il programma facendo in modo che il led si spenga
+// quando il bottone e' premuto. Consoderare come ottenere lo stesso risultato
+// modificando il circuito.
+// 2. Modificare il programma per far brillare il led cinque volte al secondo
+// quando il bottone e' premuto.
 
-// Funzioni create dall'utente:
+// Domanda: cosa succede se il jumper input non e' collegato ne al +5 ne al gound?