aboutsummaryrefslogtreecommitdiff
path: root/examples/blinky.cpp
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-05-02 14:33:05 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-05-04 13:31:24 -0400
commit1634a4855e3d5bf8e3cda2ecb0f4e5f384d057af (patch)
tree5cf246a27d1f02ec959893fb62fd8aa754a11e8e /examples/blinky.cpp
parentc436ffa1bbe0491738d19b06c2618935603b424f (diff)
/examples/ cleanups.
Diffstat (limited to 'examples/blinky.cpp')
-rw-r--r--examples/blinky.cpp9
1 files changed, 3 insertions, 6 deletions
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;