TomYumBoys / Mbed 2 deprecated MM2017

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers right_motor.h Source File

right_motor.h

00001 #ifndef RIGHT_MOTOR_H
00002 #define RIGHT_MOTOR_H
00003 #include "mbed.h"
00004 class RightMotor {
00005 public:
00006     RightMotor();
00007 
00008     // Define speed as float value between -1.0 and 1.0
00009     void speed(float speed);
00010     
00011     void stop(void);
00012     
00013     // Override operator for setting motor speed
00014     void operator = (float speed) {
00015         RightMotor::speed(speed);
00016     }
00017     
00018 private:
00019     //float curr_speed;
00020 };
00021 
00022 #endif