diff options
Diffstat (limited to 'hello.c')
| -rw-r--r-- | hello.c | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -1,13 +1,3 @@ - -/** - * - * Blinking LED ATTiny85 "hello world" - * - * Following the tutorial at: - * http://www.instructables.com/id/Honey-I-Shrunk-the-Arduino-Moving-from-Arduino-t/?ALLSTEPS - * - */ - #include <avr/io.h> // F_CPU frequency to be defined at command line #include <util/delay.h> @@ -20,24 +10,18 @@ int main () { uint8_t high = 0; uint16_t ms = 0; - // setup LED pin for output in port B's direction register DDRB |= (1 << LED); - - // set LED pin LOW PORTB &= ~(1 << LED); while (1) { high = !high; if (high) { - // set LED pin HIGH PORTB |= (1 << LED); } else { - // set LED pin LOW PORTB &= ~(1 << LED); } - // delay for 500 ms for (ms = DELAY_MS; ms > 0; ms -= 10) { _delay_ms(10); } |
