[SPI] This is used to communicate with the smart servo shield
Don't use manually
More...
#include <eagle_ServoCds55.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 40 of file eagle_ServoCds55.h.
◆ ServoCds55()
ServoCds55::ServoCds55 |
( |
int |
CS = 10 | ) |
|
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()
void ServoCds55::Reset |
( |
int |
ID | ) |
|
resets a servo
- Parameters
-
ID | the target ID of the Servo |
◆ rotate()
void ServoCds55::rotate |
( |
int |
ID, |
|
|
int |
velocity |
|
) |
| |
◆ sendWait()
byte ServoCds55::sendWait |
( |
const byte |
what | ) |
|
sends data. This is used internally and shouldnt be used!
- Parameters
-
- Returns
- feedback of SPI.transfer();
◆ SetID()
void ServoCds55::SetID |
( |
int |
ID, |
|
|
int |
newID |
|
) |
| |
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()
void ServoCds55::SetMotormode |
( |
int |
ID, |
|
|
int |
velocity |
|
) |
| |
(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 |
( |
int |
posLimit | ) |
|
Sets the position limits for the servos.
- Parameters
-
posLimit | the new positionLimit |
- Attention
- the values are neither clamped nor masked!
◆ SetServoLimit()
void ServoCds55::SetServoLimit |
( |
int |
ID, |
|
|
int |
upperLimit |
|
) |
| |
(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 |
( |
int |
velocity | ) |
|
Sets the default speed of servos.
- Parameters
-
velocity | the new speed value... |
◆ write()
void ServoCds55::write |
( |
int |
ID, |
|
|
int |
Pos |
|
) |
| |
Moves a Servo to a certain position.
- Parameters
-
ID | the target ID of the Servo |
Pos | the target position of the Servo |
◆ WritePos()
void ServoCds55::WritePos |
( |
int |
ID, |
|
|
int |
Pos |
|
) |
| |
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
◆ upperLimit_temp
int ServoCds55::upperLimit_temp |
◆ velocity_temp
int ServoCds55::velocity_temp |
The documentation for this struct was generated from the following file: