Arduino Robotics Beginner Level
Lesson 10
Robot Car Testing
Presented by Advanced Superlogic Team
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 1
Learning Outcome
1. Able to program mobile car 2 wheel drive
2. Able to program remote control for mobile car
3. Able to connect Bluetooth communication
between remote and mobile car
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 2
Today and Next Week
1. Soccer bot programming, testing, 3D Design
2. Soccer bot competition
3. Assessment (Theory questions, Programming
questions, 3D Design questions)
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 3
Soccer Bot
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 4
Remote control program
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 5
Setup for remote control
Define constant
variable for pin number
of buttons
Make sure every button
is pull up (Use for loop
to configure the list of
buttons
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 6
Setup for remote control
When press the buttons, will
send the message out by
using serial.write command
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 7
Setup for remote control
Read analog value for joystick,
check the value to know what
is the position of joystick XY
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 8
Mobile Car Program
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 9
Setup for mobile car
Configure the pins for
motor driver
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 10
Setup for mobile car
When receive different input message, then
will run different actions. The messages are
from remote control.
For example, when remote control send “1”,
the mobile car will receive “1”, then will make
both dc motor start to turn
M1 Clockwise
M1 Counter Clockwise
M2 Clockwise
M2 Counter Clockwise
M1 M2 Stop
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 11
Setup for mobile car
Analogwrite PWM1 and PWM2 for controlling
the speed from 0 to 255 for both DC motor
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 12
Challenge: Car attachment 3D Design
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 13
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 14
STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Beginner Lesson 15