The OSOYOO Magic I/O Shield for Arduino is a powerful board for the beginners. With this Magic board, we can easily connect various sensors and actuators much easier than before. In addition, this extension board has a build-in motor driver chip which allows us to control movements of two pairs of electric motors.
In this lesson, we will show how to assemble a simple robot car and use blocks to program its movement.
Not much is needed for this lesson, Make sure you have a good quality syncing cable,do not pick a ‘charge only’ USB cable.
1. Remove the protective film from the chassis, then install the motor under the chassis with M3 screws,nuts and rubber rings as follow: (Please install the rubber rings on the chassis)
2. Install the universal wheel with the M3 screws, copper pillars and rubber rings:
3. Install the universal wheel under the chassis with the M3 screws:
4. Install the OSOYOO UNO Board with M3 plastic screws and pillars:
5. Install OSOYOO UNO Board on the chassis with M3 plastic screws:
6. Plug OSOYOO Magic I/O Shield v1.1 into OSOYOO UNO Board as the picture show:
7. Install the wheels:
8. Install the battery box on the chassis with M2 screws and nuts:
9. Connect the components:
Left Motor – L1
Right Motor – R1
IN1 —D12 //K1、K2 motor direction
IN2 —D11 //K1、K2 motor direction
IN3 —D9 //K3、K4 motor direction
IN4 —D10 //K3、K4 motor direction
ENA —D5 // Needs to be a PWM pin to be able to control motor speed ENA
ENB —D6 // Needs to be a PWM pin to be able to control motor speed ENB
Step 1) If you haven’t install mBlock software in your PC, please read Lesson 1, download and install the software.
Step 2) Run the mBlock PC software by double click the lovely Panda icon. Drag and Drop osoyoo_uno_mext file(downloaded in Step 1) to mBlock software as following:
Now you will see a new device firmware in mBlock, see following picture:
Now mBlock software and OSOYOO_UNO device firmware have been successfully installed in our PC!
Now we will show you how to use blocks to turn above idea into reality.
Step 1: Click Events, add when Arduino Uno starts up block to coding area:
Step 2: Click Action, add 5 action blocks below when Arduino Uno starts up block as following picture:
Now we have completed the block programming. The final blocks look like following:
Disconnect Arduino from PC, put a 9V battery into battery pox(make sure polar direction is correct, otherwise it can destroy your device and cause fire hazard).
Put the car on the ground, press the Motor Power switch on the OSOYOO Magic I/O Shield for Arduino, the car should go forward 1 seconds, then go backward 1 seconds, then right turn for 1 seconds, then left turn for 1 seconds, then stop.
If the car does not move as per above mentioned result, you should check your wire connection, battery voltage(must over 7.2v).
DownLoad Url osoyoo.com