0% found this document useful (0 votes)
86 views15 pages

Introduction To Arduino and Ide

Arduino is an open-source microcontroller board that allows users to create interactive electronic projects more easily. It contains a microcontroller, power supply, and ports to program and connect the board without requiring complex circuit board design. The Arduino IDE software is used to write code in C/C++ and compile it to run on the Arduino board. Key functions in Arduino code include pinMode() to set pins as input or output, digitalRead() and digitalWrite() to read from and write logic levels to pins, and delay() to pause the program. A sample code turns an LED on and off by using digitalWrite() to switch the pin state and delay() between changes.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
86 views15 pages

Introduction To Arduino and Ide

Arduino is an open-source microcontroller board that allows users to create interactive electronic projects more easily. It contains a microcontroller, power supply, and ports to program and connect the board without requiring complex circuit board design. The Arduino IDE software is used to write code in C/C++ and compile it to run on the Arduino board. Key functions in Arduino code include pinMode() to set pins as input or output, digitalRead() and digitalWrite() to read from and write logic levels to pins, and delay() to pause the program. A sample code turns an LED on and off by using digitalWrite() to switch the pin state and delay() between changes.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 15

Introduction to Arduino

and ide
What is Arduino?
A microcontroller board, that contains on-board power supply, USB port to communicate with
PC, and an Atmel microcontroller chip.
 It simplify the process of creating any control system by providing the standard board that can
be programmed and connected to the system without the need to any sophisticated PCB design
and implementation. 
It is an open source hardware, any one can get the details of its design and modify it or make his
own one himself.
Different Arduino boards
Various ports of Arduino uno
Arduino Uno Technical Specifications

Microcontroller: ATmega328P 8 bit AVR family microcontroller


Operating voltage: 5 V
Recommended input volage: 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: 40mA
Flash memory: 32KB
SRAM: 2KB
EEPROM: 1 KB
Frequency(Clock speed): 16MHZ
The IDE
The IDE stands for “Integrated Development Environment” – This helps us rapidly
develop and deploy programs to our Arduino. Arduino IDE is an open source
software that is mainly used for writing and compiling the code into the Arduino Module.
Arduino provides a Windows Install File to help us install the IDE and the necessary
drivers for communicating with our Arduino.
The ide
The ide
The previous slide shows the basic layout when you open the Arduino IDE.
Typically, Arduino is coded in C++ -- the compiler/assembler will do the rest.
Two methods: setup() and loop() – you may add your own classes for inclusion as
well as writing your own methods to be called.
Setup() is only called once and is typically used to setup ports on your Arduino
among other things.
Loop() is where you put code that you want run until you turn off your Arduino.
Basics of Arduino Programming
It is pretty much the same as any other Programming Languages like c,etc. 
Now we will see some important functions and a Sample Code to turn LEDs on and
off on the next slide.
important functions in Arduino
platform
PinMode(pin, mode); Configures a digital pin to read (input) or write (output) a
digital value.
DigitalRead(pin); Reads a digital value (HIGH or LOW) on a pin set for input.
DigitalWrite(pin, value); Writes the digital value (HIGH or LOW) to a pin set for
output.
Delay(time in ms); Pauses the program for the amount of time (in milliseconds)
specified as parameter.
important functions in Arduino
platform
analogRead(pin):Reads the value from the specified analog pin.
analogWrite(pin):Writes an analog value to a pin.
Serial.println(value):Prints the value to the Serial Monitor on your computer.
Serial.begin(baud rate):Sets the data rate in bits per second (baud) for serial data
transmission.
 Sample Code to turn led on and
off 
Int LED0 = 2;
int delay_time = 100;
void setup() {
pinMode(LED0, OUTPUT); }
void loop() {
digitalWrite(LED0,HIGH);
delay(delay_time);
digitalWrite(LED0,LOW);
}
Sample Code Breakdown
We declare and initialize a variable “LED0” with our Port number (In this instance, it
is 2 but if you had your cable plugged into 13, it would be 13)
We declare and initialize a variable “delay_time.” This sets the time between turning
the LED on/off.
 Setup() is called and we use pinMode to set LED0 as an Output port on the Arduino.
Ports are bi- directional. They can be used as Input or Output.
Sample code breakdown
 After setup() has finished running, the Arduino then calls loop().
In the loop, we have 2 items: digitalWrite and delay.
digitalWrite(LED0,HIGH) turns the LED on.
digitalWrite(LED0,LOW) turns the LED off.
Delay(delay_time) sets how long it is waiting before the next instruction is run on
the Arduino.
Thank you

You might also like