Library for XBee API targeted toward functions with specific use in conjunction with the Pololu 3pi Robot. Work in Progress
Diff: XBee_Robot.h
- Revision:
- 10:cb1d91c06093
- Parent:
- 9:d5e7e772d5a4
- Child:
- 11:6b699617fc7f
--- a/XBee_Robot.h Sun Jan 31 19:34:21 2016 +0000 +++ b/XBee_Robot.h Sun Jan 31 20:01:54 2016 +0000 @@ -49,6 +49,12 @@ Serial dataLink; //declare global serial + int commandX; // x coordinate received as commanded by the coordinator + + int commandY; //y coordinate received as commanded by the coordinator + + int commandFlag; // flag that indicates if coordinates from the coordinator have been received + public: XBee_Robot(PinName _txIn, PinName _rxIn); @@ -77,4 +83,16 @@ void RxDataHandler(std::vector<uint8_t> & packet); //handles received data based on data command + + int getCommandX(); + //used by main program to extract received command coordinates + + int getCommandY(); + //used by main program to extract received command coordinates + + int getCommandFlag(); + //used by main program to poll command flag + + void resetCommandFlag(); + //used by main program to reset command flag };