Experiment No: 2 Title: Introduction to Arduino IDE Software Robotics and Automation – EGCO4110 Done by: MS. Sara Alabri
Agenda - What is Arduino - Popular Arduino Types (UNO and Mega) Introduction 01 Parts of the IDE main screen Arduino IDE Software 02 Arduino with LED -Traffic light Activity 1 03 Servo Motor controlled by potentiometer Servo Motor (Knob and Sweep) Experiment 3 04 Ultrasonic Distance Sensor using Arduino Experiment 4 05
Objective To be Familiarization with Arduino IDE Software To know how to Setup and Configuration Arduino IDE Software To know how to Writing and Compiling Code
Introduction
What is Arduino Arduino is an open-source hardware and software platform. It consists of a microcontroller board with input and output pins that can be programmed.
What is Microcontroller A microcontroller is a very small computer that has digital electronic devices built into it that helps it control things. It is an “embedded computer system” that continuously repeats software (programming) commands Examples: Arduino Uno, Raspberry Pi, etc.
Popular Arduino Types (UNO and MEGA)
Arduino UNO
Arduino MEGA
Arduino IDE Software
Arduino programs can be divided in three main parts: Structure, Values (variables and constants), and Functions. In this tutorial, we will learn about the Arduino software program, step by step, and how we can write the program without any syntax or compilation error. Arduino IDE Software
Arduino IDE Interface
Software structure consist of two main functions PURPOSE − The setup () function is called when a sketch starts. Use it to initialize the variables, pin modes, start using libraries, etc. The setup function will only run once, after each power up or reset of the Arduino board. PURPOSE − After creating a setup () function, which initializes and sets the initial values, the loop () function does precisely what its name suggests, and loops consecutively, allowing your program to change and respond. Use it to actively control the Arduino board.
Breadboards
Activity 1: This Activity shows the simplest thing you can do with an Arduino to see physical output: it blinks the on-board LED. Circuit: Arduino Board LED 220 ohm resistor Breadboard Jumper Wire Hardware Required
Activity 1: Code:
Activity 2: Traffic Light using Arduino Circuit: Arduino Board LED 220 ohm resistor Breadboard Jumper Wire Hardware Required
Activity 2: Code:
Experiment No: 3 Title: Servo Motor controlled by potentiometer Robotics and Automation – EGCO4110 Done by: MS. Sara Alabri
Experiment 3
- Servo are small motors that can precisely angle their arms to positions between 0 and 180 degrees. - Potentiometers are variable resistors and act as sensors that provide us with a voltage that varies depending on the rotation of the device around its shaft. Servo Motor controlled by potentiometer
Components Required: Arduino Uno Servo Motor potentiometer Breadboard Arduino Software Jumper Wires USB Cable Servo Motor controlled by potentiometer