User manual
Copyright © Dr Robot Inc. 2005
43
The return data is the raw value of the analog to digital converter indicating the input
voltage levels. The data range is between 0 and 4095. The voltage levels can be calculated
from the following equation:
Sensor output voltage = (ival) * 3.0 / 4095 (V)
See also: GetSensorBatteryAD1~3
73 short GetCustomDIN();
Description:
GetCustomDIN returns a value with lower 8-bits corresponding to the 8-channel custom
digital inputs.
Syntax: ival = GetCustomDIN ();
Parameter: void
Return value: short ival;
Remarks:
Only lower 8-bit is valid and reflects the 8 input channel states. The MSB of the lower byte
represents channel #8 and LSB of the lower byte represents channel #1.
74 void SetCustomDOUT(short ival);
Description:
SetCustomDOUT sets the 8-channel custom digital outputs.
Syntax: SetCustomDOUT (ival);
Parameter: short ival;
Return value: void
Remarks:
Only the lower 8-bit is valid and can change the corresponding outputs of the 8 channels.
The MSB of the lower byte represents channel #8 and LSB of the lower byte represents
channel #1.
III.2 Motion Control
This section contains the APIs for the operations of DC motors and standard RC servo motors.
The digital controlled DC motor system is depicted as the following diagram.