![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
BLE fota Robot Demo
Dependencies: mbed-rtos mbed mbed_fota_fan_control
Fork of mbed_fota_lamp_control by
main.cpp@1:5cf3a6c969be, 2015-06-22 (annotated)
- Committer:
- dudnwjs
- Date:
- Mon Jun 22 07:36:06 2015 +0000
- Revision:
- 1:5cf3a6c969be
- Parent:
- 0:a1f6b1ba8a1e
- Child:
- 3:1e70387e1337
Basic Program Coding Complete
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dudnwjs | 0:a1f6b1ba8a1e | 1 | #include "mbed.h" |
dudnwjs | 1:5cf3a6c969be | 2 | #include "BleMsgHandler.h" |
dudnwjs | 0:a1f6b1ba8a1e | 3 | |
dudnwjs | 0:a1f6b1ba8a1e | 4 | Serial hostpc(USBTX,USBRX); |
dudnwjs | 0:a1f6b1ba8a1e | 5 | Serial device(p13,p14); |
dudnwjs | 0:a1f6b1ba8a1e | 6 | |
dudnwjs | 0:a1f6b1ba8a1e | 7 | DigitalOut myled(LED1); |
dudnwjs | 0:a1f6b1ba8a1e | 8 | |
dudnwjs | 1:5cf3a6c969be | 9 | using namespace sevencore_fota; |
dudnwjs | 1:5cf3a6c969be | 10 | |
dudnwjs | 0:a1f6b1ba8a1e | 11 | int main() { |
dudnwjs | 1:5cf3a6c969be | 12 | BleMsgHandler myfota(&device,&hostpc); |
dudnwjs | 0:a1f6b1ba8a1e | 13 | |
dudnwjs | 1:5cf3a6c969be | 14 | myfota.PrintTitle(); |
dudnwjs | 0:a1f6b1ba8a1e | 15 | |
dudnwjs | 0:a1f6b1ba8a1e | 16 | |
dudnwjs | 0:a1f6b1ba8a1e | 17 | while(1) { |
dudnwjs | 0:a1f6b1ba8a1e | 18 | myled = 1; |
dudnwjs | 0:a1f6b1ba8a1e | 19 | wait(0.5); |
dudnwjs | 0:a1f6b1ba8a1e | 20 | myled = 0; |
dudnwjs | 0:a1f6b1ba8a1e | 21 | wait(0.5); |
dudnwjs | 0:a1f6b1ba8a1e | 22 | } |
dudnwjs | 0:a1f6b1ba8a1e | 23 | } |