Keywish Hummer-Bot-2.0 Instruction Manual page 52

Table of Contents

Advertisement

3.2.2.5 Experimental Procedures
1, Fixing the two sensors on the car and connecting them to Arduino with wires.(Already done)
2, Testing the sensitivity of module, namely opening the switch on the battery box and the indicator will
light, placing obstacles the 10cm away from the infrared tubes, adjusting the potentiometer until the output
indicator lights up.
3, Module test. Copying the following code to the IDE compiler environment (you can also open the
program directly in the CD), downloading it to the development board, opening the serial port monitor (baud
rate is 9600) and observing the changes of data when there is an obstacle (Figure 3.2.14) and no obstacle
(Figure 3.2.15).
Note: Here we connect the infrared obstacle avoidance signal output port to the analog port on Arduino
(A0-A5), so the serial port prints out analog value, you can connect it to digital port (2-13), and the serial port
will only print out "0" and "1".
Program flow chart is as follows:
49

Advertisement

Table of Contents
loading

Related Products for Keywish Hummer-Bot-2.0

Table of Contents