Keyestudio Ks0428 User manual

1
www.keyestudio.com
Thanks for your support on our products, we will continue to
provide you better quality and service!
Content
*About keyestudio............................................................................................7
*References and After-sales Service........................................................... 8
*Warning............................................................................................................. 8
*Copyright.......................................................................................................... 8
1. Introduction...................................................................................................9
2. Features........................................................................................................ 10
3. Specification................................................................................................11
4.Product List...................................................................................................11
5. Assembly Guide......................................................................................... 18
Step 1: Install Bottom Motor.................................................................. 18
Step 2: Install Driver Wheel.....................................................................20
Step 3: Install the Battery Holder........................................................... 22
Step 4: Mount Acrylic Board and Sensors............................................ 25
Step 5: Install the Servo Platform...........................................................28
Step 6: Install Sensors and Boards.........................................................29
Step 7: Hook-up Guide.........................................................................32
Step 8: Wire Up LED Panel...................................................................35

2
www.keyestudio.com
Step 10: Tank Robot.............................................................................. 43
6. Install Arduino IDE and Driver............................................................... 44
(1) Installing Arduino IDE.................................................................... 44
(2) Keyestudio V4.0 Development Board........................................46
(3) Installing V4.0 board Driver..........................................................49
(4) Install other visions of driver........................................................55
(5) Arduino IDE Setting........................................................................ 58
(6) Start First Program.......................................................................... 61
7. How to Add Libraries?..............................................................................64
8.Projects.......................................................................................................... 68
Project 1: LED Blink................................................................................69
(1) Description................................................................................ 70
(2) Specification..............................................................................70
(3) Equipment................................................................................. 71
(4) V5 Sensor Shield......................................................................71
(5) Test Code....................................................................................73
(6) Test Result..................................................................................74
(7) Code Explanation.....................................................................74
(8) Extension Practice....................................................................75
Project 2: Adjust LED Brightness....................................................... 76
(1) Description................................................................................ 76
(2) Specification..............................................................................78
(3) Equipment................................................................................. 78

3
www.keyestudio.com
(4) Connection Diagram.............................................................. 78
(5) Test Code....................................................................................79
(6) Test Result..................................................................................80
(7) Code Explanation.....................................................................80
Project 3: Photoresistor Sensor..........................................................85
(1) Description................................................................................ 85
(2) Specification..............................................................................86
(3) Equipment................................................................................. 86
(4) Test Code....................................................................................87
(5) Test Result..................................................................................88
(6) Code Explanation.....................................................................88
(7) Extension Practice....................................................................89
Project 4: Servo Control.......................................................................91
(1) Description................................................................................ 91
(2) Specification..............................................................................93
(3) Equipment................................................................................. 94
(4) Connection Diagram:.......................................................... 94
(5) Test Code1................................................................................. 95
(6) Test Code2................................................................................. 97
(7) Test Result..................................................................................98
(8) Code Explanation.....................................................................98
Project 5: Ultrasonic Sensor................................................................99
(1) Description................................................................................ 99

4
www.keyestudio.com
(2) Specification............................................................................100
(3) Equipment............................................................................... 100
(4) The principle of ultrasonic sensor.................................... 101
(5) Connection Diagram............................................................ 103
(6) Test Code................................................................................. 104
(7) Test Result................................................................................106
(8) Code Explanation.................................................................. 106
(9) Extension Practice:................................................................ 107
Project 6: IR Reception....................................................................... 110
(1) Description.............................................................................. 110
(2) Specification............................................................................112
(3) Equipment............................................................................... 112
(4) Connection Diagram............................................................ 113
(5) Test Code................................................................................. 113
(6) Test Result................................................................................115
(7) Code Explanation.................................................................. 116
(8) Extension Practice................................................................. 116
Project 7: Bluetooth Remote Control.............................................119
(1) Description.............................................................................. 119
(2) Specification............................................................................120
(3) Equipment............................................................................... 120
(4) Connection Diagram............................................................ 121
(5) Test Code................................................................................. 121

5
www.keyestudio.com
(6) Download APP........................................................................123
(7) Code Explanation.................................................................. 128
(8) Extension Practice................................................................. 128
Project 8: Motor Driving and Speed Control...............................130
(1) Description.............................................................................. 130
(2) Specification............................................................................131
(3) Drive Robot to Move............................................................133
(4) Equipment............................................................................... 134
(5) Connection Diagram............................................................ 134
(6) Test Code................................................................................. 135
(7) Test Result................................................................................139
(8) Code Explanation.................................................................. 139
(9) Extension Practice................................................................. 139
Project 9: 8*16 LED Board................................................................. 143
(1) Description.............................................................................. 143
(2) Specification............................................................................144
(3) Equipment............................................................................... 144
(4) 8*16 Dot Matrix Display...................................................... 144
(5) Connection Diagram............................................................ 149
(6) Test Code................................................................................. 150
(7) Test Result................................................................................154
(8) Extension Practice................................................................. 154
Project 10: Light Follow Robot........................................................ 161

6
www.keyestudio.com
(1) Description.............................................................................. 161
(2) Connection Diagram............................................................ 163
(3) Test Code.................................................................................165
(4) Test Result............................................................................... 168
Project 11: Ultrasonic Avoid Tank................................................... 169
(1) Description.............................................................................. 169
(2) Flow chart................................................................................ 172
(3) Connection Diagram:........................................................ 172
(4) Test Code:................................................................................173
(5) Test Result............................................................................... 180
Project 12: Ultrasonic Follow Tank..................................................180
(1) Description.............................................................................. 181
(2) Flow chart................................................................................ 182
(3) Connection Diagram............................................................ 182
(4) Test Code.................................................................................183
(5) Test Result............................................................................... 192
Project 13: IR Remote Robot Tank.................................................. 193
(1) Description.............................................................................. 193
(2) Flow Chart............................................................................... 194
(3) Connection Diagram............................................................ 195
(4) Test Code.................................................................................196
(5) Test Result............................................................................... 206
Project 14: Bluetooth Control Robot............................................. 207

7
www.keyestudio.com
(1) Description.............................................................................. 207
(2) Test Code.................................................................................208
(3) Connection Diagram............................................................ 210
(4) Test Code.................................................................................212
(5) Test Result............................................................................... 220
Project 15: Multi-purpose Robot Car.............................................221
(1) Description.............................................................................. 222
(2) Connection Diagram............................................................ 222
(3) Test Code................................................................................. 228
(4) Test Result................................................................................246
9. Resources...................................................................................................247
*About keyestudio
Keyestudio is a best-selling brand owned by KEYES Corporation, our product lines range
from controller boards, shields and sensor modules to smart car and complete starter kits
for Arduino, Raspberry Pi and BBC micro:bit, which designed for customers of any level to
learn electronics and programming knowledge. All of our products comply with
international quality standards and are greatly appreciated in a variety of different markets
throughout the world.
You can obtain the details and the latest information through visiting the following web

8
www.keyestudio.com
sites:http://www.keyestudio.com
*References and After-sales Service
1. Download Profile:https://fs.keyestudio.com/KS0428
2. Feel free to contact us please, if there is missing part or you encounter some troubles.
products continuously based on your sincere advice.
*Warning
1. This product contains tiny parts(screws, copper pillars), keep it out of reach of children
under 7 years old please.
2. This product contains conductive parts (control board and electronic module). Please
operate according to the requirements of this tutorial. Improper operation may cause
overheating and damage parts. Do not touch and immediately disconnect the circuit
power.
*Copyright
The keyestudio trademark and logo are the copyright of KEYES DIY ROBOT co.,LTD. All
products under keyestudio brand can’t be copied, sold and resold without authorization
by anyone or company. If you’ re interested in our items, please contact to our sales
representatives: [email protected]m
Mini Tank Robot V2
(Arduino tutorial)

9
www.keyestudio.com
1. Introduction
Nowadays, technological education such as VR, kids programming,
and artificial intelligence, has become mainstream in educational
industry. Thereby, people attach importance to STEM education.
Arduino is pretty notable in Maker education.
So what is Arduino? Arduino is an open-source electronics platform
based on easy-to-use hardware and software. Arduino boards are
able to read inputs - light on a sensor, a finger on a button, or a
Twitter message - and turn it into an output - activating a motor,
turning on an LED, publishing something online. Based on this,

10
www.keyestudio.com
Keyestudio team has designed a mini tank robot. The tank robot
has a processor which is programmable using the Arduino IDE, to
mapped its pins to sensors and actuators by a shield that plug in
the processor, it reads sensors and controls the actuators and
decides how to operate.
15 learning projects, from simple to complex, will guide you how to
make a smart tank robot on you own and introduce the detailed
knowledge about sensors and modules. Simultaneously, it is
the best choice if you intend to obtain a DIY robot for learning
programming, entertainment and competition requirement.
2. Features
1. Multi-purpose: Obstacle avoidance, follow, IR remote control,
Bluetooth control, light following, ultrasonic follow and displaying
face emoticons.
2. Simple assembly: No soldering circuit required, complete
assembly easily.
3. High Tenacity : Aluminum alloy bracket, metal motors, high
quality wheels and tracks
4. High extension: expand other sensors and modules through
motor driver shield and sensor shield

11
www.keyestudio.com
5. Multiple controls: IR remote control, App control(IOS and
Android system)
6. Basic programming:C language code of Arduino IDE.
3. Specification
Working voltage: 5v
Input voltage: 7-12V
Maximum output current: 2A
Maximum power dissipation: 25W (T=75℃)
Motor speed: 5V 200 rpm/min
Motor drive mode: dual H bridge drive (L298P)
Ultrasonic induction angle: <15 degrees
Ultrasonic detection distance: 2cm-400cm
Infrared remote control distance: 10 meters (measured)
Bluetooth remote control distance: 50 meters (measured)
4.Product List
Make sure no any parts missing please when you get this robot kit.
And if it is, please feel free to contact us.

12
www.keyestudio.com
Electronic Parts
#
Name
QTY
Picture
1
KEYESTUDIO V4.0
Development Board
1
2
L298P Shield
1
3
V5 Sensor Shield
1
4
HC-SR04 Ultrasonic Sensor
1
5
HM-10 Bluetooth-4.0 Module
1
6
Remote Control
1
7
8X16 LED Panel
1

13
www.keyestudio.com
HX-2.54 4P Female Dupont
Line
1
8
9G Servo Motor
1
9
IR Receiver Module
1
10
Photocell Sensor
2
11
Red LED
1
Components
1
Acrylic Board
1
2
Tank Robot Acrylic Board
1

14
www.keyestudio.com
3
Metal Holder
4
4
L-type Bracket
1
5
Tank Driver Wheel
2
6
Tank Load-bearing Wheel
2
7
Caterpillar Band
2
8
Metal Motor
2
9
Plastic Platform (PC)
1
10
USB Cable (1m)
1
11
2.54 3pin F-F Dupont Wire
20cm
5

15
www.keyestudio.com
12
F-F Dupont Wire (15CM)
10
13
Supportive Parts
(27*27*16MM, Blue)
2
14
18650 2-Slot Battery Holder
1
15
(Not included)18650
Battery
2
Tip:We recommend you to purchase it on Ebay or wish
Nuts/Screws
1
Copper Bush
2
2
Flange Bearing
4
3
Hexagon Copper
Bush(M3*10MM)
10
4
Hexagon Copper Bush
(M3*45MM)
4
5
Copper Coupler
2
6
M3*10MM Flat Head Screws
3

16
www.keyestudio.com
7
Inner Hexagon Screws
(M3*6MM)
20
8
Inner Hexagon Screws
(M3*8MM)
10
9
Inner Hexagon Screws
(M3*25MM)
4
10
Inner Hexagon Screws
(M4*12MM)
4
11
Inner Hexagon Screws
(M4*40MM)
4
12
Inner Hexagon Screws
(M4*50MM)
2
13
M3 Nuts
14
14
M4 Self-locking Nuts
2
15
M2 Nuts
8

17
www.keyestudio.com
16
M4 Nuts
10
17
M2*10MM Round Head
Screws
6
18
M3*12MM Round Head
Screws
8
Tools
1
2.0*40MM Blue and Black
Slotted Screwdriver
1
2
2.0*40MM Purple and Black
Phillips Screwdriver
1
3
M1.5 Hex Key Nickel Plated
Allen Wrench
1
4
M2.5 Hex Key Nickel Plated
Allen Wrench
1
5
M3 Hex Key Nickel Plated
Allen Wrench
1
6
Nylon Cable Ties
6
7
8MM Winding Pipe
12CM

18
www.keyestudio.com
5. Assembly Guide
After making an inventory all the parts in this kit, then we need to mount
the tank robot. Let’s install smart car in compliance with the following
instructions.
Note: Peel the plastic film off the board first when installing
smart car.
Step 1: Install Bottom Motor
Prepare the parts as follows:
M4 Nut * 2
Metal Motor *2
Metal Holder *2
Copper Coupler *2
8
Decorative Cardboard
1

19
www.keyestudio.com
Blue Supportive Parts *2
M4*12MM Inner Hex Screw * 2
M1.5 Hex Key Nickel Plated Allen Wrench *1
M3 Hex Key Nickel Plated Allen Wrench *1
M2.5 Hex Key Nickel Plated Allen Wrench *1
M3*8MM Inner Hex Screw * 4

20
www.keyestudio.com
Step 2: Install Driver Wheel
Prepare the parts as follows:
M4*12MM Inner Hex Screw * 2
M4*50MM Inner Hex Screw * 2
Tank Load-bearing Wheel * 2
Flange Bearing * 4
Copper Bush *2
Caterpillar Band *2
M4 Self-locking Nut * 2
M3 Hex Key Nickel Plated Allen Wrench *1
Table of contents
Other Keyestudio Robotics manuals

Keyestudio
Keyestudio Micro:bit Mini Smart Robot Car User manual

Keyestudio
Keyestudio KS0358 User manual

Keyestudio
Keyestudio 4DOF User manual

Keyestudio
Keyestudio Smart Little Turtle Robot V3 User manual

Keyestudio
Keyestudio 4DOF User manual

Keyestudio
Keyestudio 4WD Bluetooth Multi-functional Car User manual
Popular Robotics manuals by other brands

Thames & Kosmos
Thames & Kosmos WindBots 6-IN-1 WIND-POWERED MACHINE KIT Experiment manual

Hyundai Heavy Industries
Hyundai Heavy Industries U Series Installation

BLUE DANUBE ROBOTICS
BLUE DANUBE ROBOTICS AIRSKIN installation guide

ABB
ABB IRB 6660 Product Manual, Spare Parts

AgileX
AgileX TITAN user manual

Xtrem Bots
Xtrem Bots WOKI manual