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.
Dependencies: Command CommandPool GenCMD LSM9DS0 Mode Motor PinDetect Xbee mbed
Fork of VR_Robot by
main.cpp
- Committer:
- Xiaofei
- Date:
- 2015-11-22
- Revision:
- 2:d77f669c7feb
- Parent:
- 0:526a865b9b03
- Child:
- 5:c1b3251ba5d5
File content as of revision 2:d77f669c7feb:
#pragma once
#include "mbed.h"
#include "CommandPool.h"
#include "Xbee.h"
Command* cmd;
CommandPool pool;
char CMD = MOVE_FORWARD;
int main()
{
/* draft of main code*/
pool.init();
while(1)
{
//if(med1.readable())
//{
//med1.read(cmd_buffer,20,callBack); // read to cmd buffer, and update command
cmd = pool.getCommand(CMD); // if cmd is valid
if(cmd)
{
cmd->execute(); // execute cmd
}
wait(0.5);
//}
}
return 0;
}
