From ad547ed8e5db0d6b17ad1806c34e90944d577940 Mon Sep 17 00:00:00 2001 From: Erik Strand <erik.strand@cba.mit.edu> Date: Sat, 11 May 2019 20:41:53 -0400 Subject: [PATCH] Comment out button code --- strandstring/strandstring.pde | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/strandstring/strandstring.pde b/strandstring/strandstring.pde index c2e348e..592a3d9 100644 --- a/strandstring/strandstring.pde +++ b/strandstring/strandstring.pde @@ -1,16 +1,12 @@ // // -// serial_button.c -// -// 115200 baud FTDI connection that outputs '0' or '1' depending -// on the state of a physical button -// +// 115200 baud FTDI connection // set lfuse to 0x5E for 20 MHz xtal // // Neil Gershenfeld // 12/8/10 // Erik Strand -// 11/26/2018 +// 11/26/2018 and beyond // #include <avr/io.h> #include <util/delay.h> @@ -36,7 +32,7 @@ #define serial_pin_out (1 << PA1) #define led_pin (1 << PB2) -#define button_pin (1 << PA7) +//#define button_pin (1 << PA7) // this is no longer a button #define max_buffer 25 @@ -158,23 +154,14 @@ void setup(void) { DDRB |= led_pin; // Configure button_pin as an input. - DDRA &= ~button_pin; + //DDRA &= ~button_pin; // Activate button_pin's pullup resistor. - PORTA |= button_pin; + //PORTA |= button_pin; } void loop(void) { - if (PINA & button_pin) { - // Turn off the LED. - PORTB &= ~led_pin; - //put_char(&serial_port, serial_pin_out, '0'); - } else { - PORTB |= led_pin; - //put_char(&serial_port, serial_pin_out, '1'); - } - byte i; byte present = 0; byte type_s; @@ -185,7 +172,9 @@ void loop(void) { if (!ds.search(addr)) { put_line(&serial_port, serial_pin_out, "No more addresses."); ds.reset_search(); + PORTB |= led_pin; delay(250); + PORTB &= ~led_pin; return; } -- GitLab