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.
Diff: Robot.h
- Revision:
- 0:354a8831107d
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Robot.h Wed Dec 03 22:33:03 2014 +0000
@@ -0,0 +1,24 @@
+#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
+
+};