D Demo Programs - qfix crash-bobby Instructions Manual

Table of Contents

Advertisement

Appendix D
Demo programs
This chapter describes tre sample programs delivered with the CD.
analogTest
This program outputs a value at the analog port 0 via the LEDs. At a voltage of 0V (internal
value 0) no LEDs light up; at a voltage of 5V (internal value 255) all four LEDs light up. In
between, the corresponding number of LEDs light up.
bobbyTest
This program allows the Crash Bobby to drive around and to avoid obstacles. For this, the
three distance sensors must be connected to the controller as follows:
Left sensor: An0
Middle sensor: An1
Right sensor: An2
Die Motoren m ¨ ussen folgendermaßen angeschlossen sein:
Left motor: Mo0
Right motor: Mo1
Operation:
At the start, the LED 0 lights up. Now, the sensors must be calibrated to the "critical
distance". For this, you must hold your hand approx. 10-20 cm in front of the middle
sensor and press button 0. Now, the robot can be placed down.
After pressing button 2, it will drive off.
Pressing button 0 will stop it again; by pressing button 2, it will start up once more. To
carry out a recalibration, the battery cable must be briefly unplugged.
34

Advertisement

Table of Contents
loading

Table of Contents