Receiver code for SLVM

Dependencies:   mbed-rtos mbed

Robot.h

Committer:
jnagendran3
Date:
2014-12-09
Revision:
0:fd289b2e6b74

File content as of revision 0:fd289b2e6b74:

#include "mbed.h"
//#include "USBHost.h"
//#include "Utils.h"
#include <string>

class Robot
{
public:
     Robot(); //Constructor
     Robot(Serial *MbedSerial, DigitalOut *ConfirmationLed); //Real constructor
     bool SetMotorVelocity(int velocity);                         //SetMotorVelocity
     bool SetSelectMotorVelocity(int LEFT, int RIGHT);  //Set individual Motor Velocity
     bool StopRobot();                                            //Send the stop command
     bool SetMotorPWM(int ramp, int PWMValue);                    //Set Motor PWM
     bool SetSelectMotorPWM(int MotorNumber,int ramp, int PWMValue);    //Set individual Motor PWM
     bool WaitForAck();

private:
     bool SendCommand(string arg1);                               //Send any properly formated string

     Serial* host;                                          //points to a serial connection
     DigitalOut* AckLED;                                    //Keeps track of if the mbed received an ack
    
};