Note: ALL OSOYOO Products for Arduino are Third Party Board which is fully compatible with Arduino

Authorized Online Retailers

Where to buy the set with 18650 batteriese and USB charger

Buy from OSOYOO Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

Buy the V2.1 Robot car without Battery and charger:

Buy from OSOYOO Buy from US Buy from UK Buy from DE Buy from IT Buy from FR Buy from ES Buy from JP

Objective:

In this tutorial, we will use Osoyoo Smart DIY kit to make a simple remote controlled smart car. Once the car installation is completed, we will use a Infrared Remote to control the car movements including go forward, go back, left turn and right turn.

Parts and Devices:

No. Picture Device Qty. Accessories Link
1 IR receiver 1 M3 Plastic Screw x 2
M3 Plastic Nut x 2
M3 Plastic Pillar x 2
Click here to buy
2 IR remote controller 1 Click here to buy
3 20Pin jumper wire Male to female 20cm some Click here to buy
4 Hex Screwdriver 1 Click here to buy
5 M3 plastic screw 2
6 M3 plastic pillar 2
7 M3 plastic nut 2

Hardware Installation:
Step 1: Install the smart car basic frame work as per Smart Car Lesson 1 . If you have already completed installation in Lesson 1 , just keep it as is.
Step 2: Add an IR receiver module onto the car. Install the IR receiver module with 2pcs M3 plastic screws, M3 plastic pillars and M3 plastic nuts at the front of upper chassis.

Step 3: Connect the S pin in IR receiver to D10 pin in your board, GND to GND, VCC to 5V, as the following photo (Remember : DO NOT remove any existing wires installed in Lesson 1 ) :


Software Installation:

Open-source Arduino
Software(IDE)
Download IDE here:
https://www.arduino.cc/en/Main/Software?setlang=en
7 zip is a free zip
utility that un-zips zip files
Download 7zip here for free
https://www.7-zip.org/

Step 1: Install latest IDE (If you have IDE version after 1.1.16, please skip this step)
Download IDE from https://www.arduino.cc/en/Main/Software?setlang=en , then install the software.

Step 2: Install IRremote library into IDE (If you have already installed IRremote library, please skip this step)
Download IRremote library from https://osoyoo.com/wp-content/uploads/samplecode/IRremote.zip, then import the library into IDE(Open IDE-> click Sketch->Include Library->Add .Zip Library)

In the pop up window, go to your downloads folder, select the IRremote.zip file you downloaded just now.

Step 3: Download Lesson 2 IRremote smart car sample code fromhttps://osoyoo.com/driver/v2car-lesson2.zip and unzip the download zip file smartcar-lesson2.zip, you will see a folder called smartcar-lesson2.

Step 4: Connect your board to PC with USB cable, Open IDE -> click file -> click Open -> choose code “smartcar-lesson2.ino” in smartcar-lesson2 folder, load the code into your board.

Step 5: Choose corresponding board and port for your project,upload the sketch to the board.

Testing:
Press IR controller keys to control the car movements as per following instruction table:

Note:
1) Please try to align the transmitter port of the IR remote control with the IR receiver head as the picture in the attachment.
2) Please press remote control gently and at regular intervals

Trouble shooting:

Some user found that this IR remote does not work. The reason might be the IR remote sends different button code which does not match our sample code. In order to solve this problem. Please take following steps:
Step A) Get the IR code of each button in your IR remote.
Copy code from following link:https://osoyoo.com/wp-content/uploads/samplecode/irdemo.ino

upload above sketch into your board and open the serial monitor in your upper-right corner.

press the ◄ ► ▲ ▼ “OK” button in your remote, you will see their IR code as following picture:

Write down the IR code of your control buttons ◄ ► ▲ ▼ “OK” button,

STEP B)replace the IR code in lesson 2 sketch file:
Open your Lesson 2 code again, then you will see following lines define the IR CODE of each button:
#define IR_ADVANCE 0x00FF18E7 //code from IR controller “▲” button
#define IR_BACK 0x00FF4AB5 //code from IR controller “▼” button
#define IR_RIGHT 0x00FF5AA5 //code from IR controller “►” button
#define IR_LEFT 0x00FF10EF //code from IR controller “◄” button
#define IR_STOP 0x00FF38C7 //code from IR controller “OK” button
#define IR_turnsmallleft 0x00FFB04F //code from IR controller “#” button
Please change the value of each button in above lines to match the code from Step A). If you don’t know how to change, just Send Email to us and give us the code of each button from Step A), I can help you to change the code and email new sketch file to you.
Above method can also allow you to use other IR sending device (i.e TV remote, DVD remote, air conditioner remote etc) to control the car. Just use Step A) to get the key code of your remote and change the sketch file in Step B), it will work.
Note:
1) Please try to align the transmitter port of the IR remote control with the IR receiver head as the picture in the attachment.
2) Please press remote control gently and at regular intervals