eBoard ①⑧⑨
Written for SIA 2017/2018
ServoCds55 Struct Reference

[SPI] This is used to communicate with the smart servo shield
        Don't use manually More...

#include <eagle_ServoCds55.h>

Public Member Functions

 ServoCds55 (int CS=10)
 The constructor. More...
 
void begin ()
 begin the communication and setup SPI More...
 
void WritePos (int ID, int Pos)
 Moves a Servo to a certain position. More...
 
void write (int ID, int Pos)
 Moves a Servo to a certain position. More...
 
void setVelocity (int velocity)
 Sets the default speed of servos. More...
 
void setPoslimit (int posLimit)
 Sets the position limits for the servos. More...
 
void rotate (int ID, int velocity)
 makes nothing More...
 
void SetServoLimit (int ID, int upperLimit)
 (probably) set the posLimit for only one servo (will be overwritten by write() => writePos()) More...
 
void SetMotormode (int ID, int velocity)
 (probably) set the velocity of only one Servo More...
 
void SetID (int ID, int newID)
 change the ID of a special Servo More...
 
void Reset (int ID)
 resets a servo More...
 
byte sendWait (const byte what)
 sends data. This is used internally and shouldnt be used! More...
 

Public Attributes

int velocity_temp
 stores the posLimit value send with write() More...
 
int upperLimit_temp
 stores the posLimit value send with write() More...
 
optVAL_t cs
 stores the posLimit value send with write() More...
 

Detailed Description

[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

Definition at line 40 of file eagle_ServoCds55.h.

Constructor & Destructor Documentation

◆ ServoCds55()

ServoCds55::ServoCds55 ( int  CS = 10)

The constructor.

Note
There should be only the already created _servoHandler.
This class isn't static!

Member Function Documentation

◆ begin()

void ServoCds55::begin ( )

begin the communication and setup SPI

◆ Reset()

void ServoCds55::Reset ( int  ID)

resets a servo

Parameters
IDthe target ID of the Servo

◆ rotate()

void ServoCds55::rotate ( int  ID,
int  velocity 
)

makes nothing

◆ sendWait()

byte ServoCds55::sendWait ( const byte  what)

sends data. This is used internally and shouldnt be used!

Parameters
whatthe byte to send
Returns
feedback of SPI.transfer();

◆ SetID()

void ServoCds55::SetID ( int  ID,
int  newID 
)

change the ID of a special Servo

Parameters
IDthe target ID of the Servo
newIDthe 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
IDthe 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
posLimitthe 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
IDthe 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
velocitythe new speed value...

◆ write()

void ServoCds55::write ( int  ID,
int  Pos 
)

Moves a Servo to a certain position.

Parameters
IDthe target ID of the Servo
Posthe target position of the Servo

◆ WritePos()

void ServoCds55::WritePos ( int  ID,
int  Pos 
)

Moves a Servo to a certain position.

Parameters
IDthe target ID of the Servo
Posthe target position of the Servo
Note
don't use this function... use write() instead

Member Data Documentation

◆ cs

optVAL_t ServoCds55::cs

stores the posLimit value send with write()

Definition at line 118 of file eagle_ServoCds55.h.

◆ upperLimit_temp

int ServoCds55::upperLimit_temp

stores the posLimit value send with write()

Definition at line 116 of file eagle_ServoCds55.h.

◆ velocity_temp

int ServoCds55::velocity_temp

stores the posLimit value send with write()

Definition at line 114 of file eagle_ServoCds55.h.


The documentation for this struct was generated from the following file: