NILKANTH SOLUTIONS
Welcomes
All of you in
15 Days Online Internship on
Arduino and Sensors
Day 1 01/06/2021
Basics of Arduino
ARDUINO
INFINITY EXISTS
By Hardik Gohil
What is Microcontroller??
Microcontrollers are small computers integrated into a single chip
They contain
1. Processing core
2. Flash Memory for program
3. I/O peripherals
4. RAM
5. Peripherals such as clocks,timers,PWM etc
Microprocessors are used for general purpose applications,while
microcontrollers are self sufficient and are used for specific tasks.
Microcontrollers are an example of embedded systems.
What is ARDUINO??
Arduino is an open-source physical computing platform.
It is a small microcontroller board with a USB plug.
Based on a simple i/o board and a development environment that implements the
Processing/writing language.
Arduino can be used to develop stand-alone interactive objects or can be connected to
software on your computer.
Easy-to-use hardware and software.
It’s intended for students,artists,designers,hobbyists and anyone who tinker with
technology.
It is programmed in Arduino Programming language(APL) similar to C/C++.
Way more easy to program compared to other microcontroller packages.
The Arduino is a microcontroller development platform(not a microcontroller….)
It is the winner of “worlds best interaction award 2012” sponsered by google
ARDUINO
Different flavours!!!
Shields
Printed circuit boards that sit atop an arduino
Plug into the normally supplied pin-headers of arduino.
These are expansions to the base Arduino.
For example:Arduino Ethernet shield,Xbee Shield,Touch Shield etc
External power
Should be between 9V and 12V DC.
Must be rated for a minimum of 250mA current output.
Must have a 2.1mm power plug on the Arduino end.
The plug must be “centre positive”,that is,the middle pin of the plug has to be the + connection
ARDUINO:Software
Arduino boards can be controlled Using an
implementation of Wiring, Which is a version of
Processing developed specifically for electronic I/O.
Arduino looks like Processing, but is actually built in
C,so there are a few differences to look out for.
Arduino. IDE can be downloaded from
http://www.arduino.cc
Currently used version is 1.8.15
Arduino Programming language
Arduino has two reserved functions:
1. void setup()
2. void loop()
There is no pop-up display window,hence void draw() is not special.
Loop() can be considered to do the same thing as draw() for the arduino.
There are three types of variable in Arduino:
i. char
ii. int
iii. long
Arduino has a few reserved constants,which donot need to be defined:
1. HIGH//5 volts
2. LOW//0 volts
3. INPUT//pin is input
4. OUTPUT//pin is output
Steps in Arduino programming
Open the IDE
Write code and logic
Click the verify/compile button to check your program for errors
Attach the arduino via USB to the PC
Install drivers if first time
Setup serial port being used.
Setup board which we need to program.
Click upload code to send code to arduino.
Why Arduino?
It is Open Source,both in terms of Hardware and Software.
It is cheap,(about 350 INR,the cost of going out for pizza)
USB connectivity(MacBooks don’t have serial ports)
More powerful than a BASIC stamp(it costs around 1800 INR)
Simple and easy to use by someone without formal electronics training.Editing and rewriting is often
easier than writing from scratch.That’s where the BeagleBoard falls short.”It has virtually no example
application that you can just copy and hack to learn from”.
We know simple is attractive.
Tinkercad
Tinkercad is a free online collection of software tools that help
people all over the world think, create and make. We’re the ideal
introduction to Autodesk, the leader in 3D design, engineering
and entertainment software.