![](/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
main.cpp@78:ddf5cff958fa, 2019-11-20 (annotated)
- Committer:
- batman52
- Date:
- Wed Nov 20 21:33:47 2019 +0000
- Revision:
- 78:ddf5cff958fa
- Parent:
- 29:0b58d21e87d6
- Child:
- 79:0431b9fd3dc0
named leds for rapid iot
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jonathan Austin |
0:2757d7abb7d9 | 1 | #include "mbed.h" |
Jonathan Austin |
0:2757d7abb7d9 | 2 | |
batman52 | 78:ddf5cff958fa | 3 | DigitalOut led_red(LED_RED, 1); // LED1 = LED_RED, 1 --> OFF, 0 --> ON |
batman52 | 78:ddf5cff958fa | 4 | DigitalOut led_blue(LED_BLUE, 1); // LED3 = LED_BLUE, 1 --> OFF, 0 --> ON |
Jonathan Austin |
0:2757d7abb7d9 | 5 | |
Jonathan Austin |
1:846c97078558 | 6 | // main() runs in its own thread in the OS |
Jonathan Austin |
0:2757d7abb7d9 | 7 | int main() { |
Jonathan Austin |
0:2757d7abb7d9 | 8 | while (true) { |
batman52 | 78:ddf5cff958fa | 9 | led_red = !led_red; |
batman52 | 78:ddf5cff958fa | 10 | led_blue = !led_red; |
mbed_official | 22:af9dcf379926 | 11 | wait(0.5); |
Jonathan Austin |
0:2757d7abb7d9 | 12 | } |
Jonathan Austin |
0:2757d7abb7d9 | 13 | } |
Jonathan Austin |
1:846c97078558 | 14 |