diff options
Diffstat (limited to 'examples/blinky.cpp')
-rw-r--r-- | examples/blinky.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/examples/blinky.cpp b/examples/blinky.cpp new file mode 100644 index 0000000..751475e --- /dev/null +++ b/examples/blinky.cpp @@ -0,0 +1,25 @@ +// Blinks the built-in LED + +#include <wirish/wirish.h> + +void setup() { + pinMode(BOARD_LED_PIN, OUTPUT); +} + +void loop() { + togglePin(BOARD_LED_PIN); + delay(100); +} + +__attribute__((constructor)) void premain() { + init(); +} + +int main(void) { + setup(); + + while (true) { + loop(); + } + return 0; +} |