WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

getActualVolts

Following a successful read() this will return the voltage being supplied to the servo in 10ths of a volt.
Syntax
DynamixelAX12. getActualVolts()
Where DynamixelAX12 is the name you have given to the device in Project Designer.
Parameters
None
Returns
uint8_t
Example
Assuming your servo is called 'servo1' in Project Designer then:-
if( servo1.read() == 0 ){
    // Got info
    uint8_t v = servo1.getActualVolts();
    cout << "Volts = " << v/10 << '.' << '0'+v%10;
}

 

 

Valid XHTML 1.0 Transitional