62
Figure 3.2.20 The Data When the Sensor Detects the Black Line
From Fig.3.2.19 and Fig.3.2.20 we can see that the output is high level when the sensor does not detect
the black line, low level when detects the black line. We use the analog port to collect the sensor’s signal, so
the printed value is analog that, the high level is reaching 1024, the low level is 0. After we master the
working principle of the sensor, our tracing car in this section comes to an end, then let us open a car
journey.
3.2.3.5 Software Design
1. Overall software flow chart
When the car enters the tracing mode, it keeps scanning the I/O port of the MCU connected to the
sensors, once detecting the changes in signal at the I/O port, the corresponding procedure will be
implemented, the corresponding signal will be sent to the motor so as to correct the status of the car.
2. The car tracing flow chart
When the car enters the tracing mode, it keeps scanning the I/O port of the MCU
connected to the sensors, once detecting the changes in signal at the I/O port, the corresponding procedure
will be implemented. If the left sensor detects the black line(the left half of the car walked across the black
line, the car body is trended right), the car should turn the left; If the right sensor detects the black line(the
right half of the car walked across the black line, the car body is trended left), the car should turn the right.
After the direction adjustment, the car walks forward, and continues to detect the black line repeatedly. The
tracing flow chart is shown in Fig.3.2.21.
Summary of Contents for Hummer-Bot
Page 1: ...Hummer Bot Instruction Manual Github https github com keywish keywish hummer bot...
Page 7: ...4...
Page 8: ...5...
Page 9: ...6...
Page 10: ...7...
Page 13: ...10 Fig 2 2 Several commonly usedArduino...
Page 15: ...12 After the completion as shown...
Page 16: ...13 The second step is to Welding wire on the motor...
Page 17: ...14 After the completion as shown...
Page 19: ...16 Fig 3 1 3 Diagram of Aluminum Alloy Bracket Installation...
Page 20: ...17 Fig 3 1 4 Diagram of Motor Installation Fig 3 1 5 Fixing Screw for Motor...
Page 24: ...21 Fig 3 1 10 Diagram of Wheel Installation Fig 3 1 10 Diagram of Wheel Screw Fixation...
Page 29: ...26 Fig 3 1 15 Diagram of Tracing Module Installation...
Page 30: ...27 Fig 3 1 16 Diagram of Screw Brackets Fig 3 1 17 The Back of Complete Installation...
Page 32: ...29 First install the screws on the UNO After the completion as shown...
Page 43: ...40 Fig 3 1 33 Diagram of Wires Arrangement Fig3 1 34 the Effect of Whole Assembly...
Page 56: ...53 Fig 3 2 11 Diagram of Data with Obstacles Fig 3 2 12 Diagram of Data without Obstacles...
Page 69: ...66 Fig 3 2 22 Diagram of Steering Gear Fig 3 2 23 Composition of Steering Gear...
Page 93: ...90 Fig 3 2 42 Receiving Head Position Fig 2 3 43 Installation of Receiving Head...