From 11a0da5c63faffd45bde43da2777a9771cfdf5e9 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Mon, 2 May 2011 14:33:05 -0400 Subject: /examples/ cleanups. --- examples/blinky.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'examples/blinky.cpp') diff --git a/examples/blinky.cpp b/examples/blinky.cpp index 209a6e6..91d1a47 100644 --- a/examples/blinky.cpp +++ b/examples/blinky.cpp @@ -2,11 +2,8 @@ #include "wirish.h" -// Use the pin attached to the built-in LED -#define PIN BOARD_LED_PIN - void setup() { - pinMode(PIN, OUTPUT); + pinMode(BOARD_LED_PIN, OUTPUT); } int toggle = 1; @@ -14,7 +11,7 @@ int toggle = 1; void loop() { // You could just use toggleLED() instead, but this illustrates // the use of digitalWrite(): - digitalWrite(PIN, toggle); + digitalWrite(BOARD_LED_PIN, toggle); toggle ^= 1; delay(100); } @@ -28,7 +25,7 @@ __attribute__((constructor)) void premain() { int main(void) { setup(); - while (1) { + while (true) { loop(); } return 0; -- cgit v1.2.3