X-Git-Url: http://git.piffa.net/web?a=blobdiff_plain;f=basic%2Fbuttons%2Fbutton_1%2Fbutton_1.ino;h=15e9abea8233cdf92f27bdd330d5861fa0d286cd;hb=0807dd2a57e859d7fc246d8eb02692ea4d0da248;hp=5d840ecec927f23789759c5b3e73d7593b246596;hpb=6a0496fdc97f180319df0a3270d1a78920e7ec32;p=sketchbook_andrea diff --git a/basic/buttons/button_1/button_1.ino b/basic/buttons/button_1/button_1.ino index 5d840ec..15e9abe 100644 --- a/basic/buttons/button_1/button_1.ino +++ b/basic/buttons/button_1/button_1.ino @@ -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?