From 22c271ef6cad2b4d9b4ebd2e257723eee7dfb55f Mon Sep 17 00:00:00 2001 From: Andrea Manni Date: Tue, 9 Jun 2015 00:55:29 +0200 Subject: [PATCH] 2 errata --- serial/analog_tx_1/analog_tx_1.ino | 4 ++-- serial/serial_2_tx/serial_2_tx.ino | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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/ -*// +*/ -- 2.39.2