![](/media/cache/profiles/dream_vangogh.jpg.50x50_q85.jpg)
NXP Rapid IoT prototyping kit port of Silabs "hungry gecko" smake-like game. https://os.mbed.com/teams/SiliconLabs/code/Hungry_gecko/
Dependencies: lib_sx9500 GraphicsDisplay ColorMemLCD Large_fonts
See a detailed description of this project on Hackster.io . https://www.hackster.io/marcomerli/riotwear-snake-ca6dfc
Diff: main.cpp
- Revision:
- 78:ddf5cff958fa
- Parent:
- 29:0b58d21e87d6
- Child:
- 79:0431b9fd3dc0
diff -r 9ffd4ddf037b -r ddf5cff958fa main.cpp --- a/main.cpp Wed Sep 26 13:30:02 2018 +0100 +++ b/main.cpp Wed Nov 20 21:33:47 2019 +0000 @@ -1,11 +1,13 @@ #include "mbed.h" -DigitalOut led1(LED1); +DigitalOut led_red(LED_RED, 1); // LED1 = LED_RED, 1 --> OFF, 0 --> ON +DigitalOut led_blue(LED_BLUE, 1); // LED3 = LED_BLUE, 1 --> OFF, 0 --> ON // main() runs in its own thread in the OS int main() { while (true) { - led1 = !led1; + led_red = !led_red; + led_blue = !led_red; wait(0.5); } }