Smart Car DIY Lesson 1: Using Infrared Receiver to control car

Objection

SMARTCAR

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

建议实际出货产品电机需要预焊导线,电池盒预焊DC头,方便不懂电焊的用户使用

Device Name
picture
qty
Arduino UNO
补部件图片100 x 100
1
IR receiver(VS1838)
补部件图片100 x 100
1
IR controller
补部件图片100 X 100
1
Motor with wires
补部件图片100 x 100
4
L298N MOTOR driver module
补部件图片100 X 100
1
power switch
补部件图片100 X 100
1
Box for 18650 3.7V battery+
DC power connector
补部件图片100 X 100
1
voltage meter
补部件图片100 X 100
1
Jumper wires(male-male,male-female,female-female)
补部件图片100 X 100
a bunch

Installation

底盘、电机、L298N电机驱动板以及Arduino UNO安装,请参考第一课中关于电机测试的介绍:http://osoyoo.com/2017/04/23/%e6%99%ba%e8%83%bd%e5%b0%8f%e8%bd%a6diy%e7%ac%ac%e4%b8%80%e8%af%be%ef%bc%9a%e7%94%b5%e6%9c%ba%e9%a9%b1%e5%8a%a8/

 安装红外接收器

用一颗M2*10螺丝及塑料垫将红外接收器固定在较短的一块亚克力板上。

uno+ir remote

Software Installation:

Step 1: Install latest Arduino IDE (If you have Arduino IDE version after 1.1.16, please skip this step)

Download Arduino IDe from https://www.arduino.cc/en/Main/Software?setlang=en , then install the software.

Step 2: Install IRremote library into Arduino IDE (If you have already installed IRremote library, please skip this step)

Down load IRremote library from  http://osoyoo.com/wp-content/uploads/samplecode/IRremote.zip, then import the library into Arduino IDE(in Arduino IDE->Sketch->Import Library->Add Library)

Step 3: Download IRremote small car sample code and run the car with a remote controller.

Sample code download url:http://osoyoo.com/driver/IRremote control.zip

Download above file and load it into Arduino IDE.

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

IR remote key Car activity
Go forward
Go backward
< Left turn
> Right turn
OK Stop

 

カテゴリー: IOT, 测试

Leave a Reply

WordPress spam blocked by CleanTalk.