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.
RS405CB.h@2:7e4294a350fd, 2019-12-09 (annotated)
- Committer:
- FumiyaKoike
- Date:
- Mon Dec 09 08:28:56 2019 +0000
- Revision:
- 2:7e4294a350fd
- Parent:
- 1:d9b19e1c1a9f
- Child:
- 3:f7eb7b062ae0
Add LongPacket function;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| FumiyaKoike | 0:22a84e434ec8 | 1 | #ifndef MBED_RS405CB_H |
| FumiyaKoike | 0:22a84e434ec8 | 2 | #define MBED_RS405CB_H |
| FumiyaKoike | 0:22a84e434ec8 | 3 | |
| FumiyaKoike | 0:22a84e434ec8 | 4 | class RS405CB: public Serial{ |
| FumiyaKoike | 0:22a84e434ec8 | 5 | public: |
| FumiyaKoike | 0:22a84e434ec8 | 6 | RS405CB(PinName tx, PinName rx, PinName permit); |
| FumiyaKoike | 0:22a84e434ec8 | 7 | |
| FumiyaKoike | 0:22a84e434ec8 | 8 | // RS405CB SERVO COMMANDs |
| FumiyaKoike | 0:22a84e434ec8 | 9 | void Torque(unsigned char ID, unsigned char data); |
| FumiyaKoike | 2:7e4294a350fd | 10 | void TorqueOn(unsigned char ID); |
| FumiyaKoike | 2:7e4294a350fd | 11 | void TorqueOn(unsigned char* ID); |
| FumiyaKoike | 0:22a84e434ec8 | 12 | void GoalPosition(unsigned char ID, int data); |
| FumiyaKoike | 2:7e4294a350fd | 13 | void GoalPosition(unsigned char* ID, int* data); |
| FumiyaKoike | 1:d9b19e1c1a9f | 14 | void GoalPosition(unsigned char ID, int data, int speed); |
| FumiyaKoike | 2:7e4294a350fd | 15 | void GoalPosition(unsigned char* ID, int* data, int* speed); |
| FumiyaKoike | 0:22a84e434ec8 | 16 | void Change_ID(unsigned char oldID, unsigned char newID); |
| FumiyaKoike | 0:22a84e434ec8 | 17 | int Read_Deg(unsigned char ID); |
| FumiyaKoike | 0:22a84e434ec8 | 18 | int Read_mA(unsigned char ID); |
| FumiyaKoike | 0:22a84e434ec8 | 19 | |
| FumiyaKoike | 0:22a84e434ec8 | 20 | private: |
| FumiyaKoike | 0:22a84e434ec8 | 21 | DigitalOut _permit; |
| FumiyaKoike | 0:22a84e434ec8 | 22 | void _ROM_Update(unsigned char ID); |
| FumiyaKoike | 0:22a84e434ec8 | 23 | int _s16(int value); |
| FumiyaKoike | 0:22a84e434ec8 | 24 | }; |
| FumiyaKoike | 0:22a84e434ec8 | 25 | |
| FumiyaKoike | 0:22a84e434ec8 | 26 | #endif |