User manual
RP6 ROBOT SYSTEM - 4. Programming the RP6
By the way: RC5data_t is a special pre-defined datatype, containing the RC5 Device
Address, the Toggle Bit the Key code (respectively a data value). You may use these
data just like ordinary variables with the following identifiers:
rc5data.device, rc5data.toggle_bit, rc5data.key_code
The CD provides a sample program that shows how to use this.
Attention: Never activate the IRCOMM output pin permanently! The
IR LEDs and MOSFET driver circuit has been designed for pulsed op-
eration and is allowed to be operated at pulse periods of about one
millisecond only! Otherwise current consumption gets too high with
fully charged accumulators. Do not modify any of the IRCOMM func-
tions if you are unexperienced with such things. Especially the Inter-
rupt Routine for controlling these IR devices must not be modified!
4.6.8. Power saving functions
In previous chapters we have been using powerON(), but we did not describe its func-
tionality. The RP6 has can save a bit power by deactivating the ACS, the encoder sys-
tem, the motor current sensors and the PowerON LED. It saves roughly 10mA to de-
activate these sensors.
To turn the sensors ON you may call the macro:
powerON()
and to save some power and turn the sensors off you can call:
powerOFF()
Both macros will only set an I/O Pin.
Before using the ACS, IRCOMM or motor control, the powerON()
macro has to be executed! Otherwise the corresponding sensor cir-
cuits will not be supplied with power. In order to operate correctly,
the motor control routines require the encoder signals and current
sensors feedback.
Whenever you forget to call powerON(), the motors will be shutdown
immeadiately after a short start attempt. To indicate this error con-
dition, the four red status LEDs will start flashing.
4.6.9. Drive system functions
The RP6Library provides comfortable functions for controlling the robot's drive system.
Some functions will automatically control the motor speed by encoder feedback, check
the motor current, automatically move certain distances and perform many other
tasks. These features are very comfortable, but – just like with the other systems of
the Robot - we need to consider some special things in order to use them.
The actual development status cannot be considered as optimal. There is lots of room
for improvements!
void task_motionControl(void)
We will have to call the task_motionControl function frequently from the main pro-
- 97 -










