[go: up one dir, main page]

0% found this document useful (0 votes)
25 views12 pages

INTRODUCTION

The Arduino Workbook provides an introduction to Arduino as an open-source electronics platform, detailing its hardware, software, and programming language. It explains the Arduino UNO specifications, how to run programs, serial communication, and the roles of sensors and actuators in embedded systems. Additionally, it includes practical programming examples and the principles behind sensors and actuators.

Uploaded by

squadbusterrrr3
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)
25 views12 pages

INTRODUCTION

The Arduino Workbook provides an introduction to Arduino as an open-source electronics platform, detailing its hardware, software, and programming language. It explains the Arduino UNO specifications, how to run programs, serial communication, and the roles of sensors and actuators in embedded systems. Additionally, it includes practical programming examples and the principles behind sensors and actuators.

Uploaded by

squadbusterrrr3
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/ 12

Arduino Workbook

INTRODUCTION
Q. What is Arduino?
• Arduino is an open-source electronics platform based on easy-to-use hardware and
software.
• It is the Open-Source Hardware board created in Ivrea, Italy in 2005 by Massimo Banzi &
David Cuartielles.
• The Arduino ecosystem is consisting of the hardware, software tools (Arduino IDE), and the
Arduino programming language.
• Arduino Hardware consists of a small board which is able read the input values from
different sensors and is able to drive different output load.

Q. Why Arduino is mostly preferred in Embedded system projects?


• Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller
platforms.
• Cross-platform - The Arduino Software (IDE) runs on Windows, Macintosh OSX, and
Linux operating systems.
• Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for
beginners, yet flexible enough for advanced users to take advantage of as well.
• Open source and extensible software - The Arduino software is published as open-
source tools, available for extension by experienced programmers.
• Open source and extensible hardware - The plans of the Arduino boards are published
under a Creative Commons license, so experienced circuit designers can make their own
version of the module, extending it and improving it.

Q. What is Arduino UNO?

• The Arduino Uno is a microcontroller board based on the ATmega328.


• It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog
inputs.
• It contains 16 MHz ceramic resonator, a USB connection, a power jack, an ICSP header,
and a reset button.
• Simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter
or battery to get started.

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth
Arduino Workbook
Q. Explain the pin diagram and specification of Arduino UNO board?

Arduino Specification

Microcontroller ATmega328P – 8 bit AVR family microcontroller


Operating Voltage 5V
Recommended Input Voltage 7-12V
Input Voltage Limits 6-20V
Analog Input Pins 6 (A0 – A5)
Digital I/O Pins 14 (Out of which 6 provide PWM output)
DC Current on I/O Pins 40 mA
DC Current on 3.3V Pin 50 mA
Flash Memory 32 KB (0.5 KB is used for Bootloader)
SRAM 2 KB
EEPROM 1 KB
Frequency (Clock Speed) 16 MHz

Arduino Pin diagram

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth
Arduino Workbook
Q. How to run a program in Arduino UNO?
Ans.
1. Install the Arduino IDE: Download and install the Arduino Integrated Development
Environment (IDE).
2. Connect the board: Use a USB cable to connect the board to your computer.
3. Install the board: Install the correct package for your board in the IDE.
4. Create a sketch: Write the instructions you want to run on the microcontroller in a sketch
file.
5. Compile the sketch: Check for errors and convert the code into a binary file.
6. Upload the sketch: Select the correct serial port and upload the code to the board.
7. Use the Serial Monitor: Open the Serial Monitor to view the sketch run and any text
messages.

KNOW ARDUINO PROGRAMMING IDE

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth
Arduino Workbook

Let’s Start Programming

Q1. Write a program to blink led using Arduino.

Hardware Wiring

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth
Arduino Workbook
Q2. Write a program to blink led for 5 times using Arduino

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth
Arduino Workbook
SERIAL COMMUNICATION IN ARDUINO

Q. What is serial communication in Arduino?


• Serial communication is a method that allows an Arduino board to communicate with other
devices, such as a computer or peripheral.
• Serial communication only one bit of information is sent a time .
• The Arduino will send and to receive data from computer.
• This functionality can be used to collect data from the outside environment and allows us to
use the computer for further processing.
• Arduino board has at least one serial port, and the standard ports are named "Serial1" and
so on. The port on the board called "Serial" uses pins 0 and 1 for communication.

Q. How to send and receive the data from Arduino?

• The Arduino IDE has a built-in serial monitor that makes it easier to send and to receive data
from computer.
• This also helps to debug and develop your Arduino code.
• An Arduino board needs to be plugged into your computer in order for the serial monitor to
function.
• Open the serial monitor by clicking on the button in the upper right of your Arduino window.

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth
Arduino Workbook
Arduino Serial library

1. begin () - Used to start the serial communication with the computer.

Syntax: -
Serial.begin(9600);
Example: -
The 9600 is the baud rate for serial communication with the computer.

2. available (): -

Get the number of bytes (characters) available for reading from a software serial port.
This is data that has already arrived and stored in the serial receive buffer.
Syntax: -
Serial.available();
Example: -

3. print() & println()


prints the data on serial monitor
Syntax: -
Serial.print();
Example: -

• Print any string

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth
Arduino Workbook
Println()

Prints the data in new line in serial monitor


Syntax: -
Serial.println();
Example: -

4. read()

Reads incoming serial data coming from computer.

Syntax: -
Serial.read();
Example: -

5. SoftwareSerial()

Create an instance of a SoftwareSerial object. Multiple SoftwareSerial objects


may be created
Syntax: -
SoftwareSerial(rxPin, txPin)
Example: -

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth
Arduino Workbook
Q. Write a simple program to demonstrate serial communication and send serial data from the Arduino
Board

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth
Arduino Workbook
Q. Write a program to Control a LED from computer through serial communication so that when
you press the number “1” the LED should be “ON” and when you press the number “0” the LED
should be “OFF”.

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth
Arduino Workbook
Sensors and Actuators interfacing with Arduino
Q. What is Sensor?
• A sensor is a device that detects and responds to some type of input from the physical
environment.
• The input can be light, heat, motion, moisture, pressure or any number of other
environmental phenomena.
• The output is generally a signal that is converted to a human-readable display at the
sensor location or transmitted electronically over a network for reading or further
processing.
o Example: -DHT11 (Temperature Sensor)
Q. What is actuator?
• An actuator is a device that converts energy into mechanical force to cause a machine
or device to move.
• Actuators can perform a variety of operations, such as rotation, bending, or linear
movement.
o Example: - Electric Lock
Q. Difference between Senor and actuators?

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth
Arduino Workbook
Q. How Do Sensors and Actuators Work?
Working Principle of Sensors
Sensors work based on different principles depending on their type. However, most sensors
operate by detecting a change in physical or environmental properties and converting it into an
electrical signal. Here’s a general overview of how sensors work:
1. Sensing: - The sensor detects a physical change, such as temperature, pressure, or light
intensity.
2. Transduction: - The sensor converts the physical change into an electrical signal.
3. Conditioning: - The electrical signal is amplified, filtered, or processed to enhance
accuracy and compatibility with the control system.
4. Output: - The sensor delivers the processed electrical signal to the control system for
further analysis or action.
Working Principle of Actuators
Actuators, on the other hand, function by transforming electrical energy into mechanical energy
or physical movement. Insulation class Here’s a simplified explanation of the working principle
of actuators:
1. Input: - The actuator receives an electrical signal from a control system.
2. Conversion: - The electrical energy is converted into mechanical action, such as linear
or rotational movement.
3. Output: - The actuator produces the desired physical response or movement, influencing
the system or device it is connected to.

Q. Explain different types of sensors along with its application?

VIGNAN INSTITUTE OF TECHNOLOGY AND MANGEMENT, BERHAMPUR


By V.Srikanth

You might also like