Yahboom Omibox Robot Kit arduino IDE course 5.12 CarRun
1-1.The position of the Motor on the robot car
1-2.Learn about the PCA9685 drive chip pins connected to the Motor of Omibox programmable robot
1-3.Learn how to control motor by programming
As shown in the above picture, we circled the motors with two green wire frames, we circled the universal wheel with blue wire frames. We can control them by programming.
According to the hardware manual, we can know that
Controlling the left motor forward is the Pin1 of the PCA9685.
Controlling the left motor back is the Pin2 of the PCA9685.
Controlling the right motor forward is the Pin15 of the PCA9685.
Controlling the right motor back is the Pin14 of the PCA9685.
Please see the CarRun.ino file for this experimental procedure.
1.We need to open the code of this experiment: CarRun.ino, click“√” under the menu bar to compile the code, and wait for the word "Done compiling " in the lower right corner, as shown in the figure below.
2. Click 【Tools】 --- 【Board】 -- we need to choose Arduino Uno. As shown in the figure below.
3.In the menu bar of Arduino IDE, we need to select 【Tools】---【Port】--- selecting the port that the serial number displayed by the device manager, as shown in the figure below.
4. After the selection is completed, you need to click “ → ”under the menu bar to upload the code to the Arduino UNO board. When the word “Done uploading” appears in the lower left corner, the code has been successfully uploaded to the Arduino UNO board, as shown in the figure below.
After the program is uploaded, open the power of the robot car. After 2 seconds, Omibox will advance. The Omibox robot will advance 1 second, back 1 second, turn left 1 second, turn right 1 second, spin left 1 second, spin right 1 second, stop 1 second.
The code of the experiment: 12.CarRun.rar