![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Basic Master connection code. (Bluetooth)
main.cpp@2:25cede572d19, 2018-05-25 (annotated)
- Committer:
- el15tcd
- Date:
- Fri May 25 18:08:42 2018 +0000
- Revision:
- 2:25cede572d19
- Parent:
- 1:c573caf40864
Basic Master device connection code. (Bluetooth)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el15tcd | 0:8a61e3541a5e | 1 | #include "mbed.h" |
el15tcd | 0:8a61e3541a5e | 2 | |
el15tcd | 2:25cede572d19 | 3 | Serial rn42(p9,p10); //TX, RX |
el15tcd | 2:25cede572d19 | 4 | Serial pc(USBTX, USBRX); |
el15tcd | 0:8a61e3541a5e | 5 | |
el15tcd | 0:8a61e3541a5e | 6 | int main() |
el15tcd | 0:8a61e3541a5e | 7 | { |
el15tcd | 2:25cede572d19 | 8 | |
el15tcd | 2:25cede572d19 | 9 | rn42.baud(460800); |
el15tcd | 2:25cede572d19 | 10 | //baud rate defined |
el15tcd | 2:25cede572d19 | 11 | wait(0.5); |
el15tcd | 0:8a61e3541a5e | 12 | |
el15tcd | 0:8a61e3541a5e | 13 | while(1) { |
el15tcd | 0:8a61e3541a5e | 14 | |
el15tcd | 0:8a61e3541a5e | 15 | |
el15tcd | 0:8a61e3541a5e | 16 | } |
el15tcd | 0:8a61e3541a5e | 17 | |
el15tcd | 0:8a61e3541a5e | 18 | } |