[SPI] This is used to communicate with the smart servo shield
Don't use manually
More...
#include <eBoard.h>
[SPI] This is used to communicate with the smart servo shield
Don't use manually
- Author
- EagleoutIce
- Warning
- [COPY&PASTE] use SoccerBoard, DynamixelBoard and I2CInOut !
-
this code is for internal use only and shouldnt be used otherwise
- Copyright
- This code is based on the offical library [https://github.com/leffhub/ServoCds55 (undocumented :/)] cheers!
[COPY&PASTE] [SPI] You can use this class like this:
[SPI] You can use this class like this:
Definition at line 2036 of file eBoard.h.
◆ ServoCds55()
ServoCds55::ServoCds55 |
( |
optVAL_t |
CS = 53 | ) |
|
The constructor.
- Note
- There should be only the already created _servoHandler.
-
This class isn't static!
◆ begin()
void ServoCds55::begin |
( |
| ) |
|
begin the communication and setup SPI
◆ Reset()
resets a servo
- Parameters
-
ID | the target ID of the Servo |
◆ rotate()
◆ sendWait()
byte ServoCds55::sendWait |
( |
const byte |
what | ) |
|
sends data. This is used internally and shouldnt be used!
- Parameters
-
- Returns
- feedback of SPI.transfer();
◆ SetID()
change the ID of a special Servo
- Parameters
-
ID | the target ID of the Servo |
newID | the newID of the Servo |
- Warning
- using this may result in a total failure of the program... pls no what you're doing!
◆ SetMotormode()
(probably) set the velocity of only one Servo
- Parameters
-
ID | the target ID of the Servo |
velocity | (probably) the speed for a specific servo |
- Warning
- could do something different... lack of documentation
◆ setPosLimit()
void ServoCds55::setPosLimit |
( |
optVAL_t |
posLimit | ) |
|
Sets the position limits for the servos.
- Parameters
-
posLimit | the new positionLimit |
- Attention
- the values are neither clamped nor masked!
◆ SetServoLimit()
(probably) set the posLimit for only one servo (will be overwritten by write() => writePos())
- Parameters
-
ID | the target ID of the Servo |
upperLimit | (probably) the upperLimit for a specific servo |
- Warning
- could do something different... lack of documentation
◆ setVelocity()
void ServoCds55::setVelocity |
( |
optVAL_t |
velocity | ) |
|
Sets the default speed of servos.
- Parameters
-
velocity | the new speed value... |
◆ write()
Moves a Servo to a certain position.
- Parameters
-
ID | the target ID of the Servo |
Pos | the target position of the Servo |
◆ WritePos()
Moves a Servo to a certain position.
- Parameters
-
ID | the target ID of the Servo |
Pos | the target position of the Servo |
- Note
- don't use this function... use write() instead
◆ cs
stores the ControlPin id
Definition at line 2134 of file eBoard.h.
◆ tmp
◆ upperLimit_temp
int ServoCds55::upperLimit_temp |
◆ velocity_temp
stores the velocity value send with writePos()
Definition at line 2132 of file eBoard.h.
The documentation for this struct was generated from the following file: