Alcohol Detection System
Alcohol Detection System
ABSTRACT
Generally, journey in a bus is a safe and comfort factor, but due to increase in number
of busses and passenger its going be tougher now a days and it will be more difficult
for blind people to travel in bus so with this project, we can make a system which can
help blind people to find the bus at the bus stop as they cannot able to see which bus
is coming on the bus stop.
By providing a device which can help them to know which bus is coming on bus stop.
In this project we have microcontroller, RFID reader and Bluetooth for voice
announcement as basic blocks. Whenever the bus come to stop the RFID reader will
be reading the tag (which is given to every bus for particular route) and depending
upon the tag it will give voice intimation by using Bluetooth the blind person can
know the bus number.
INTRODUCTION
Microchip has positioned itself to target the motor control market, where our
advanced designs, progressive process technology and industry leading product
performance enables us to deliver decidedly superior performance over our
competitors, which includes the best of the industry. These products are positioned to
provide a complete product solution for embedded control applications found
throughout the consumer, automotive and industrial control markets. Microchip
products are meeting the unique design requirements of the motion control embedded
applications.
EMBEDDED SYSTEM:
Power supply:
This section is meant for supplying Power to all the sections mentioned above. It
basically consists of a Transformer to step down the 230V ac to 9V ac followed by diodes.
Here diodes are used to rectify the ac to dc. After rectification the obtained rippled dc is
filtered using a capacitor Filter. A positive voltage regulator is used to regulate the obtained
dc voltage.
HC‐05 module is an easy to use Bluetooth SPP (Serial Port Protocol) module,
designed for transparent wireless serial connection setup. The HC-05 Bluetooth
Module can be used in a Master or Slave configuration, making it a great solution for
wireless communication. This serial port Bluetooth module is fully
qualified Bluetooth V2.0+EDR (Enhanced Data Rate)3Mbps Modulation with
complete 2.4GHz radio transceiver and baseband. It uses CSR Blue core 04‐External
single chip Bluetooth system with CMOS technology and with AFH (Adaptive
Frequency Hopping Feature).
RFID MODULE:
POWER SUPPLY:
The power supply is designed to convert high voltage AC mains electricity to
a suitable low voltage supply for electronic circuits and other devices. A power supply
can by broken down into a series of blocks, each of which performs a particular
function. A D.C. power supply which maintains the output voltage constant
irrespective of a.c mains fluctuations or load variations is known as “Regulated D.C
Power Supply”
For example a 5V regulated power supply system as shown below:
Rectifier:
A circuit, which is used to convert a.c to dc, is known as RECTIFIER. The
process of conversion a.c to d.c is called “rectification”
Types of Rectifiers:
Half wave Rectifier
Full wave rectifier
1. Center tap full wave rectifier.
2. Bridge type full bridge rectifier.
Full-wave Rectifier:
From the above comparisons we came to know that full wave bridge rectifier
as more advantages than the other two rectifiers. So, in our project we are using full
wave bridge rectifier circuit.
Bridge Rectifier:
A bridge rectifier makes use of four diodes in a bridge arrangement to achieve
full-wave rectification. This is a widely used configuration, both with individual
diodes wired as shown and with single component bridges where the diode bridge is
wired internally.
Operation:
During positive half cycle of secondary, the diodes D2 and D3 are in forward
biased while D1 and D4 are in reverse biased as shown in the fig(b). The current flow
direction is shown in the fig (b) with dotted arrows.
Fig(24.B)
During negative half cycle of secondary voltage, the diodes D1 and D4 are in
forward biased while D2 and D3 are in reverse biased as shown in the fig(c). The
current flow direction is shown in the fig (c) with dotted arrows.
Fig(24.C)
Filter:
A Filter is a device, which removes the a.c component of rectifier output but allows
the d.c component to reach the load.
Capacitor Filter:
We have seen that the ripple content in the rectified output of half wave
rectifier is 121% or that of full-wave or bridge rectifier or bridge rectifier is 48% such
high percentages of ripples is not acceptable for most of the applications. Ripples can
be removed by one of the following methods of filtering:
(a) A capacitor, in parallel to the load, provides an easier by –pass for the ripples
voltage though it due to low impedance. At ripple frequency and leave the d.c.to
appears the load.
(b) An inductor, in series with the load, prevents the passage of the ripple current (due
to high impedance at ripple frequency) while allowing the d.c (due to low resistance
to d.c)
Type of Rectifier
Parameter Half wave Full wave Bridge
Number of diodes
1 2 3
PIV of diodes
Vm 2Vm Vm
ARDUINO UNO:
The Arduino UNO is an open-source microcontroller board based on
the Microchip ATmega328P microcontroller and developed by Arduino.cc. The board
is equipped with sets of digital and analog input/output (I/O) pins that may be
interfaced to various expansion boards (shields) and other circuits. The board has 14
Digital pins, 6 Analog pins, and programmable with the Arduino IDE (Integrated
Development Environment) via a type B USB cable. It can be powered by a USB
cable or by an external 9 volt battery, though it accepts voltages between 7 and 20
volts. It is also similar to the Arduino Nano and Leonardo. The hardware reference
design is distributed under a Creative Commons Attribution Share-Alike 2.5 license
and is available on the Arduino website.
Layout and production files for some versions of the hardware are also available.
"Uno" means one in Italian and was chosen to mark the release of Arduino Software
(IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the
reference versions of Arduino, now evolved to newer releases. The Uno board is the
first in a series of USB Arduino boards, and the reference model for the Arduino
platform. The ATmega328 on the Arduino Uno comes preprogrammed with a
bootloader that allows uploading new code to it without the use of an external
hardware programmer. It communicates using the original STK500 protocol. The Uno
also differs from all preceding boards in that it does not use the FTDI USB-to-serial
driver chip. Instead, it uses the Atmega16U2 (Atmega8U2 up to version R2)
programmed as a USB-to-serial converter.
Background:
The Arduino project started at the Interaction Design Institute Ivrea (IDII) in Ivrea,
Italy. At that time, the students used a Stamp microcontroller at a cost of $100, a
considerable expense for many students. In 2003 Hernando Barraging created the
development platform Wiring as a Master's thesis project at IDII, under the
supervision of Massimo Banzi and Casey Reas, who are known for work on
the Processing language. The project goal was to create simple, low-cost tools for
creating digital projects by non-engineers. The Wiring platform consisted of a printed
circuit board (PCB) with an ATmega168 microcontroller, an IDE based on Processing
and library functions to easily program the microcontroller. In 2003, Massimo Banzi,
with David Mellis, another IDII student, and David Cuartielles, added support for the
cheaper ATmega8 microcontroller to Wiring. But instead of continuing the work on
Wiring, they forked the project and renamed it Arduino. Early arduino boards used the
FTDI USB-to-serial driver chip and an ATmega168. The Uno differed from all
preceding boards by featuring the ATmega328P microcontroller and an ATmega16U2
(Atmega8U2 up to version R2) programmed as a USB-to-serial converter.
Technical specifications:
PINS:
LED: There is a built-in LED driven by digital pin 13. When the pin is HIGH
value, the LED is on, when the pin is LOW, it's off.
VIN: The input voltage to the Arduino/Genuine board when it's using an
external power source (as opposed to 5 volts from the USB connection or other
regulated power source). You can supply voltage through this pin, or, if supplying
voltage via the power jack, access it through this pin.
5V: This pin outputs a regulated 5V from the regulator on the board. The
board can be supplied with power either from the DC power jack (7 - 20V), the
USB connector (5V), or the VIN pin of the board (7-20V). Supplying voltage via
the 5V or 3.3V pins bypasses the regulator, and can damage the board.
3V3: A 3.3 volt supply generated by the on-board regulator. Maximum current
draw is 50 mA.
GND: Ground pins.
IOREF: This pin on the Arduino/Genuine board provides the voltage reference
with which the microcontroller operates. A properly configured shield can read
the IOREF pin voltage and select the appropriate power source or enable voltage
translators on the outputs to work with the 5V or 3.3V.
Reset: Typically used to add a reset button to shields which block the one on
the board.
Each of the 14 digital pins and 6 Analog pins on the Uno can be used as an input or
output, using pinMode(),digitalWrite(), and digitalRead() functions. They operate at
5 volts. Each pin can provide or receive 20 mA as recommended operating condition
and has an internal pull-up resistor (disconnected by default) of 20-50k ohm. A
maximum of 40mA is the value that must not be exceeded on any I/O pin to avoid
permanent damage to the microcontroller.The Uno has 6 analog inputs, labeled A0
through A5, each of which provide 10 bits of resolution (i.e. 1024 different values).
By default they measure from ground to 5 volts, though is it possible to change the
upper end of their range using the AREF pin and the analog Reference() function.
Serial / UART: pins 0 (RX) and 1 (TX). Used to receive (RX) and transmit
(TX) TTL serial data. These pins are connected to the corresponding pins of the
ATmega8U2 USB-to-TTL Serial chip.
External Interrupts: pins 2 and 3. These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value.
PWM (Pulse Width Modulation): 3, 5, 6, 9, 10, and 11 Can provide 8-bit
PWM output with the analog Write() function.
SPI (Serial Peripheral Interface): 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK).
These pins support SPI communication using the SPI library.
TWI (Two Wire Interface) / I²C: A4 or SDA pin and A5 or SCL pin. Support
TWI communication using the Wire library.
AREF (Analog Reference): Reference voltage for the analog inputs.
Communication:
Rather than requiring a physical press of the reset button before an upload, the
Arduino/Genuino Uno board is designed in a way that allows it to be reset by
software running on a connected computer. One of the hardware flow control lines
(DTR) of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a
100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops
long enough to reset the chip.
This setup has other implications. When the Uno is connected to a computer running
Mac OS X or Linux, it resets each time a connection is made to it from software (via
USB). For the following half-second or so, the bootloader is running on the Uno.
While it is programmed to ignore malformed data (i.e. anything besides an upload of
new code), it will intercept the first few bytes of data sent to the board after a
connection is opened.
Pin Description:
Power Vin, 3.3V, 5V, Vin: Input voltage to Arduino when using an
GND external power source.
Serial 0(Rx), 1(Tx) Used to receive and transmit TTL serial data.
Operating Voltage 5V
Recommended 7-12V
Input Voltage
DC Current on I/O 40 mA
Pins
DC Current on 3.3V 50 mA
Pin
SRAM 2 KB
EEPROM 1 KB
Arduino Nano, Arduino Pro Mini, Arduino Mega, Arduino Due, Arduino Leonardo
Overview
The 14 digital input/output pins can be used as input or output pins by using
pinMode(), digitalRead() and digitalWrite() functions in arduino programming. Each
pin operate at 5V and can provide or receive a maximum of 40mA current, and has
an internal pull-up resistor of 20-50 KOhms which are disconnected by default. Out
of these 14 pins, some pins have specific functions as listed below:
Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and
transmit TTL
serial data. They are connected with the corresponding ATmega328P USB to
TTL serial chip.
External Interrupt Pins 2 and 3: These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value.
PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by
using analogWrite() function.
SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These pins are
used for SPI communication.
In-built LED Pin 13: This pin is connected with an built-in LED, when pin
13 is HIGH – LED is on and when pin 13 is LOW, its off.
Along with 14 Digital pins, there are 6 analog input pins, each of which provide 10
bits of resolution, i.e. 1024 different values. They measure from 0 to 5 volts but this
limit can be increased by using AREF pin with analog Reference() function.
Analog pin 4 (SDA) and pin 5 (SCA) also used for TWI communication using
Wire library.
AREF: Used to provide reference voltage for analog inputs with analog
Reference() function.
Reset Pin: Making this pin LOW, resets the microcontroller.
Communication
When ATmega328 chip is used in place of Arduino Uno, or vice versa, the image
below shows the pin mapping between the two.
1. RFID Tag:
RFID tag includes microchip with radio antenna mounted on substrate which carries
12 Byte unique Identification number.
RFID Tag
2. RFID Reader:
It is used to read unique ID from RFID tags. Whenever RFID tags comes in range,
RFID reader reads its unique ID and transmits it serially to the microcontroller or PC.
RFID reader has transceiver and an antenna mounted on it. It is mostly fixed in
stationary position.
EM18 RFID Reader Module
Basically, RFID systems categorised as active and passive based on how they are
powered and their range.
Inductive coupling, in which RFID reader emits magnetic field and whenever RFID
tags enters the magnetic field which creates energy response from RFID tags and is
detected by RFID reader. As the magnetic field drops sharply with distance, it is used
for short distance applications.
Capacitive coupling, where reader emits electromagnetic waves and whenever that
waves encounters RFID tags, RFID tag reflects signal containing information of ID.
How RFID system works?
RFID Reader has transceiver which generates a radio signal and transmits it through
antenna. This signal itself is in the form of energy which is used to activate and power
the tag.
When RFID tag comes in range of signal transmitted by the reader, transponder in the
tag is hit by this signal. A tag draws power from the electromagnetic field created by
reader. Then, the transponder converts that radio signal into the usable power. After
getting power, transponder sends all the information it has stored in it, such as unique
ID to the RFID reader in the form of RF signal. Then, RFID reader puts this unique
ID data in the form of byte on serial Tx (transmit) pin. This data can be used or
accessed by PC or microcontroller serially using UART communication.
There are various RFID readers available according to their frequency are shown as
follows,
MFRC522,
13.56 MHz 10 cm – 1m Smart cards
SM130
EM18 RFID reader reads the data from RFID tags which contains stored ID which is
of 12 bytes.
EM18 RFID reader doesn’t require line-of-sight. Also, it has identification range
which is short i.e. in few centimetres.
When we bring RFID tag near to the reader, it reads the data from the tag and
immediately transmits 12-byte unique ID on the serial port.
These checksum bytes will be the XOR result of 1st 10 bytes, i.e. Tag no.
HC-05 Bluetooth Module:
HC-05 Bluetooth module provides switching mode between master and slave mode
which means it able to use neither receiving nor transmitting data.
Comparing it to the HC-06 module, which can only be set as a Slave, the HC-05 can
be set as Master as well which enables making a communication between two
separate Arduino Boards.
You can use Bluetooth module simply for a serial port replacement to establish
connection between MCU, PC to your embedded project and etc.
HC-05 Specifications
Pin Description
It has 6 pins,
this pin operates in data mode. Key/EN pin should be high to operate Bluetooth in
command mode. The default baud rate of HC-05 in command mode is 38400bps and
Data mode: Exchange of data between devices. Baud rate is 9600bps in data
mode.
Command mode: It uses AT commands which are used to change setting of
HC-05. Baud rate is 38400bps in command mode.
HC-05 Bluetooth
Package Information
HC-05
HC-05 Bluetooth
Hardware
For HC-05 Bluetooth Hardware Package details you can refer the document which we
have provided at the end of article.
HC-05 HC-06
Master and slave mode can be switched Master and slave mode can’t be switched
Password:1234 Password:1234
Default communication baud rate: 9600, Default communication baud rate: 9600, 1200-1.3M are
4800-1.3M are settable. settable.
During the communication mode, by
During the communication mode, the module can’t enter to
setting PIN34 to high the module can enter
the AT mode.
to the AT mode.
HC- 05 vs HC-06
6.
7.
Applications
Modes of Operation
a) Way 1:
b) Way 2:
3. Notes
HC-03 and HC-05’s command should end up with “\r\n”. It’s different from
HC-04 and HC-06 (They don’t need terminator).
The most common commands for HC-03 and HC-05 are: AT+ROLE (set
master –slave), AT+CMODE( set address pairing) , AT+PSWD (set
password). If you want the master module has the function of remembering
slave module, the most simply way is: First, set AT+CMODE=1. Make the
master module pair with the slave module. Second, set AT+CMODE=0. Then
the master module just can make pair with that specified slave module.
When PIN34 keeps high level, all commands can be used. Otherwise, only
some of them can be used.
SOFTWARE DISCRIPTION
Writing Sketches:
Programs written using Arduino Software (IDE) are called sketches. These sketches
are written in the text editor and are saved with the file extension .ino. The editor
has features for cutting/pasting and for searching/replacing text. The message area
gives feedback while saving and exporting and also displays errors. The console
displays text output by the Arduino Software (IDE), including complete error
messages and other information. The bottom righthand corner of the window
displays the configured board and serial port. The toolbar buttons allow you to verify
and upload programs, create, open, and save sketches, and open the serial monitor.
NB: Versions of the Arduino Software (IDE) prior to 1.0 saved sketches with the
extension .pde. It is possible to open these files with version 1.0, you will be
prompted to save the sketch with the .ino extension on save.
Verify
Checks your code for errors compiling it.
Upload
Compiles your code and uploads it to the configured board.
See uploading below for details.
Note: If you are using an external programmer with your board, you can
hold down the "shift" key on your computer when using this icon. The text
will change to "Upload using Programmer"
New
Creates a new sketch.
Open
Presents a menu of all the sketches in your sketchbook. Clicking one will
open it within the current window overwriting its content.
Note: due to a bug in Java, this menu doesn't scroll; if you need to open a
sketch late in the list, use the File | Sketchbookmenu instead.
Save
Saves your sketch.
Serial Monitor
Opens the serial monitor.
File
New
Creates a new instance of the editor, with the bare minimum structure of a sketch
already in place.
Open
Allows to load a sketch file browsing through the computer drives and folders.
Open Recent
Provides a short list of the most recent sketches, ready to be opened.
Sketchbook
Shows the current sketches within the sketchbook folder structure; clicking on any
name opens the corresponding sketch in a new editor instance.
Examples
Any example provided by the Arduino Software (IDE) or library shows up in this
menu item. All the examples are structured in a tree that allows easy access by topic
or library.
Close
Closes the instance of the Arduino Software from which it is clicked.
Save
Saves the sketch with the current name. If the file hasn't been named before, a name
will be provided in a "Save as.." window.
Save as...
Allows to save the current sketch with a different name.
Page Setup
It shows the Page Setup window for printing.
Print
Sends the current sketch to the printer according to the settings defined in Page Setup.
Preferences
Opens the Preferences window where some settings of the IDE may be customized, as
the language of the IDE interface.
Quit
Closes all IDE windows. The same sketches open when Quit was chosen will be
automatically reopened the next time you start the IDE.
Edit
Undo/Redo
Goes back of one or more steps you did while editing; when you go back, you may go
forward with Redo.
Cut
Removes the selected text from the editor and places it into the clipboard.
Copy
Duplicates the selected text in the editor and places it into the clipboard.
Copy for Forum
Copies the code of your sketch to the clipboard in a form suitable for posting to the
forum, complete with syntax coloring.
Copy as HTML
Copies the code of your sketch to the clipboard as HTML, suitable for embedding in
web pages.
Paste
Puts the contents of the clipboard at the cursor position, in the editor.
Select All
Selects and highlights the whole content of the editor.
Comment/Uncomment
Puts or removes the // comment marker at the beginning of each selected line.
Increase/Decrease Indent
Adds or subtracts a space at the beginning of each selected line, moving the text one
space on the right or eliminating a space at the beginning.
Find
Opens the Find and Replace window where you can specify text to search inside the
current sketch according to several options.
Find Next
Highlights the next occurrence - if any - of the string specified as the search item in
the Find window, relative to the cursor position.
Find Previous
Highlights the previous occurrence - if any - of the string specified as the search item
in the Find window relative to the cursor position.
Sketch
Verify/Compile
Checks your sketch for errors compiling it; it will report memory usage for code and
variables in the console area.
Upload
Compiles and loads the binary file onto the configured board through the configured
Port.
Upload Using Programmer
This will overwrite the bootloader on the board; you will need to use Tools > Burn
Bootloader to restore it and be able to Upload to USB serial port again. However, it
allows you to use the full capacity of the Flash memory for your sketch. Please note
that this command will NOT burn the fuses. To do so a Tools -> Burn
Bootloader command must be executed.
Export Compiled Binary
Saves a .hex file that may be kept as archive or sent to the board using other tools.
Show Sketch Folder
Opens the current sketch folder.
Include Library
Adds a library to your sketch by inserting #include statements at the start of your
code. For more details, see libraries below. Additionally, from this menu item you can
access the Library Manager and import new libraries from .zip files.
Add File...
Adds a source file to the sketch (it will be copied from its current location). The new
file appears in a new tab in the sketch window. Files can be removed from the sketch
using the tab menu accessible clicking on the small triangle icon below the serial
monitor one on the right side o the toolbar.
Tools
Auto Format
This formats your code nicely: i.e. indents it so that opening and closing curly braces
line up, and that the statements inside curly braces are indented more.
Archive Sketch
Archives a copy of the current sketch in .zip format. The archive is placed in the same
directory as the sketch.
Fix Encoding & Reload
Fixes possible discrepancies between the editor char map encoding and other
operating systems char maps.
Serial Monitor
Opens the serial monitor window and initiates the exchange of data with any
connected board on the currently selected Port. This usually resets the board, if the
board supports Reset over serial port opening.
Board
Select the board that you're using. See below for descriptions of the various boards.
Port
This menu contains all the serial devices (real or virtual) on your machine. It should
automatically refresh every time you open the top-level tools menu.
Programmer
For selecting a harware programmer when programming a board or chip and not using
the onboard USB-serial connection. Normally you won't need this, but if
you're burning a bootloader to a new microcontroller, you will use this.
Burn Bootloader
The items in this menu allow you to burn a bootloader onto the microcontroller on an
Arduino board. This is not required for normal use of an Arduino or Genuino board
but is useful if you purchase a new ATmega microcontroller (which normally come
without a bootloader). Ensure that you've selected the correct board from
the Boards menu before burning the bootloader on the target board. This command
also set the right fuses.
Help
Here you find easy access to a number of documents that come with the Arduino
Software (IDE). You have access to Getting Started, Reference, this guide to the IDE
and other documents locally, without an internet connection. The documents are a
local copy of the online ones and may link back to our online website.
Find in Reference
This is the only interactive function of the Help menu: it directly selects the relevant
page in the local copy of the Reference for the function or command under the cursor.
Sketchbook
The Arduino Software (IDE) uses the concept of a sketchbook: a standard place to
store your programs (or sketches). The sketches in your sketchbook can be opened
from the File > Sketchbook menu or from the Open button on the toolbar. The first
time you run the Arduino software, it will automatically create a directory for your
sketchbook. You can view or change the location of the sketchbook location from
with the Preferences dialog.
Beginning with version 1.0, files are saved with a .ino file extension. Previous
versions use the .pde extension. You may still open .pde named files in version 1.0
and later, the software will automatically rename the extension to .ino.
Uploading
Before uploading your sketch, you need to select the correct items from the Tools >
Board and Tools > Port menus. The boards are described below. On the Mac, the
serial port is probably something like /dev/tty.usbmodem241 (for an Uno or
Mega2560 or Leonardo) or /dev/tty.usbserial-1B1 (for a Duemilanove or earlier USB
board), or /dev/tty.USA19QW1b1P1.1 (for a serial board connected with a Keyspan
USB-to-Serial adapter). On Windows, it's probably COM1 or COM2 (for a serial
board) or COM4, COM5, COM7, or higher (for a USB board) - to find out, you look for
USB serial device in the ports section of the Windows Device Manager. On Linux, it
should be /dev/ttyACMx , /dev/ttyUSBx or similar. Once you've selected the correct
serial port and board, press the upload button in the toolbar or select
the Upload item from the Sketch menu. Current Arduino boards will reset
automatically and begin the upload. With older boards (pre-Diecimila) that lack auto-
reset, you'll need to press the reset button on the board just before starting the
upload. On most boards, you'll see the RX and TX LEDs blink as the sketch is
uploaded. The Arduino Software (IDE) will display a message when the upload is
complete, or show an error.
When you upload a sketch, you're using the Arduino bootloader, a small program
that has been loaded on to the microcontroller on your board. It allows you to
upload code without using any additional hardware. The bootloader is active for a
few seconds when the board resets; then it starts whichever sketch was most
recently uploaded to the microcontroller. The bootloader will blink the on-board (pin
13) LED when it starts (i.e. when the board resets).
Libraries
Libraries provide extra functionality for use in sketches, e.g. working with hardware
or manipulating data. To use a library in a sketch, select it from the Sketch > Import
Library menu. This will insert one or more #include statements at the top of the
sketch and compile the library with your sketch. Because libraries are uploaded to
the board with your sketch, they increase the amount of space it takes up. If a sketch
no longer needs a library, simply delete its #includestatements from the top of your
code.
There is a list of libraries in the reference. Some libraries are included with the
Arduino software. Others can be downloaded from a variety of sources or through
the Library Manager. Starting with version 1.0.5 of the IDE, you do can import a
library from a zip file and use it in an open sketch. See these instructions for
installing a third-party library.
Third-Party Hardware
Support for third-party hardware can be added to the hardware directory of your
sketchbook directory. Platforms installed there may include board definitions (which
appear in the board menu), core libraries, bootloaders, and programmer definitions.
To install, create the hardware directory, then unzip the third-party platform into its
own sub-directory. (Don't use "arduino" as the sub-directory name or you'll override
the built-in Arduino platform.) To uninstall, simply delete its directory.
For details on creating packages for third-party hardware, see the Arduino IDE 1.5
3rd party Hardware specification.
Serial Monitor
This displays serial sent from the Arduino or Genuino board over USB or serial
connector. To send data to the board, enter text and click on the "send" button or
press enter. Choose the baud rate from the drop-down menu that matches the rate
passed to Serial.begin in your sketch. Note that on Windows, Mac or Linux the board
will reset (it will rerun your sketch) when you connect with the serial monitor. Please
note that the Serial Monitor does not process control characters; if your sketch
needs a complete management of the serial communication with control characters,
you can use an external terminal program and connect it to the COM port assigned
to your Arduino board.
You can also talk to the board from Processing, Flash, MaxMSP, etc (see
the interfacing page for details).
Preferences
Some preferences can be set in the preferences dialog (found under
the Arduino menu on the Mac, or File on Windows and Linux). The rest can be found
in the preferences file, whose location is shown in the preference dialog.
Language Support
Since version 1.0.1 , the Arduino Software (IDE) has been translated into 30+
different languages. By default, the IDE loads in the language selected by your
operating system. (Note: on Windows and possibly Linux, this is determined by the
locale setting which controls currency and date formats, not by the language the
operating system is displayed in.)
If you would like to change the language manually, start the Arduino Software (IDE)
and open the Preferences window. Next to the Editor Language there is a dropdown
menu of currently supported languages. Select your preferred language from the
menu, and restart the software to use the selected language. If your operating
system language is not supported, the Arduino Software (IDE) will default to English.
You can return the software to its default setting of selecting its language based on
your operating system by selecting System Default from the Editor Language drop-
down. This setting will take effect when you restart the Arduino Software (IDE).
Similarly, after changing your operating system's settings, you must restart the
Arduino Software (IDE) to update it to the new default language.
Boards
The board selection has two effects: it sets the parameters (e.g. CPU speed and baud
rate) used when compiling and uploading sketches; and sets and the file and fuse
settings used by the burn bootloader command. Some of the board definitions differ
only in the latter, so even if you've been uploading successfully with a particular
selection you'll want to check it before burning the bootloader. You can find a
comparison table between the various boards here.
Arduino Software (IDE) includes the built in support for the boards in the following
list, all based on the AVR Core. The Boards Manager included in the standard
installation allows to add support for the growing number of new boards based on
different cores like Arduino Due, Arduino Zero, Edison, Galileo and so on.
Arduino Yùn
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O
and 7 PWM.
Arduino/Genuino Uno
An ATmega328P running at 16 MHz with auto-reset, 6 Analog In, 14 Digital I/O and
6 PWM.
Arduino Diecimila or Duemilanove w/ ATmega168
An ATmega168 running at 16 MHz with auto-reset.
Arduino Nano w/ ATmega328P
An ATmega328P running at 16 MHz with auto-reset. Has eight analog inputs.
Arduino/Genuino Mega 2560
An ATmega2560 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O
and 15 PWM.
Arduino Mega
An ATmega1280 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O
and 15 PWM.
Arduino Mega ADK
An ATmega2560 running at 16 MHz with auto-reset, 16 Analog In, 54 Digital I/O
and 15 PWM.
Arduino Leonardo
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O
and 7 PWM.
Arduino/Genuino Micro
An ATmega32u4 running at 16 MHz with auto-reset, 12 Analog In, 20 Digital I/O
and 7 PWM.
Arduino Esplora
An ATmega32u4 running at 16 MHz with auto-reset.
Arduino Mini w/ ATmega328P
An ATmega328P running at 16 MHz with auto-reset, 8 Analog In, 14 Digital I/O and
6 PWM.
Arduino Ethernet
Equivalent to Arduino UNO with an Ethernet shield: An ATmega328P running at
16 MHz with auto-reset, 6 Analog In, 14 Digital I/O and 6 PWM.
Arduino Fio
An ATmega328P running at 8 MHz with auto-reset. Equivalent to Arduino Pro or Pro
Mini (3.3V, 8 MHz) w/ ATmega328P, 6 Analog In, 14 Digital I/O and 6 PWM.
Arduino BT w/ ATmega328P
ATmega328P running at 16 MHz. The bootloader burned (4 KB) includes codes to
initialize the on-board bluetooth module, 6 Analog In, 14 Digital I/O and 6 PWM..
LilyPad Arduino USB
An ATmega32u4 running at 8 MHz with auto-reset, 4 Analog In, 9 Digital I/O and 4
PWM.
LilyPad Arduino
An ATmega168 or ATmega132 running at 8 MHz with auto-reset, 6 Analog In, 14
Digital I/O and 6 PWM.
Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328P
An ATmega328P running at 16 MHz with auto-reset. Equivalent to Arduino
Duemilanove or Nano w/ ATmega328P; 6 Analog In, 14 Digital I/O and 6 PWM.
Arduino NG or older w/ ATmega168
An ATmega168 running at 16 MHz without auto-reset. Compilation and upload is
equivalent to Arduino Diecimila or Duemilanove w/ ATmega168, but the bootloader
burned has a slower timeout (and blinks the pin 13 LED three times on reset); 6
Analog In, 14 Digital I/O and 6 PWM.
Arduino Robot Control
An ATmega328P running at 16 MHz with auto-reset.
Arduino Robot Motor
An ATmega328P running at 16 MHz with auto-reset.
Arduino Gemma
An ATtiny85 running at 8 MHz with auto-reset, 1 Analog In, 3 Digital I/O and 2
PWM.
REFERENCES