1 Arduino Ppt Intro
1 Arduino Ppt Intro
ARDUINO
MICROCONTROLLER
INTRODUCTION
NODEMCU
ARDUINO YUN ARDUINO DUE
ARDUINO UNO
FEATURES OF ARDUINO UNO
Microcontroller - ATmega328
Operating Voltage - 5V
Input Voltage (recommended) - 7-12V
Input Voltage (limits) - 6-20V
Digital I/O Pins - 14 (of which 6 provide PWM output)
Analog Input Pins - 6
DC Current per I/O Pin - 40 mA
DC Current for 3.3V Pin - 50 mA
Flash Memory - 32 KB (ATmega328) of which 0.5 KB used by bootloader
SRAM - 2 KB (ATmega328)
EEPROM - 1 KB (ATmega328)
Clock Speed -16 MHz
ARDUINO SOFTWARE
OPEN YOUR FIRST PROJECT
1. Once the software starts, you have two options −
Create a new project.
Open an existing project example.
Go to Tools →
Board and select
your board
Step-4 − Select your serial port.
Tools
Serial Port
Step-5
Upload the program to your board.
Loop( ) function
The loop() function does precisely what its name suggests, and
loops consecutively, allowing your program to change and respond
pinMode()
Configures the specified pin to behave either as an input or an output
It is possible to enable the internal pullup resistors with the mode
INPUT_PULLUP. Additionally, the INPUT mode explicitly disables
the internal pullups.
◦ Syntax
pinMode(pin, mode)
◦ Parameters
pin: pin number
mode: INPUT, OUTPUT, or INPUT_PULLUP.
digitalWrite()
Write a HIGH or a LOW value to a digital pin.
If the pin has been configured as an OUTPUT with pinMode(), its voltage
will be set to the corresponding value: 5V for HIGH, 0V (ground)
for LOW.
If the pin is configured as an INPUT, digitalWrite() will enable (HIGH) or
disable (LOW) the internal pullup on the input pin. It is recommended to
set the pinMode() to INPUT_PULLUP to enable the internal pull-up
resistor.
◦ Syntax
digitalWrite(pin, value)
◦ Parameters
pin: the pin number
value: HIGH or LOW
digitalRead()
Description
◦ Reads the value from a specified digital pin,
either HIGH or LOW.
Syntax
◦ digitalRead(pin)
Parameters
◦ pin: the number of the digital pin you want to read
Returns
◦ HIGH or LOW
analogRead()