User Manual

will be outputted from M1, M2, M3 and M4, so as to control the speed of the robot.
Control work
M1 M2 M3 M4 Descriptions
1 0 1 0 When the motors rotate forwards, the robot goes straight
0 1 0 1 When the motors rotate backwards, the robot draws back
0 0 1 0 When the right motor stops and left motor rotates forwards, the robot turns right
1 0 0 0 When the left motor stops and right motor rotates forwards, the robot turns left
0 0 0 0 When the motors stop, the robot stops
Examples
There are two examples for this module, one is for infrared remote control, and the other is for website
remote control with real‐time monitor via a Raspberry Pi camera. ﴾Notes: The chassis and the camera are
not provided with the module, and have to be purchased separately.﴿
The examples demonstrated in the section below are available from here. To follow along with the
examples, you just need to extract the relative file's contents into a folder under the directory of /home/pi
in the Raspbian system. ﴾Of course, you should copy them into the Raspberry Pi via your U disk first.﴿
Infrared remote control
This test demonstrates how to remote control the robot with an infrared remote controller. The pulse
signal from the infrared remote controller complies with the NEC standard. The infrared remote receiver
outputs the pulse to the Pin 18 of the BCM after relative signal received. Then, the Raspberry Pi reads the
pulse from the Pin 18 and decodes it, so as to control the corresponding motor. For more detailed
information, please refer to the source code of the example
Infrared NEC protocol coding description
Data format: Address, ~﴾Address﴿, Command, ~﴾Command﴿
~﴾Address﴿: bit‐wise complement of Address. ~﴾Command﴿: bit‐wise complement of Command
Both address and command are in a format of 8 bits, so a complete signal is in 32 bits.
This example is based on the Python library, which has been in the latest Raspbian system. However, if