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
- Committer:
- HeptaSatTraining2019
- Date:
- 2019-08-27
- Revision:
- 26:88d0d94885d3
- Parent:
- 25:5fd40a170032
- Child:
- 27:956b605bbb81
File content as of revision 26:88d0d94885d3:
#include "mbed.h"
#include "HEPTA_COM.h"
Serial pc(USBTX,USBRX);
HEPTA_COM com(p9,p10);
int main()
{
pc.baud(9600);
com.baud(9600);
pc.printf("Xbee Uplink Ok Mode\r\n");
int rcmd=0,cmdflag=0;
for(int i = 0; i < 10; i++) {
com.printf("num = %d\r\n",i);
com.xbee_receive(&rcmd,&cmdflag);
pc.printf("rcmd=%d, cmdflag=%d\r\n",rcmd, cmdflag);
if (cmdflag == 1) {
if (rcmd == 'a') {
pc.printf("Command Get %d\r\n",rcmd);
com.printf("HEPTA Uplink OK\r\n");
}
com.initialize();
}
wait(1.0);
}
}