From: Andrea Manni Date: Mon, 8 Jun 2015 22:55:29 +0000 (+0200) Subject: 2 errata X-Git-Url: http://git.piffa.net/web?a=commitdiff_plain;h=22c271ef6cad2b4d9b4ebd2e257723eee7dfb55f;p=sketchbook_andrea 2 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/ -*// +*/