This is a simple project on mbed, developed by NPNLab team The led is turned on for 1s and off for 1s then, repeated.
main.cpp@0:50ed51be7a14, 2017-06-23 (annotated)
- Committer:
- KISIDO85
- Date:
- Fri Jun 23 06:09:11 2017 +0000
- Revision:
- 0:50ed51be7a14
This is a simple project on ST32 Nucleo Board.; The led is turned on and off every 1s.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
KISIDO85 | 0:50ed51be7a14 | 1 | #include "mbed.h" |
KISIDO85 | 0:50ed51be7a14 | 2 | |
KISIDO85 | 0:50ed51be7a14 | 3 | DigitalOut myled(LED1); |
KISIDO85 | 0:50ed51be7a14 | 4 | |
KISIDO85 | 0:50ed51be7a14 | 5 | int main() { |
KISIDO85 | 0:50ed51be7a14 | 6 | while(1) { |
KISIDO85 | 0:50ed51be7a14 | 7 | myled = 1; // LED is ON |
KISIDO85 | 0:50ed51be7a14 | 8 | wait(1); // 2 s |
KISIDO85 | 0:50ed51be7a14 | 9 | myled = 0; // LED is OFF |
KISIDO85 | 0:50ed51be7a14 | 10 | wait(1); // 2 s |
KISIDO85 | 0:50ed51be7a14 | 11 | } |
KISIDO85 | 0:50ed51be7a14 | 12 | } |