T Shark
/
Nucleo_blink_led
d
main.cpp@0:7011ad990080, 2018-03-21 (annotated)
- Committer:
- TShark
- Date:
- Wed Mar 21 19:36:20 2018 +0000
- Revision:
- 0:7011ad990080
commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
TShark | 0:7011ad990080 | 1 | #include "mbed.h" |
TShark | 0:7011ad990080 | 2 | |
TShark | 0:7011ad990080 | 3 | DigitalOut myled(LED1); |
TShark | 0:7011ad990080 | 4 | |
TShark | 0:7011ad990080 | 5 | int main() { |
TShark | 0:7011ad990080 | 6 | while(1) { |
TShark | 0:7011ad990080 | 7 | myled = 1; // LED is ON |
TShark | 0:7011ad990080 | 8 | wait(0.2); // 200 ms |
TShark | 0:7011ad990080 | 9 | myled = 0; // LED is OFF |
TShark | 0:7011ad990080 | 10 | wait(1.0); // 1 sec |
TShark | 0:7011ad990080 | 11 | } |
TShark | 0:7011ad990080 | 12 | } |