Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp@27:956b605bbb81, 2022-11-08 (annotated)
- Committer:
- csmk18112
- Date:
- Tue Nov 08 03:56:48 2022 +0000
- Revision:
- 27:956b605bbb81
- Parent:
- 26:88d0d94885d3
- Child:
- 28:e5cb24a764d8
f
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_official | 0:bdbd3d6fc5d5 | 1 | #include "mbed.h" |
| HeptaSatTraining2019 | 25:5fd40a170032 | 2 | #include "HEPTA_COM.h" |
| umeume | 2:1c5cdb2c3e0f | 3 | |
| csmk18112 | 27:956b605bbb81 | 4 | RawSerial pc(USBTX,USBRX,9600); |
| HeptaSatTraining2019 | 21:92c25e853b87 | 5 | HEPTA_COM com(p9,p10); |
| umeume | 2:1c5cdb2c3e0f | 6 | |
| umeume | 2:1c5cdb2c3e0f | 7 | int main() |
| umeume | 2:1c5cdb2c3e0f | 8 | { |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 9 | com.baud(9600); |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 10 | pc.printf("Xbee Uplink Ok Mode\r\n"); |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 11 | int rcmd=0,cmdflag=0; |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 12 | for(int i = 0; i < 10; i++) { |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 13 | com.printf("num = %d\r\n",i); |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 14 | com.xbee_receive(&rcmd,&cmdflag); |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 15 | pc.printf("rcmd=%d, cmdflag=%d\r\n",rcmd, cmdflag); |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 16 | if (cmdflag == 1) { |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 17 | if (rcmd == 'a') { |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 18 | pc.printf("Command Get %d\r\n",rcmd); |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 19 | com.printf("HEPTA Uplink OK\r\n"); |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 20 | } |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 21 | com.initialize(); |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 22 | } |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 23 | wait(1.0); |
| HeptaSatTraining2019 | 26:88d0d94885d3 | 24 | } |
| umeume | 2:1c5cdb2c3e0f | 25 | } |