003 en
003 en
0
Block coding program for Arduino platform
Arduino
MOBILE ROBOT
30 projects
ardublock.ru
Components ArduBlock
Arduino Uno board 2 pcs. 5mm LEDs 1 pc. Active buzzer 1 pc. TSOP1736 1pc.
IR Remote control 1 pc. Dupont cable 20 pcs. Радио модуль R433 L9110S DC driver 1pc.
Driver L298N 1 pc. Ultrasonic rangefinder 1 pc. Twoaxis XY joystick 1pc. Line sensor 2 pcs.
2
Contents ArduBlock
3
Acquaintance and first start ArduBlock
1. Download ArduBlock.zip http://ardublock.ru/index.php?id=download2 #ardu
block
2. Unpack the archive.
3. Installing the compiler Arduino ide.
The path to the file: \install\arduinoide\arduino1.8.5windows.exe
4. Driver Installation for Chinese Boards with Chip CH341
The path to the file: \install\drivearduino\SETUP.EXE
5. Installing Elevate script to connect ArduBlock to Arduino ide
The path to the file: \install\elevate\elevate.exe" Run as admin!
6. Launching the ArduBlock app.
The path to the file: \app\ArduBlock.exe
7. Build the program from blocks.
Please specify the board model and port before uploading.
8. Click Download on the toolbar.
9. The program is compiled and downloaded to the Arduino board.
Board model
Board port
Upload to board
Port monitor
Blocks
Program
Basket
4
My first program ArduBlock
My first Arduino program was Blinking LED.
+
Install the LED on the Arduino board.
The long leg of the LED is a plus at 13 pin.
Minus LED to GND.
lock
#ardub
Let's write a program Blinking LED.
Let's open the ArduBlock application.
5
My first program ArduBlock
If we load our program onto the Arduino board, we will see a simpleLED glow.
And our goal is to achieve blinking of the LED so thatwe continue to work
on the program.
When the LED blinks, we first turn on the LED for sometime and then turn it
off for a certain time, and so on forever, untilthe board will be powered.
Go to the Blocks MenuTime Delay Milliseconds.
Set the block Milliseconds 1000 = 1 second after the LED is turned on.
6
My first program ArduBlock
Change LED signal, Disable.
7
My first program ArduBlock
Let's download the program to the Arduino board. Click Load the program.
lock
#ardub
8
First robot kit ArduBlock
The basis of the robot:
1 PC.
Mounting motors:
4 PC.
M3x30mm screws:
4 PC.
Nuts m3:
4 PC.
Scale 1: 1 mm.
Outlined: For CNC or 3D printing.
9
First robot kit ArduBlock
Wheel: Motor reducer:
2 PC. 2 PC.
M3x5,6 bolts:
16 PC.
or L298N
L9110S
Battery compartment:
1 PC.
Wires: 12 PC.
АА
АА АА
АА
10
Installing motors on the platform ArduBlock
1. Install the center motor holders on the robot platform:
For convenient
workturn overplatform
robot.
11
Installing the front chassis ArduBlock
1. Screw the 4 m3x10 uprights onto the chassis with m3x5.6 bolts.
2. Screw the assembled chassis to the robot platform with m3x5.6 bolts.
12
Installing the Arduino UNO board ArduBlock
1. Screw 2 m3x10 posts onto the board with m3x5.6 screws.
13
Installing the battery compartment ArduBlock
1. Screw 2 m3x10 uprights onto the battery compartment with m3x5,6 screws.
Вкл/Выкл
14
Installing the motor driver ArduBlock
1. Install the motor driver on the base of the robot.
Вкл/Выкл Вкл/Выкл
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
ML MR Motor B Motor A
0
1
2
3
4 0
5 1
6 2
7 VIN 3
GND 4
8 GND 5
9 +5V 6
10 VIN
7
11 GND
12 8 GND
13 9 +5V
10
11
12
13
15
Scheme ArduBlock
16
The first steps of the robot ArduBlock
1. Robot movement: Forward.
L R
L R
L R
L R
17
Robot movement functions ArduBlock
1. To work with the movement of the robot, let's create the movement functions:
2.Rename
function name
Functions:
18
The movement of the robot in time ArduBlock
1. Robot movement in time: The robot performs an action every minute.
В
В А В
А
А
А В
В А
2. Forward function
3. Moving forward
for 1 second
4. Right turn
19
Installing an ultrasonic rangefinder ArduBlock
1. On a piece of doublesided tape, glue the connectors.
2. Install
rangefinder.
3. Glue
rangefinder
to the
compartment
batteries.
Вкл/Выкл
13
12
11
10
9
8
7
6
5
4
3
2
1
0
+5V
pin8 Trig
pin7 Echo
GND
20
Scheme ArduBlock
21
Ultrasonic Sound Ruler ArduBlock
1. Place an object in front of the robot.
1 СМ 2 СМ 3 СМ 4 СМ 5 СМ 6 СМ 7 СМ
The update period for sending the value is set to 200 ms.
Download the program to the Arduino board!
Start:
22
Остановка робота при препятствии ArduBlock
1. If the value on the rangefinder is less than 10, then the robot stops.
10 СМ
STOP
23
Hunter robot, attacking the target ArduBlock
1. If the value on the rangefinder is less than 10, the robot starts moving.
STOP 10 СМ
2. If the value is less than 10, then move forward, if not, then stop.
24
Robot spinning a drum ArduBlock
1. If the value on the rangefinder is less than 10, the robot starts moving.
100 $ lock
#ardub
START Game:
500 $ 10 СМ
0$
STOP 20
0$
50 $
lock
#ardub
2. If the value on the Ultrasonic Rangefinder is less than 10, then the robot
starts turning, with a random value of time from 2 to 5 seconds.
25
Robot, vacuum cleaner ArduBlock
Variable i for storing rotation!
10
STOP
10 СМ
STOP
10 СМ
10 СМ
26
Installing the sensor line on the robot ArduBlock
L R
pin 4 pin 3
+5V +5V 1 Type 1 0
GND GND
0 Type 2 1
m3
m3x40
Вкл/Выкл
L
13
12
11
10
9
8
7
6
5
4
3
2
1
0
27
Scheme ArduBlock
28
The robot is afraid of the black line ArduBlock
29
Robot Mine Finder ArduBlock
1. Install the Buzzer on the robot. Зуммер
+ + 9pin
2. The buzzer will signal that the black GND
mark is on the table. GND + 9pin
PIP STOP +
13
12
11
10
9
8
7
6
5
4
3
2
1
0
+
#ardub
lock
30
Scheme ArduBlock
31
Robot Sumo ArduBlock
1. The robot pushes the cups over the black line.
2. In sight
robot hit
target: a glass.
1. The robot is
spinningin the
search for a goal.
32
Robot Follow the line ArduBlock
1. The robot is moving along the black line.
3 stage
ч
Leftline Rightline
откл б sensor
pin 4
sensor
pin 3
S
V +5V
G GND
вкл
вкл
ч 2 stage
вкл
откл
б
б б 1 stage
вкл
33
Robot Follow the line + stop ArduBlock
1. The robot moves along the black line, if there is an obstacle, then stop.
вкл
1 stage
STOP
вкл
б
б
б
вкл
откл
ч
2 stage
3 stage
ч
откл
вкл
б
34
Robot Joystick Connection ArduBlock
Вкл/Выкл
GND GND
Vcc +5V
X Pin A1
Y Pin A0
13
12
11
10
9
8
7
6
5
4
3
2
1
0
X Pin A1 = 0
Y Pin A0 = 500
35
Scheme ArduBlock
36
Robot Joystick Control ArduBlock
Joystick axes
X Pin A1 = 0
Y Pin A0 = 500
X Pin A1 = 1023
Y Pin A0 = 500
X Pin A1 = 0
X Pin A1 = 1023
Y Pin A0 = 0
Y Pin A0 = 1023
STOP
37
Robot Remote Control ArduBlock
1. Install the ik module on the Arduino board.
Вкл/Выкл
13
12
11
10
9
8
7
6
5
4
3
2
1
0
GND GND
Vcc +5V
S Pin 12
38
Scheme ArduBlock
39
Robot Remote Control ArduBlock
16712445
lock
#ardub
16769055
Вкл/Выкл
16754775
16750695
16748655
0
1
2
3
4
5
6
7
8
9
10
11
12
13
Button code
40
Printing / Cutting ArduBlock
1. Remote controller:
41
Robot Control by R433 ArduBlock
1. Install the joystick on the base of the Console:
GND GND
Vcc +5V
X Pin A1
Y Pin A0
42
Robot Control by R433 ArduBlock
1. Let's write a program for the remote control. Joystick axes
1
X Pin A1 = 0
Y Pin A0 = 500
X Pin A1 = 500
Y Pin A0 = 1023
4 STOP
3
X Pin A1 = 500
STOP 0 Y Pin A0 = 0
X Pin A1 = 1023
Y Pin A0 = 500
STOP
43
Robot Control by R433 ArduBlock
1 GND GND
2 Vcc +5V
3 pin2
13
12
11
10
9
8
7
6
5
4
3
2
1
0
44
Robot Control by R433 ArduBlock
45
Scheme ArduBlock
46
For notes ArduBlock
47
For notes ArduBlock
48
For notes ArduBlock
49
ArduBlock 2.0
Block coding program for Arduino platforms
Arduino mobile robot
30 projects
Publisher: ArduBlock
Site: ardublock.ru
Author: Vitaly Nikolaevich
Email: [email protected]