0% found this document useful (0 votes)
4 views32 pages

Arduino Beginner - Lesson 1 - V2

The document is an introductory lesson on Arduino for beginners, covering its components, applications, and programming using the Arduino IDE. It outlines learning outcomes such as understanding Arduino's functionality, performing electrical wiring, and programming LEDs. Various projects, including biped robots, drones, and traffic lights, are presented to demonstrate Arduino's capabilities.

Uploaded by

harleenpangu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views32 pages

Arduino Beginner - Lesson 1 - V2

The document is an introductory lesson on Arduino for beginners, covering its components, applications, and programming using the Arduino IDE. It outlines learning outcomes such as understanding Arduino's functionality, performing electrical wiring, and programming LEDs. Various projects, including biped robots, drones, and traffic lights, are presented to demonstrate Arduino's capabilities.

Uploaded by

harleenpangu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Arduino Robotics Beginner Level

Lesson 1
Introduction of Arduino
Arduino Fundamental I

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 1
Learning Outcome

1. Understand Arduino and its component


2. Understand Arduino and its applications
3. Able to use Arduino IDE
4. Able to do electrical wiring for connecting LED
and Arduino
5. Able to program the LED with different results
and requirements

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 2
Introduction

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 3
What is Arduino?

1. Microcontroller Hardware act


as DIY Robot heart
Arduino boards are equipped with microcontrollers,
which are small integrated circuits that serve as the
brain of your electronic project. These
microcontrollers can be programmed to control
various input and output devices, such as sensors,
motors, LEDs, and displays. Arduino boards
provide a variety of input/output pins and interfaces
for connecting components.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 4
What is Arduino?

2. Open-Source Software with


C++ Programming language
Arduino software, often referred to as the Arduino
IDE (Integrated Development Environment), is a
user-friendly programming environment that allows
you to write, compile, and upload code to the
Arduino board. The IDE uses a simplified version of
the C++ programming language, making it
accessible to beginners while still offering enough
power for more advanced users.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 5
What is Arduino?

3. Strong Community and


Libraries. A lot of fun projects
One of the strengths of Arduino is its active and
supportive community. Thousands of projects,
tutorials, and code examples are available online,
making it easier to learn and troubleshoot.
Additionally, the Arduino platform includes a wide
range of pre-built software libraries that simplify the
process of interacting with various sensors,
actuators, and other components, saving time and
effort in project development.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 6
What Arduino can do?
Biped Robot: A bipedal robot is a two-legged robot
that can walk and perform human-like movements.
Arduino can be used to control the movement of
the robot's legs, process sensor data for balance
and navigation, and implement various walking
gaits. Sensors such as accelerometers,
gyroscopes, and ultrasonic distance sensors can
be used for balance and obstacle avoidance. Servo
motors or stepper motors are commonly used to
actuate the joints of the legs.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 7
What Arduino can do?
Drone: Drones, or quadcopters, are flying vehicles
that can be remotely controlled. Arduino can be
used to control the flight dynamics, motor speed,
and stabilization of the drone. Flight control
algorithms can be implemented to keep the drone
stable and responsive to pilot inputs. Gyroscopes,
accelerometers, barometric pressure sensors, and
GPS modules can provide data for accurate flight
control. Additionally, Arduino can be used for
communication with the remote controller or to
implement autonomous flight modes.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 8
What Arduino can do?
Spider Robot: A spider robot mimics the
movement of a spider, typically using multiple legs
to navigate. Arduino can control the leg
movements, walk patterns, and turning motions.
Servo motors are commonly used for joint
actuation, and the Arduino can implement complex
algorithms to create realistic spider-like movement.
Sensors like infrared or ultrasonic sensors can be
used for obstacle detection and navigation.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 9
What Arduino can do?
Robot Arm: A robot arm is a mechanical structure
with multiple joints and links that can perform
precise movements. Arduino can be used to control
the angles of the robot arm's joints, allowing it to
pick up and manipulate objects. Servo motors or
stepper motors can be used to actuate each joint.
Arduino can also be integrated with sensors, such
as force sensors or encoders, to provide feedback
on the arm's position and interactions with objects.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 10
What Arduino can do?
Robot Car: A robot car is a wheeled vehicle that
can be remotely controlled or programmed to
navigate autonomously. Arduino can control the
movement of the car's wheels, implement obstacle
avoidance algorithms using sensors like ultrasonic
or infrared sensors, and enable communication with
a remote controller or a smartphone app. In more
advanced setups, Arduino can be integrated with
cameras and computer vision algorithms for
features like lane following or object detection.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 11
Type of Arduino Board

Arduino Uno: One of the most popular and widely


used Arduino boards, suitable for beginners and
experienced users alike. It features the ATmega328P
microcontroller and provides a good balance of
features and capabilities.
Arduino Nano: A compact version of the Arduino
Uno, ideal for projects with limited space. It also uses
the ATmega328 microcontroller.
Arduino Mega: This board is larger than the Uno
and Nano and is designed for projects that require
more I/O pins and memory. It uses the ATmega2560
microcontroller.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 12
Arduino Uno

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 13
Breadboard

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 14
Jumper Wires

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 15
LED
Cannot directly connect an LED to a battery or voltage source.
Firstly, because the LED has a positive and a negative lead
and will not light if they are the wrong way around and
secondly, an LED must be used with a resistor to limit the
amount of current flowing through the LED - otherwise the
LED could burn out!

Which is the positive lead of the LED and which the


negative? The positive lead is longer.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 16
Resistors

Resistors resist the flow of


electricity and the higher the
value of the resistor, the more it
resists and the less electrical
current will flow through it. We
are going to use this to control
how much electricity flows
through the LED and therefore
how brightly it shines.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 17
How do we program Arduino?

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 18
Arduino IDE
https://www.arduino.cc/en/software

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 19
Arduino IDE

Verify
(To make sure coding
has compiled correctly)

Upload
(To upload the program
into your Arduino board)

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 20
Arduino IDE

Choose
Arduino Uno

Choose the COM


that related to CH340
showing in device
manager

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 21
Upload to test

1. Choose Board
2. Choose correct
COM Port
3. Click Verify
4. Click Upload
5. Check the terminal
output

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 22
Project Sample

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 23
Project: Control a LED on and off

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 24
Project: Control a LED on and off
// command
This is comment to describe your code, will not
be executed

This means that the code between the curly


brackets, { }, that
follow this statement will run once when the
program starts.

This creates a loop. Everything between the


curly brackets,
{ }, after the loop() statement will run once the
Arduino is powered on
and then repeat until it is powered off.

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 25
Project: Control a LED on and off

Define “led” as integer variable, value is 9

Tells Arduino Pin 9 is an output pin, to send


power to the LED

To set LED to High, to turn it on


Wait 1 second (1000 ms = 1 second)
To set LED to LOW, to turn it off
Wait 1 second

STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 26
CHALLENGE
for : Lesson 1

STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 27
L1 – Challenge 1
Program below action:
1st led on , 2nd led off

Then, led off, 2nd led on

(Repeating)

STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 28
L1 – Challenge 2

Program below:

3 units of LED Red blink together


quickly with 100 ms only

STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 29
L1 – Challenge 3

Program a traffic light with sequence


below:
1. LED Red turns on for 5 sec, other
turn off
2. LED Yellow turns on for 3 sec, other
turn off
3. LED Green turns on for 7 sec, other
turn off

STEM | IR4.0 | Robotics Copyright 2023 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 30
STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 31
STEM | IR4.0 | Robotics Copyright 2024 © Advanced Superlogic Sdn Bhd. All right reserved. Arduino Lesson 32

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy