![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
RemoLab Blinky Experiment
main.cpp@0:ec8e913ff5bc, 2016-02-02 (annotated)
- Committer:
- EduRemo
- Date:
- Tue Feb 02 12:35:04 2016 +0000
- Revision:
- 0:ec8e913ff5bc
Initial
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
EduRemo | 0:ec8e913ff5bc | 1 | #include "mbed.h" |
EduRemo | 0:ec8e913ff5bc | 2 | |
EduRemo | 0:ec8e913ff5bc | 3 | DigitalOut myled(LED1); //red led |
EduRemo | 0:ec8e913ff5bc | 4 | |
EduRemo | 0:ec8e913ff5bc | 5 | int main() { |
EduRemo | 0:ec8e913ff5bc | 6 | while(1) { |
EduRemo | 0:ec8e913ff5bc | 7 | myled = 1; //make led OFF becuase led is active low |
EduRemo | 0:ec8e913ff5bc | 8 | wait(0.5); // wait for half a second |
EduRemo | 0:ec8e913ff5bc | 9 | myled = 0; // makes led ON |
EduRemo | 0:ec8e913ff5bc | 10 | wait(0.5); |
EduRemo | 0:ec8e913ff5bc | 11 | } |
EduRemo | 0:ec8e913ff5bc | 12 | } |