Apna pehla lab program jisme humne LED ko blink karaya tha, DigitalOut se
Dependencies: mbed
Apna pehla lab program jisme humne LED ko blink karaya tha, DigitalOut se
main.cpp@0:2ce49f03f6ea, 2016-06-28 (annotated)
- Committer:
- akashlal
- Date:
- Tue Jun 28 08:16:24 2016 +0000
- Revision:
- 0:2ce49f03f6ea
Blinking LED
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
akashlal | 0:2ce49f03f6ea | 1 | #include "mbed.h" |
akashlal | 0:2ce49f03f6ea | 2 | |
akashlal | 0:2ce49f03f6ea | 3 | DigitalOut led (PTB18); |
akashlal | 0:2ce49f03f6ea | 4 | |
akashlal | 0:2ce49f03f6ea | 5 | int main() |
akashlal | 0:2ce49f03f6ea | 6 | { |
akashlal | 0:2ce49f03f6ea | 7 | while(1) |
akashlal | 0:2ce49f03f6ea | 8 | { |
akashlal | 0:2ce49f03f6ea | 9 | led=0; |
akashlal | 0:2ce49f03f6ea | 10 | wait(0.5); |
akashlal | 0:2ce49f03f6ea | 11 | led=1; |
akashlal | 0:2ce49f03f6ea | 12 | wait(0.5); |
akashlal | 0:2ce49f03f6ea | 13 | } |
akashlal | 0:2ce49f03f6ea | 14 | } |