this is program for mbed ,to relay MCUcomm data to servo

Dependencies:   Servo mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers command.h Source File

command.h

00001 //command.h
00002 
00003 // command list
00004  
00005 #include "Servo.h"
00006 #include "mbed.h"
00007 
00008 
00009 
00010 class Command : public Servo
00011 {
00012 public:
00013     Command(PinName pin);
00014     
00015     void targetPosition(int number ,int receive);
00016     void homePosition(int number ,int receive);
00017     void on();
00018     void off();
00019     bool getPower();
00020     int getPosition();
00021     int getTime();
00022     int getHomeposition();
00023     Command& operator= (float percent);
00024     Command& operator= (Command& rhs);
00025 protected:
00026     bool _power;
00027     short int _position;
00028     short int _time;
00029     short int _homePosition;
00030 };