test2
main.cpp@0:68493d5f15b1, 2015-04-15 (annotated)
- Committer:
- takt
- Date:
- Wed Apr 15 08:31:04 2015 +0000
- Revision:
- 0:68493d5f15b1
- Child:
- 1:74279cff173c
test
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
takt | 0:68493d5f15b1 | 1 | #include "mbed.h" |
takt | 0:68493d5f15b1 | 2 | #include "BufferedSerial.h" |
takt | 0:68493d5f15b1 | 3 | |
takt | 0:68493d5f15b1 | 4 | static unsigned int s_rx_in = 0; |
takt | 0:68493d5f15b1 | 5 | |
takt | 0:68493d5f15b1 | 6 | BufferedSerial pc(SERIAL_TX, SERIAL_RX); |
takt | 0:68493d5f15b1 | 7 | |
takt | 0:68493d5f15b1 | 8 | DigitalOut myled(LED1); |
takt | 0:68493d5f15b1 | 9 | |
takt | 0:68493d5f15b1 | 10 | int main() { |
takt | 0:68493d5f15b1 | 11 | while(1) { |
takt | 0:68493d5f15b1 | 12 | myled = 1; // LED is ON |
takt | 0:68493d5f15b1 | 13 | wait(0.2); // 200 ms |
takt | 0:68493d5f15b1 | 14 | myled = 0; // LED is OFF |
takt | 0:68493d5f15b1 | 15 | wait(1.0); // 1 sec |
takt | 0:68493d5f15b1 | 16 | } |
takt | 0:68493d5f15b1 | 17 | } |