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: Futaba485.h
- Revision:
- 0:5387fecc249c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Futaba485.h Sat Dec 26 14:12:18 2015 +0000 @@ -0,0 +1,22 @@ +#ifndef MBED_FUTABA_SERVO_H +#define MBED_FUTABA_SERVO_H + +#include "mbed.h" + +class Futaba { +private: + Serial _device; // tx, rx + DigitalOut _REDE; //transmitt enable or disenable + +public: + Futaba(PinName tx ,PinName rx, PinName REDE); + void init(); + void setTmax(unsigned char ID, unsigned char data); + void torqueOn (unsigned char ID); + void torqueOff (unsigned char ID); + void setPosition (unsigned char ID, int data); + void setPosition_long123 (int data1,int data2, int data3); //ID 1~3 + void setTslope(unsigned char ID, unsigned char CW, unsigned char CCW);//00H~FFH 0deg~255deg +}; + +#endif \ No newline at end of file