Brendan Kelly
/
mDot_helloworld_bk_sleep
An attempt to sleep an mDot
Fork of mDot_helloworld_bk by
main.cpp@2:9682d754c902, 2017-08-05 (annotated)
- Committer:
- kellybs1
- Date:
- Sat Aug 05 13:12:56 2017 +0000
- Revision:
- 2:9682d754c902
- Parent:
- 1:34c1fcb8ea5a
- Child:
- 3:706cdd7ce1b2
First hello world
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mfiore | 0:fdc94d24e54a | 1 | /************************************* |
kellybs1 | 2:9682d754c902 | 2 | * This simple example program prints |
kellybs1 | 2:9682d754c902 | 3 | * a message on the USB debug port. |
mfiore | 0:fdc94d24e54a | 4 | ************************************/ |
mfiore | 0:fdc94d24e54a | 5 | |
mfiore | 0:fdc94d24e54a | 6 | #include "mbed.h" |
mfiore | 0:fdc94d24e54a | 7 | |
mfiore | 0:fdc94d24e54a | 8 | int main() { |
kellybs1 | 2:9682d754c902 | 9 | int count = 0; |
kellybs1 | 2:9682d754c902 | 10 | // print the message on 3s interval |
mfiore | 0:fdc94d24e54a | 11 | while (true) { |
kellybs1 | 2:9682d754c902 | 12 | count++; |
kellybs1 | 2:9682d754c902 | 13 | printf("Hello world! I am an mDot and I count %d\r\n", count); |
kellybs1 | 2:9682d754c902 | 14 | wait(3); |
mfiore | 0:fdc94d24e54a | 15 | } |
mfiore | 0:fdc94d24e54a | 16 | } |