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@5:e6208d124ead, 2019-12-12 (annotated)
- Committer:
- FumiyaKoike
- Date:
- Thu Dec 12 05:00:22 2019 +0000
- Revision:
- 5:e6208d124ead
- Parent:
- 4:8289dcb78a23
Fix the issure
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 | 4:8289dcb78a23 | 14 | void SetSpeed(unsigned char ID, int speed); |
| FumiyaKoike | 4:8289dcb78a23 | 15 | void SetSpeed(unsigned char* ID, 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 |