User manual

RP6 ROBOT SYSTEM - 4. Programming the RP6
Example 3: Question-and-Answer Program
Directory: <RP6Examples>\RP6BaseExamples\Example_02_UART_02\
File: RP6Base_SerialInterface_02.c
This program will output messages on the serial interface
The robot does not move in this example program!
This more complex example is a little question-and-answer dialog, in which the robot
will ask four simple questions and you may reply by entering any answer in the ter-
minal. The robot will react with a text message or by starting a short running light.
The program demonstrates how to retrieve data from the serial interface and use this
data for further processing. Additionally you will learn how to use the
writeStringLength-function and there is another example for a switch-case construct.
The old functions for data reception through the serial interface have been replaced by
more powerful one in the latest RP6Lib version. This example program demonstrates
their usage directly. Now it is possible to process inputs of any length and to react
better on wrong inputs.
Example 4: Stopwatches Demo Program
Directory: <RP6Examples>\RP6BaseExamples\Example_03_Stopwatches\
File: RP6Base_Stopwatches.c
This program will output messages on the serial interface
The robot does not move in this example program!
This program is using four of the stopwatches. The first one is generating a running
light with 100ms refresh Interval and the others are being used for three different
counters incrementing in different intervals and outputting their values through the
serial interface.
Example 5: ACS & Bumper Demo Program
Directory: <RP6Examples>\RP6BaseExamples\Example_04_ACS\
File: RP6Base_ACS.c
This program will output messages on the serial interface
The robot does not move in this example program!
Although the filename only indicates an ACS application, this program demonstrates
ACS and Bumper usage with the corresponding Event Handlers. The example shows
the state of both ACS channels with the LEDs and outputs it with the serial interface.
The bumper status is only transferred with the serial interface.
Just move your hands in front of the robot and hit the bumpers!
You can use the program for testing the ACS with several different objects just to
check which objects are detected well. You may also change the transmit power of the
ACS! The default value has been set to medium level.
- 113 -