From: Andrea Manni Date: Mon, 8 Jun 2015 19:07:26 +0000 (+0200) Subject: errata X-Git-Url: http://git.piffa.net/web?a=commitdiff_plain;h=81ebce145948df1e92dbf936f32a345721fdde58;p=sketchbook_andrea errata --- diff --git a/serial/analog_tx_1/analog_tx_1.ino b/serial/analog_tx_1/analog_tx_1.ino index 9cb5498..1f148fb 100644 --- a/serial/analog_tx_1/analog_tx_1.ino +++ b/serial/analog_tx_1/analog_tx_1.ino @@ -19,12 +19,12 @@ void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); // Il PIN e' attivato come output per DEBUG pinMode(TX, OUTPUT); // Il PIN e' attivato come output - pinMode(input, INPUT); // Il PIN e' attivato come output + pinMode(input, INPUT_PULLUP); // Il PIN e' attivato come output } // the loop routine runs over and over again forever: void loop() { - if (digitalRead(input) == HIGH) { // Verifica se il PIN input e' +5v + if (digitalRead(input) == LOW) { // Verifica se il PIN input e' +5v digitalWrite(led, HIGH); // Debug digitalWrite(TX, HIGH); delay(50); diff --git a/serial/serial_2_tx/serial_2_tx.ino b/serial/serial_2_tx/serial_2_tx.ino index 08a59c0..b70f3eb 100644 --- a/serial/serial_2_tx/serial_2_tx.ino +++ b/serial/serial_2_tx/serial_2_tx.ino @@ -85,5 +85,5 @@ la connessione). 3. Vedere lo sketch sucessivo, basandosi su gli sketch della state machine per il bottne: basic/buttons/button_state_4_state_and_condition/ -*// +*/