Professional Documents
Culture Documents
Instructor
Dafizal Derawi
PhD candidate (UTM), B. Eng with Honours (Australia)
CEO of Drabot
Founder of Arduino Drabot Community
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Dafizal Derawi
• CEO, Robotic Systems Enterprise
• Founder of Arduino Drabot Community
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Our activities….
www.facebook.com/drabot.robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Store Department (Online Shop)
https://www.facebook.com/pg/drabot.robotics/shop/
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
“Learn how to be a developer,
rather than a user!”
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 1
UNMANNED GROUND
VEHICLE (UGV)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Introduction
• An unmanned ground vehicle (UGV) is a
vehicle that operates while in contact with the
ground and without an onboard human
presence (pilot).
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
A Gladiator Tactical Unmanned Ground Vehicle
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Remote-Operated
• controlled by a human operator via interface.
• actions are determined by the operator based
upon either direct visual observation or
remote use of sensors such as digital video
cameras.
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Autonomous
• Guardium used by the Israel Defense Forces to
operate as part of the border security
operations.
• uses its sensors to develop some limited
understanding of the environment, which is
then used by control algorithms to determine
the next action to take in the context of a
human provided mission goal
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 2
INTRODUCTION TO
ARDUINO
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
2.1 What is Arduino?
• Google now!!!!
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
2.1 What is Arduino?
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
More details…
• www.arduino.cc
• Training module
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Comparison…
• Parallax Basic Stamp, Netmedia's BX-24, MIT's Handyboard,
and many others offer similar functionality.
• BUT, Arduino:
– Inexpensive
– Cross-platform: Windows, Macintosh OSX, and Linux
operating systems
– Simple, clear programming environment
– Open source and extensible software
– Open source and extensible hardware
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Complete
Arduino-based
system overview
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
2.2.1 Arduino UNO (USA only) &
Genuino UNO (outside USA)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Technical Specification
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
2.2.2 UNO compatible board
(used in this course)
DRABOT UNO
PRODUCT CODE: 201603032
PRICE: RM 40 ONLY
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Arduino UNO vs UNO compatible board
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
1.3 Arduino Software (IDE)
• You can tell your Arduino what to do by
writing code in the Arduino programming
language and using the Arduino development
environment.
• You can download Arduino Software from
– https://www.arduino.cc/en/Main/Software
• For those attend this course, please find
Arduino software inside the Software folder
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 3 COMPONENTS
& ELECTRICAL
FUNDAMENTAL
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
• Open picture of overall system in your training
module folder…
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Arduino Sensor Shield v5.0
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Ultrasonic HC-SR04
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Servo motor (9g Micro Servo)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Bluetooth Transceiver HC-05
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Motor Driver L298N
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
DC Brush Motor
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Compass Module
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Infrared Sensor (IR sensor)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Infrared Receiver & Transmitter
(Remote Control)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Battery
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Electrical Fundamentals
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Analog to Digital Converter
(ADC)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Pulse Width Modulation (PWM)
• To control speed.
• Increase PWM value in order to increase
speed.
• PWM value: 0 – 255 only!!!!
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Serial Communication
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 4
ARDUINO PROGRAMMING
LANGUAGE
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Introduction
• The Arduino language is based on C/C++.
Arduino programs.
• Three main parts:
1) Basic
2) Variables and constants
3) Functions
4) Control Structure
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Basic
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Syntax
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
#include
• #include is used to include outside libraries in your sketch. This
gives the programmer access to a large group of standard C libraries
(groups of pre-made functions), and also libraries written especially
for Arduino.
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
#define
• #define is a useful C component that allows the programmer to give
a name to a constant value before the program is compiled.
• Syntax:
• Example:
#define ledPin 3
// The compiler will replace any mention of ledPin with the
// value 3 at compile time
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Maths operators
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Comparison operators
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Compound operators
• x++ means x = x+ 1
• x-- means x=x-1
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Variables
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Data Type RAM Number Range
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Functions: Digital
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Functions: Analog Input &
PWM (a.k.a Analog Output)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
if
• if, which is used in conjunction with a comparison
operator, tests whether a certain condition has been
reached, such as an input being above a certain
number.
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Format
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
if…else
if (pinFiveInput < 500)
{
// action A
}
else
{
// action B
}
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
if (pinFiveInput < 500)
{
// do Thing A
}
else if (pinFiveInput >= 1000)
{
// do Thing B
}
else
{
// do Thing C
}
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
for
• To repeat a block of statements enclosed in curly braces.
• An increment counter is usually used to increment and
terminate the loop.
• Useful for any repetitive operation, and is often used in
combination with arrays to operate on collections of
data/pins
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 5
GETTING STARTED
(WINDOWS)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
1) Get an ARDUINO UNO / UNO
compatible board and USB cable
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
2) Download and install the
Arduino Software (IDE)
• https://www.arduino.cc/en/Main/Software
• You can choose between the Installer (.exe) and the Zip packages.
• We suggest you use the first one that installs directly everything
you need to use the Arduino Software (IDE), including the drivers.
• With the Zip package you need to install the drivers manually.
• For those attend this course, please find the Arduino Software
inside the Software folder. You don’t need to download this
software.
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
3) Install the board drivers
• UNO compatible board user (used in this
module)
– You may have to install extra drivers for CH340.
– For those attend this course, please find this
driver inside the Software folder. You only need
to double click on the driver file and then
Windows will finish up the driver installation
from there
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
4) Connect the board
• The USB connection with the PC is necessary to
program the board and not just to power it up.
• The Uno and Mega automatically draw power from
either the USB or an external power supply.
• Connect the board to your computer using the USB
cable. The power LED should go on.
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
5) Launch the Arduino Software (IDE)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
6) Open the blink example
• File > Examples >01.Basics > Blink
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
7) Select your board
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
8) Select your serial port
• Select the serial device of the board from the
Tools | Serial Port menu.
• This is likely to be COM3 or higher (COM1 and
COM2 are usually reserved for hardware serial
ports).
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
9) Upload the program
• click the "Upload" button in the environment.
• Wait a few seconds - you should see the RX
and TX leds on the board flashing.
• If the upload is successful, the message "Done
uploading." will appear in the status bar.
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Congratulation!!!
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 6
TUTORIAL
(refer module)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 6
TUTORIAL
(refer module)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
CHAPTER 7
Project
(refer module)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
THANK YOU!!!!
training@drabot.com
011-10880900
(WhatsApp/SMS)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Utusan, 17 Jan 2017
http://www.utusan.com.my/sains-teknologi/teknologi/drabot-bangkit-minat-robotik-1.432619
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics
Drabot in Metro Ahad today (4 Dec 2016)
www.drabot.com Robotic Systems Enterprise - Arduino Drabot Community - Expert in Aerial Robotics