1.Gives basic idea about what is arduino? and their funtionalites.
2. Applications of arduino
3. Adruino programming
4. what is Nodemcu ?
5. pindiagram of Nodemcu
complete construction, environmental and economics information of biomass com...
Arduino by yogesh t s'
1. Arduino
The open-source electronics prototyping
platform
By,
Yogesh T S,
tsyogesh40@gmail.com,
IT Dept,
Velammal College of Engineering and Technology.
2. Contents
• What is Microcontroller
• What is an Arduino
• History of arduino
• Programming environment
• Advantage of arduino
• Features of arduino
• Applications of arduino
• Arduino v/s Nodemcu
3. Famous microcontroller
manufacturers are MicroChip,
Atmel, Intel, Analog devices,
and more.
[list]
It is a micro-computer. As any
computer it has internal CPU,
RAM, IOs interface.
It is used for control purposes,
and for data analysis.
Micro-Controller
4. What is Arduino?
• “Arduino is an open-source physical computing
platform based on a simple i/o board and a
development environment that implements the
Processing / Wiring language. Arduino can be
used to develop stand-alone interactive objects
or can be connected to software on your
computer.“ ( www.arduino.cc, 2006 )
5. Arduino is a platform
• A physical Input / Output board (I/O) with a programmable
Integrated Circuit (IC).
7. Arduino UNO:Digital output
~: PWM.
0,1: Serial port.
In circuit Serial
programming
Atmel
MicroControlle
r
Analog input.
Power Supply
USB port
Power input
8. Why Arduino?
• It can run standalone from a computer (chip is
programmable) and it has memory (a small
amount).
• It can work with both Digital and Analog
electronic signals. Sensors and Actuators.
• You can make cool stuff! Some people are even
making simple robots, and we all know robots
are just cool.
9. Advantages of Aurdino
Open source
Simplified and user-friendly programming language
No additional programmer/burner hardware
required for programming board
Portable
Low power consumption
10. Features of Arduino UN0
Microcontroller ATmega328
Operating Voltage 5V and 3.3 V
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
14. Arduino IDE
• Also including an Integrated Development
Environment (IDE) for programming.
• The language itself is based in C but is
largely modeled upon the
www.processing.org language.
15. Integer: used with integer variables with value
between 2147483647 and -2147483647.
Ex: int x=1200;
Character: used with single character, represent value
from -127 to 128.
Ex. char c=‘r’;
Long: Long variables are extended size variables for
number storage, and store 32 bits (4 bytes), from -
2,147,483,648 to 2,147,483,647.
Ex. long u=199203;
Floating-point numbers can be as large as
3.4028235E+38 and as low as -3.4028235E+38. They are
stored as 32 bits (4 bytes) of information.
Ex. float num=1.291; [The same as double type]
Data Types and operators
You may need to know about these typed: Array, Boolean, byte, etc. here.
16. Statement represents a command, it ends with ;
Ex:
int x;
x=13;
Operators are symbols that used to indicate a
specific function:
- Math operators: [+,-,*,/,%,^]
- Logic operators: [==, !=, &&, ||]
- Comparison operators: [==, >, <, !=, <=, >=]
Syntax:
; Semicolon, {} curly braces, //single line
comment, /*Multi-line comments*/
Statement and operators
19. Switch case:
switch (var) {
case 1:
//do something when var equals 1
break;
case 2:
//do something when var equals 2
break;
default:
// if nothing else matches, do the default
// default is optional
}
Control statements:
20. Do… while:
do
{
Statements;
}
while(condition); // the statements are run at least
once.
While:
While(condition)
{statements;}
For:
for (int i=0; i <= val; i++){
statements;
}
Loop statements:
Use break statement to stop the loop whenever needed.
21. Void setup()
{
}
//Used to indicate the initial values of system on
starting.
Void loop()
{
}
//Contains the statements that will run whenever
the system is powered after setup.
Code structure:
22. Led blinking example:
Used functions:
pinMode();
digitalRead();
digitalWrite();
delay(time_ms);
other functions:
analogRead();
analogWrite();//PWM.
Input and output:
31. Upload a program
• At this stage we just programmed the LED to blink on and off at a
set time interval.
• Press the reset button on the board and then click ‘Upload to I/O
board’ in the IDE. If all goes well lights should flicker on the board
and the IDE will confirm success.