SlideShare a Scribd company logo
Arduino Programming For
ESD
By Md.Dedarul Hasan
Arduino Programming Basic
❖ Introduction
❖ Programming Concept
❖ Digital And Analog Input Receive
❖ Use Of Condition
❖ Use Of Loop
❖ Use Of Array
❖ LCD Display Simulation With Arduino
❖ Servo Motor Simulation With Arduino
❖ Extra Work
❖ Conclusions
Introduction
Microcontroller
A microcontroller can be considered a self-contained system with a processor, memory
and peripherals and can be used as an embedded system.The majority of microcontrollers
in use today are embedded in other machinery, such as automobiles, telephones,
appliances, and peripherals for computer systems.Microcontrollers are designed for
embedded applications, in contrast to the microprocessors used in personal computers or
other general purpose applications consisting of various discrete chips.
Microcontroller Configuration of Arduino: ATmega328P (used on most recent boards)-Digital I/O
Pins 14 (of which 6 provide PWM output), Analog Input Pins 6 (DIP) or 8 (SMD), DC Current per I/O Pin
40 mA, Flash Memory-32 KB, SRAM -2 KB, EEPROM-1KB
A microcontroller is a single integrated circuit, commonly with the following features:
❖ central processing unit – ranging from small and simple 4-bit processors to complex 32-
bit or 64-bit processors
❖ volatile memory (RAM) for data storage
❖ ROM, EPROM, EEPROM or Flash memory for program and operating parameter storage
❖ discrete input and output bits, allowing control or detection of the logic state of an
individual package pin
❖ serial input/output such as serial ports (UARTs)
❖ other serial communications interfaces like I²C, Serial Peripheral Interface and Controller
Area Network for system interconnect
❖ peripherals such as timers, event counters, PWM generators, and watchdog
❖ clock generator – often an oscillator for a quartz timing crystal, resonator or RC circuit
❖ many include analog-to-digital converters, some include digital-to-analog converters
❖ in-circuit programming and in-circuit debugging support
Microprocessor
Microprocessor has only a CPU inside them in one or few Integrated Circuits. Like
microcontrollers it does not have RAM, ROM and other peripherals. They are dependent on
external circuits of peripherals to work. But microprocessors are not made for specific task but they
are required where tasks are complex and tricky like development of software’s, games and other
applications that require high memory and where input and output are not defined. It may be called
heart of a computer system.
Parts of CPU-
❖ ALU
❖ REGISTER
❖ COUNTER
❖ FLAG
❖ BUS
❖ PROGRAM COUNTER
What is Arduino?
Arduino refers to an open-source electronics platform or board and the software used to program for
embedded system. Arduino is designed to make electronics more accessible to artists, designers,
hobbyists and anyone interested in creating interactive objects or environments.
Component Of Arduino :
❖ Microcontroller-ATmega328P
❖ Power (USB / Barrel Jack)
❖ Pins (5V, 3.3V, GND, Analog, Digital, PWM, AREF)
❖ Reset Button.
❖ Power LED Indicator.
❖ TX RX LEDs.
❖ Voltage Regulator.
Different type of Arduino :
❖ Arduino Uno
❖ Arduino Due
❖ Arduino Mega
❖ Arduino Leonardo
❖ LilyPad
❖ Nano
❖ Mini
❖ Mini Pro
❖ BT
Advantages & Disadvantages of Arduino :
❖ Not much knowledge required to get started.
❖ Fairly low cost, depending on shields you need.
❖ Lots of sketches and shields available.
❖ No external programmer or power supply needed.
Description of Arduino PORT or PINS :
Description of Arduino PORT or PINS :
❖ Analog Reference pin (orange)
❖ Digital Ground (light green)
❖ Digital Pins 2-13 (green)
❖ Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - These pins cannot be used for digital i/o
(digitalRead and digitalWrite) if you are also using serial communication (e.g. Serial.begin).
❖ Reset Button - S1 (dark blue)
❖ In-circuit Serial Programmer (blue-green)
❖ Analog In Pins 0-5 (light blue)
❖ Power and Ground Pins (power: orange, grounds: light orange)
❖ External Power Supply In (9-12VDC) - X1 (pink)
❖ Toggles External Power and USB Power (place jumper on two pins closest to desired supply) -
SV1 (purple)
❖ USB (used for uploading sketches to the board and for serial communication between the board
and the computer; can be used to power the board) (yellow)
Basic Programming Concept
Arduino uses its own programming language, which is similar to C++. However, it's
possible to use Arduino with Python or another high-level programming language like C,
Java. In fact, platforms like Arduino work well with Python, especially for applications
that require integration with sensors and other physical devices
Useful Functions For Arduino:
Void setup() Function :
Void setup is technically a function that you create at the top of each program. Inside the curly brackets is the
code that you want to run one time as soon as the program starts running. You set things like pinMode in this
section. The loop is another function that Arduino uses as a part of its structure.
Declaration :
Void setup() {
//write code here
}
Void Loop() Function :
This is where the bulk of your Arduino sketch is executed. The program starts directly after the opening curly
bracket ( } ), runs until it sees the closing curly bracket ( } ), and jumps back up to the first line in loop() and
starts all over.
Declaration :
Void loop(){
//write code here
}
pinMode() Function :
The pinMode() function is used to configure a specific pin to behave either as an input or an output. It is
possible to enable the internal pull-up resistors with the mode INPUT_PULLUP. Additionally, the INPUT mode
explicitly disables the internal pull-ups.
Declarations :
pinMode(pin-number, OUTPUT); // pin as output
pinMode(pin-number, INPUT); //pin as input
digitalWrite() Function :
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 (or 3.3V on 3.3V boards) for HIGH , 0V (ground) for
LOW.
Declaration :
digitalWrite(pin number, HIGH); //set the pin as high
digitalWrite(pin number, LOW); //set the pin as low
digitalRead () Function :
This function use to read the value from a specified digital pin, either HIGH or LOW. Syntax: digitalRead(pin)
Where, pin: the number of the digital pin you want to read (int).
Declaration :
digitalRead (pin-number) ; //pin value should be HIGH/LOW as output
analogWrite () Function :
The analogWrite Arduino command is used to update the status of analog pins and also used to address the
PWM pins on the board. The PWM pins are 8-bit pins, terming that you can set the duty cycle somewhere
between 0 -255.Writes an analog value (PWM wave) to a pin. Can be used to light a LED at varying
brightnesses or drive a motor at various speeds.
Declaration :
analogWrite(pin number, 0); // set low analog value
analogWrite(pin number, 255); //set high analog value
analogRead() Function :
Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the
Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages
between 0 and 5 volts into integer values between 0 and 1023.
Declaration :
analogRead(pin Number); //it returns high or low
delay() Function :
The way the delay() function works is pretty simple. It accepts a single integer (or number) argument. This
number represents the time (measured in milliseconds). The program should wait until moving on to the next
line of code when it encounters this function.
Declaration :
delay(1000); //delay for 1000ms
Tools & Installations :
To write code we will use arduino development tools by installing it ;
-https://www.arduino.cc/en/main/software
We can also use Tinkarcad.com online autodesk software to code & simulations for arduino both.
-https://www.tinkercad.com/dashboard?type=circuits&collection=designs
LED blink Program With Arduino :
LED blinks With Contrast :
Multiple LED Blinks :
Digital And Analog Input Receive
Digital Input Receive :
Analog Input Receive :
Analog Input Delay :
Use Of Condition
condition : each time through the loop, condition is tested; if it's true , the statement block,
and the increment is executed, then the condition is tested again. When the condition
becomes false , the loop ends. increment : executed each time through the loop when
condition is true .
If ...else condition, boolean condition etc
LED Blink Using Condition :
Condition With Analog Value :
Multiple LED Blink Without Loop :
Use Of Loop
Multiple LED Blink Using For Loop :
Multiple LED Blink Using For Loop :
Use Of Array
Array :
An array is a consecutive group of memory locations that are of the same type. To refer to
a particular location or element in the array, we specify the name of the array and the
position number of the particular element in the array.
All of the methods below are valid ways to create (declare) an array. int myInts[6]; int
myPins[] = {2, 4, 8, 3, 6}; int mySensVals[6] = {2, 4, -8, 3, 2}; char message[6] = "hello";
You can declare an array without initializing it as in myInts. In myPins we declare an array
without explicitly choosing a size.
LED Blink Using Array :
LCD Display Simulation With Arduino
LCD Display Using Arduino :
Servo Motor Simulation With Arduino
A servomotor is a rotary actuator or linear actuator that allows for precise control of
angular or linear position, velocity and acceleration. It consists of a suitable motor coupled
to a sensor for position feedback.
Servo Motor 90 Degree Rotation :
Servo Motor 180 Rotation :
Extra Work : LED Blink Using Push Button
Conclusions :
As a beginner with arduino i am pleased to learn using Tinkarcad.com.Wishing that ,the
feedback by practice i’ll be able to be an expert with that embedded system design.Next, I
shall go for expert and advanced level using arduino.
Thanks

More Related Content

What's hot

PPT ON Arduino
PPT ON Arduino PPT ON Arduino
PPT ON Arduino
Ravi Phadtare
 
Basics of arduino uno
Basics of arduino unoBasics of arduino uno
Basics of arduino uno
Rahat Sood
 
Arduino-Workshop-4.pptx
Arduino-Workshop-4.pptxArduino-Workshop-4.pptx
Arduino-Workshop-4.pptx
HebaEng
 
Arduino course
Arduino courseArduino course
Arduino course
Ahmed Shelbaya
 
Ardui no
Ardui no Ardui no
Ardui no
Amol Sakhalkar
 
Introduction of Arduino Uno
Introduction of Arduino UnoIntroduction of Arduino Uno
Introduction of Arduino Uno
Md. Nahidul Islam
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Gaurav Pandey
 
Arduino Functions
Arduino FunctionsArduino Functions
Arduino Functions
mahalakshmimalini
 
Arduino IDE
Arduino IDE Arduino IDE
Arduino IDE
Mrunal Deshkar
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduinoAhmed Sakr
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Richard Rixham
 
Arduino Microcontroller
Arduino MicrocontrollerArduino Microcontroller
Arduino Microcontroller
Shyam Mohan
 
Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming
Pawan Dubey, PhD
 
Arduino - Classes and functions
Arduino - Classes and functionsArduino - Classes and functions
Arduino - Classes and functions
Emertxe Information Technologies Pvt Ltd
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Green Moon Solutions
 
Arm7 Interfacing examples
Arm7   Interfacing examples Arm7   Interfacing examples
Arm7 Interfacing examples
Dr.YNM
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.ppt
Dr.YNM
 
Programming in Arduino (Part 2)
Programming in Arduino  (Part 2)Programming in Arduino  (Part 2)
Programming in Arduino (Part 2)
Niket Chandrawanshi
 
Arduino
ArduinoArduino
Arduino
vipin7vj
 

What's hot (20)

PPT ON Arduino
PPT ON Arduino PPT ON Arduino
PPT ON Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Basics of arduino uno
Basics of arduino unoBasics of arduino uno
Basics of arduino uno
 
Arduino-Workshop-4.pptx
Arduino-Workshop-4.pptxArduino-Workshop-4.pptx
Arduino-Workshop-4.pptx
 
Arduino course
Arduino courseArduino course
Arduino course
 
Ardui no
Ardui no Ardui no
Ardui no
 
Introduction of Arduino Uno
Introduction of Arduino UnoIntroduction of Arduino Uno
Introduction of Arduino Uno
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
 
Arduino Functions
Arduino FunctionsArduino Functions
Arduino Functions
 
Arduino IDE
Arduino IDE Arduino IDE
Arduino IDE
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino Microcontroller
Arduino MicrocontrollerArduino Microcontroller
Arduino Microcontroller
 
Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming
 
Arduino - Classes and functions
Arduino - Classes and functionsArduino - Classes and functions
Arduino - Classes and functions
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arm7 Interfacing examples
Arm7   Interfacing examples Arm7   Interfacing examples
Arm7 Interfacing examples
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.ppt
 
Programming in Arduino (Part 2)
Programming in Arduino  (Part 2)Programming in Arduino  (Part 2)
Programming in Arduino (Part 2)
 
Arduino
ArduinoArduino
Arduino
 

Similar to Arduino Programming Basic

arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
ssusere5db05
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينو
salih mahmod
 
Arduino intro.pptx
Arduino intro.pptxArduino intro.pptx
Arduino intro.pptx
SanthanaMari11
 
Arduino Foundations
Arduino FoundationsArduino Foundations
Arduino Foundations
John Breslin
 
Arduino and Circuits.docx
Arduino and Circuits.docxArduino and Circuits.docx
Arduino and Circuits.docx
Ajay578679
 
How to use an Arduino
How to use an ArduinoHow to use an Arduino
How to use an Arduino
AntonAndreev13
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Luki B. Subekti
 
Arduino windows remote control
Arduino windows remote controlArduino windows remote control
Arduino windows remote control
VilayatAli5
 
Arduino programming
Arduino programmingArduino programming
Arduino programming
MdAshrafulAlam47
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
Jayanthi Kannan MK
 
Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
Ravikumar Tiwari
 
Introduction to Arduino 16822775 (2).ppt
Introduction to Arduino 16822775 (2).pptIntroduction to Arduino 16822775 (2).ppt
Introduction to Arduino 16822775 (2).ppt
ansariparveen06
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3
Jeni Shah
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
sdcharle
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
mkarlin14
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixels
sdcharle
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
tsyogesh46
 
Neno Project.docx
Neno Project.docxNeno Project.docx
Neno Project.docx
AditiBhushan3
 
Ch_2_8,9,10.pptx
Ch_2_8,9,10.pptxCh_2_8,9,10.pptx
Ch_2_8,9,10.pptx
yosikit826
 
Embedded system application
Embedded system applicationEmbedded system application
Embedded system application
Dhruwank Vankawala
 

Similar to Arduino Programming Basic (20)

arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينو
 
Arduino intro.pptx
Arduino intro.pptxArduino intro.pptx
Arduino intro.pptx
 
Arduino Foundations
Arduino FoundationsArduino Foundations
Arduino Foundations
 
Arduino and Circuits.docx
Arduino and Circuits.docxArduino and Circuits.docx
Arduino and Circuits.docx
 
How to use an Arduino
How to use an ArduinoHow to use an Arduino
How to use an Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino windows remote control
Arduino windows remote controlArduino windows remote control
Arduino windows remote control
 
Arduino programming
Arduino programmingArduino programming
Arduino programming
 
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf4 IOT 18ISDE712  MODULE 4 IoT Physical Devices and End Point-Aurdino  Uno.pdf
4 IOT 18ISDE712 MODULE 4 IoT Physical Devices and End Point-Aurdino Uno.pdf
 
Fun with arduino
Fun with arduinoFun with arduino
Fun with arduino
 
Introduction to Arduino 16822775 (2).ppt
Introduction to Arduino 16822775 (2).pptIntroduction to Arduino 16822775 (2).ppt
Introduction to Arduino 16822775 (2).ppt
 
Arduino cic3
Arduino cic3Arduino cic3
Arduino cic3
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
 
Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
 
Arduino Slides With Neopixels
Arduino Slides With NeopixelsArduino Slides With Neopixels
Arduino Slides With Neopixels
 
Arduino by yogesh t s'
Arduino by yogesh t s'Arduino by yogesh t s'
Arduino by yogesh t s'
 
Neno Project.docx
Neno Project.docxNeno Project.docx
Neno Project.docx
 
Ch_2_8,9,10.pptx
Ch_2_8,9,10.pptxCh_2_8,9,10.pptx
Ch_2_8,9,10.pptx
 
Embedded system application
Embedded system applicationEmbedded system application
Embedded system application
 

More from LITS IT Ltd,LASRC.SPACE,SAWDAGOR BD,FREELANCE BD,iREV,BD LAW ACADEMY,SMART AVI,HEA,HFSAC LTD.

লালমনিরহাট ৩ আসনের ভোট কেন্দ্র সমুহ - LALMONIRHAT 3 SADAR VOTE CENTER ALL
লালমনিরহাট ৩ আসনের ভোট কেন্দ্র সমুহ - LALMONIRHAT 3 SADAR VOTE CENTER ALLলালমনিরহাট ৩ আসনের ভোট কেন্দ্র সমুহ - LALMONIRHAT 3 SADAR VOTE CENTER ALL
লালমনিরহাট ৩ আসনের ভোট কেন্দ্র সমুহ - LALMONIRHAT 3 SADAR VOTE CENTER ALL
LITS IT Ltd,LASRC.SPACE,SAWDAGOR BD,FREELANCE BD,iREV,BD LAW ACADEMY,SMART AVI,HEA,HFSAC LTD.
 
লালমনিরহাট ৩ আসনের ওয়ার্ড সমূহ - LALMONIRHAT 3 WARD LIST ALL
লালমনিরহাট ৩ আসনের ওয়ার্ড সমূহ - LALMONIRHAT 3 WARD LIST ALLলালমনিরহাট ৩ আসনের ওয়ার্ড সমূহ - LALMONIRHAT 3 WARD LIST ALL
লালমনিরহাট ৩ আসনের ওয়ার্ড সমূহ - LALMONIRHAT 3 WARD LIST ALL
LITS IT Ltd,LASRC.SPACE,SAWDAGOR BD,FREELANCE BD,iREV,BD LAW ACADEMY,SMART AVI,HEA,HFSAC LTD.
 
ভূমি সংশ্লিষ্ট অপরাধ প্রতিকার ও প্রতিরোধ ৩৬ নং আইন, ২০২৩,
ভূমি সংশ্লিষ্ট অপরাধ প্রতিকার ও প্রতিরোধ  ৩৬ নং আইন, ২০২৩, ভূমি সংশ্লিষ্ট অপরাধ প্রতিকার ও প্রতিরোধ  ৩৬ নং আইন, ২০২৩,
ভূমি সংশ্লিষ্ট অপরাধ প্রতিকার ও প্রতিরোধ ৩৬ নং আইন, ২০২৩,
LITS IT Ltd,LASRC.SPACE,SAWDAGOR BD,FREELANCE BD,iREV,BD LAW ACADEMY,SMART AVI,HEA,HFSAC LTD.
 
The Bangladesh Legal Practitioner_s and Bar Council Order, 1972.pdf
The Bangladesh Legal Practitioner_s and Bar Council Order, 1972.pdfThe Bangladesh Legal Practitioner_s and Bar Council Order, 1972.pdf
The Bangladesh Legal Practitioner_s and Bar Council Order, 1972.pdf
LITS IT Ltd,LASRC.SPACE,SAWDAGOR BD,FREELANCE BD,iREV,BD LAW ACADEMY,SMART AVI,HEA,HFSAC LTD.
 
DIGITAL COMMERCE LAWS & RULES 2021.docx
DIGITAL COMMERCE LAWS & RULES 2021.docxDIGITAL COMMERCE LAWS & RULES 2021.docx
বিবিসি রুলেস ও অরডার, ১৯৭২ বেয়ার এক্ট -BBC BARE ACT.docx
বিবিসি রুলেস ও অরডার, ১৯৭২ বেয়ার এক্ট -BBC BARE ACT.docxবিবিসি রুলেস ও অরডার, ১৯৭২ বেয়ার এক্ট -BBC BARE ACT.docx
বিবিসি রুলেস ও অরডার, ১৯৭২ বেয়ার এক্ট -BBC BARE ACT.docx
LITS IT Ltd,LASRC.SPACE,SAWDAGOR BD,FREELANCE BD,iREV,BD LAW ACADEMY,SMART AVI,HEA,HFSAC LTD.
 
সুঃ প্রতিকার আইন ১৮৭৭ নোট.docx
সুঃ প্রতিকার আইন ১৮৭৭ নোট.docxসুঃ প্রতিকার আইন ১৮৭৭ নোট.docx
সুঃ প্রতিকার আইন ১৮৭৭ নোট.docx
LITS IT Ltd,LASRC.SPACE,SAWDAGOR BD,FREELANCE BD,iREV,BD LAW ACADEMY,SMART AVI,HEA,HFSAC LTD.
 

More from LITS IT Ltd,LASRC.SPACE,SAWDAGOR BD,FREELANCE BD,iREV,BD LAW ACADEMY,SMART AVI,HEA,HFSAC LTD. (20)

লালমনিরহাট ৩ আসনের ভোট কেন্দ্র সমুহ - LALMONIRHAT 3 SADAR VOTE CENTER ALL
লালমনিরহাট ৩ আসনের ভোট কেন্দ্র সমুহ - LALMONIRHAT 3 SADAR VOTE CENTER ALLলালমনিরহাট ৩ আসনের ভোট কেন্দ্র সমুহ - LALMONIRHAT 3 SADAR VOTE CENTER ALL
লালমনিরহাট ৩ আসনের ভোট কেন্দ্র সমুহ - LALMONIRHAT 3 SADAR VOTE CENTER ALL
 
লালমনিরহাট ৩ আসনের ওয়ার্ড সমূহ - LALMONIRHAT 3 WARD LIST ALL
লালমনিরহাট ৩ আসনের ওয়ার্ড সমূহ - LALMONIRHAT 3 WARD LIST ALLলালমনিরহাট ৩ আসনের ওয়ার্ড সমূহ - LALMONIRHAT 3 WARD LIST ALL
লালমনিরহাট ৩ আসনের ওয়ার্ড সমূহ - LALMONIRHAT 3 WARD LIST ALL
 
ভূমি সংশ্লিষ্ট অপরাধ প্রতিকার ও প্রতিরোধ ৩৬ নং আইন, ২০২৩,
ভূমি সংশ্লিষ্ট অপরাধ প্রতিকার ও প্রতিরোধ  ৩৬ নং আইন, ২০২৩, ভূমি সংশ্লিষ্ট অপরাধ প্রতিকার ও প্রতিরোধ  ৩৬ নং আইন, ২০২৩,
ভূমি সংশ্লিষ্ট অপরাধ প্রতিকার ও প্রতিরোধ ৩৬ নং আইন, ২০২৩,
 
CrPC BARE ACT -1898 BANGLA.pdf
CrPC BARE ACT -1898  BANGLA.pdfCrPC BARE ACT -1898  BANGLA.pdf
CrPC BARE ACT -1898 BANGLA.pdf
 
CPC BARE ACT -1908 BANGLA.pdf
CPC BARE ACT -1908  BANGLA.pdfCPC BARE ACT -1908  BANGLA.pdf
CPC BARE ACT -1908 BANGLA.pdf
 
PC BARE ACT -1860 BANGLA.pdf
PC BARE ACT -1860  BANGLA.pdfPC BARE ACT -1860  BANGLA.pdf
PC BARE ACT -1860 BANGLA.pdf
 
SR BARE ACT -1877 BANGLA.pdf
SR BARE ACT -1877  BANGLA.pdfSR BARE ACT -1877  BANGLA.pdf
SR BARE ACT -1877 BANGLA.pdf
 
The Bangladesh Legal Practitioner_s and Bar Council Order, 1972.pdf
The Bangladesh Legal Practitioner_s and Bar Council Order, 1972.pdfThe Bangladesh Legal Practitioner_s and Bar Council Order, 1972.pdf
The Bangladesh Legal Practitioner_s and Bar Council Order, 1972.pdf
 
LA BARE ACT -1908 BANGLA.pdf
LA BARE ACT -1908  BANGLA.pdfLA BARE ACT -1908  BANGLA.pdf
LA BARE ACT -1908 BANGLA.pdf
 
EA BARE ACT -1872 BANGLA.pdf
EA BARE ACT -1872  BANGLA.pdfEA BARE ACT -1872  BANGLA.pdf
EA BARE ACT -1872 BANGLA.pdf
 
DIGITAL COMMERCE LAWS & RULES 2021.docx
DIGITAL COMMERCE LAWS & RULES 2021.docxDIGITAL COMMERCE LAWS & RULES 2021.docx
DIGITAL COMMERCE LAWS & RULES 2021.docx
 
Programming Your Home Automate with Arduino, Android, and Your Computer.pdf
Programming Your Home Automate with Arduino, Android, and Your Computer.pdfProgramming Your Home Automate with Arduino, Android, and Your Computer.pdf
Programming Your Home Automate with Arduino, Android, and Your Computer.pdf
 
Web site Review & Description by tanbircox.pdf
Web site Review & Description by tanbircox.pdfWeb site Review & Description by tanbircox.pdf
Web site Review & Description by tanbircox.pdf
 
Basic Electronics.pdf
Basic Electronics.pdfBasic Electronics.pdf
Basic Electronics.pdf
 
Circuit book_PP.pdf
Circuit book_PP.pdfCircuit book_PP.pdf
Circuit book_PP.pdf
 
Microcontroller.pdf
Microcontroller.pdfMicrocontroller.pdf
Microcontroller.pdf
 
Digital_electronics_dynamic.pdf
Digital_electronics_dynamic.pdfDigital_electronics_dynamic.pdf
Digital_electronics_dynamic.pdf
 
Project Electronics_Copy.pdf
Project Electronics_Copy.pdfProject Electronics_Copy.pdf
Project Electronics_Copy.pdf
 
বিবিসি রুলেস ও অরডার, ১৯৭২ বেয়ার এক্ট -BBC BARE ACT.docx
বিবিসি রুলেস ও অরডার, ১৯৭২ বেয়ার এক্ট -BBC BARE ACT.docxবিবিসি রুলেস ও অরডার, ১৯৭২ বেয়ার এক্ট -BBC BARE ACT.docx
বিবিসি রুলেস ও অরডার, ১৯৭২ বেয়ার এক্ট -BBC BARE ACT.docx
 
সুঃ প্রতিকার আইন ১৮৭৭ নোট.docx
সুঃ প্রতিকার আইন ১৮৭৭ নোট.docxসুঃ প্রতিকার আইন ১৮৭৭ নোট.docx
সুঃ প্রতিকার আইন ১৮৭৭ নোট.docx
 

Recently uploaded

Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 

Recently uploaded (20)

Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 

Arduino Programming Basic

  • 2. Arduino Programming Basic ❖ Introduction ❖ Programming Concept ❖ Digital And Analog Input Receive ❖ Use Of Condition ❖ Use Of Loop ❖ Use Of Array ❖ LCD Display Simulation With Arduino ❖ Servo Motor Simulation With Arduino ❖ Extra Work ❖ Conclusions
  • 3. Introduction Microcontroller A microcontroller can be considered a self-contained system with a processor, memory and peripherals and can be used as an embedded system.The majority of microcontrollers in use today are embedded in other machinery, such as automobiles, telephones, appliances, and peripherals for computer systems.Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications consisting of various discrete chips. Microcontroller Configuration of Arduino: ATmega328P (used on most recent boards)-Digital I/O Pins 14 (of which 6 provide PWM output), Analog Input Pins 6 (DIP) or 8 (SMD), DC Current per I/O Pin 40 mA, Flash Memory-32 KB, SRAM -2 KB, EEPROM-1KB
  • 4. A microcontroller is a single integrated circuit, commonly with the following features: ❖ central processing unit – ranging from small and simple 4-bit processors to complex 32- bit or 64-bit processors ❖ volatile memory (RAM) for data storage ❖ ROM, EPROM, EEPROM or Flash memory for program and operating parameter storage ❖ discrete input and output bits, allowing control or detection of the logic state of an individual package pin ❖ serial input/output such as serial ports (UARTs) ❖ other serial communications interfaces like I²C, Serial Peripheral Interface and Controller Area Network for system interconnect ❖ peripherals such as timers, event counters, PWM generators, and watchdog ❖ clock generator – often an oscillator for a quartz timing crystal, resonator or RC circuit ❖ many include analog-to-digital converters, some include digital-to-analog converters ❖ in-circuit programming and in-circuit debugging support
  • 5. Microprocessor Microprocessor has only a CPU inside them in one or few Integrated Circuits. Like microcontrollers it does not have RAM, ROM and other peripherals. They are dependent on external circuits of peripherals to work. But microprocessors are not made for specific task but they are required where tasks are complex and tricky like development of software’s, games and other applications that require high memory and where input and output are not defined. It may be called heart of a computer system. Parts of CPU- ❖ ALU ❖ REGISTER ❖ COUNTER ❖ FLAG ❖ BUS ❖ PROGRAM COUNTER
  • 6. What is Arduino? Arduino refers to an open-source electronics platform or board and the software used to program for embedded system. Arduino is designed to make electronics more accessible to artists, designers, hobbyists and anyone interested in creating interactive objects or environments. Component Of Arduino : ❖ Microcontroller-ATmega328P ❖ Power (USB / Barrel Jack) ❖ Pins (5V, 3.3V, GND, Analog, Digital, PWM, AREF) ❖ Reset Button. ❖ Power LED Indicator. ❖ TX RX LEDs. ❖ Voltage Regulator.
  • 7. Different type of Arduino : ❖ Arduino Uno ❖ Arduino Due ❖ Arduino Mega ❖ Arduino Leonardo ❖ LilyPad ❖ Nano ❖ Mini ❖ Mini Pro ❖ BT Advantages & Disadvantages of Arduino : ❖ Not much knowledge required to get started. ❖ Fairly low cost, depending on shields you need. ❖ Lots of sketches and shields available. ❖ No external programmer or power supply needed.
  • 8. Description of Arduino PORT or PINS :
  • 9. Description of Arduino PORT or PINS : ❖ Analog Reference pin (orange) ❖ Digital Ground (light green) ❖ Digital Pins 2-13 (green) ❖ Digital Pins 0-1/Serial In/Out - TX/RX (dark green) - These pins cannot be used for digital i/o (digitalRead and digitalWrite) if you are also using serial communication (e.g. Serial.begin). ❖ Reset Button - S1 (dark blue) ❖ In-circuit Serial Programmer (blue-green) ❖ Analog In Pins 0-5 (light blue) ❖ Power and Ground Pins (power: orange, grounds: light orange) ❖ External Power Supply In (9-12VDC) - X1 (pink) ❖ Toggles External Power and USB Power (place jumper on two pins closest to desired supply) - SV1 (purple) ❖ USB (used for uploading sketches to the board and for serial communication between the board and the computer; can be used to power the board) (yellow)
  • 10. Basic Programming Concept Arduino uses its own programming language, which is similar to C++. However, it's possible to use Arduino with Python or another high-level programming language like C, Java. In fact, platforms like Arduino work well with Python, especially for applications that require integration with sensors and other physical devices
  • 12. Void setup() Function : Void setup is technically a function that you create at the top of each program. Inside the curly brackets is the code that you want to run one time as soon as the program starts running. You set things like pinMode in this section. The loop is another function that Arduino uses as a part of its structure. Declaration : Void setup() { //write code here } Void Loop() Function : This is where the bulk of your Arduino sketch is executed. The program starts directly after the opening curly bracket ( } ), runs until it sees the closing curly bracket ( } ), and jumps back up to the first line in loop() and starts all over. Declaration : Void loop(){ //write code here }
  • 13. pinMode() Function : The pinMode() function is used to configure a specific pin to behave either as an input or an output. It is possible to enable the internal pull-up resistors with the mode INPUT_PULLUP. Additionally, the INPUT mode explicitly disables the internal pull-ups. Declarations : pinMode(pin-number, OUTPUT); // pin as output pinMode(pin-number, INPUT); //pin as input digitalWrite() Function : 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 (or 3.3V on 3.3V boards) for HIGH , 0V (ground) for LOW. Declaration : digitalWrite(pin number, HIGH); //set the pin as high digitalWrite(pin number, LOW); //set the pin as low
  • 14. digitalRead () Function : This function use to read the value from a specified digital pin, either HIGH or LOW. Syntax: digitalRead(pin) Where, pin: the number of the digital pin you want to read (int). Declaration : digitalRead (pin-number) ; //pin value should be HIGH/LOW as output analogWrite () Function : The analogWrite Arduino command is used to update the status of analog pins and also used to address the PWM pins on the board. The PWM pins are 8-bit pins, terming that you can set the duty cycle somewhere between 0 -255.Writes an analog value (PWM wave) to a pin. Can be used to light a LED at varying brightnesses or drive a motor at various speeds. Declaration : analogWrite(pin number, 0); // set low analog value analogWrite(pin number, 255); //set high analog value
  • 15. analogRead() Function : Reads the value from the specified analog pin. The Arduino board contains a 6 channel (8 channels on the Mini and Nano, 16 on the Mega), 10-bit analog to digital converter. This means that it will map input voltages between 0 and 5 volts into integer values between 0 and 1023. Declaration : analogRead(pin Number); //it returns high or low delay() Function : The way the delay() function works is pretty simple. It accepts a single integer (or number) argument. This number represents the time (measured in milliseconds). The program should wait until moving on to the next line of code when it encounters this function. Declaration : delay(1000); //delay for 1000ms
  • 16. Tools & Installations : To write code we will use arduino development tools by installing it ; -https://www.arduino.cc/en/main/software We can also use Tinkarcad.com online autodesk software to code & simulations for arduino both. -https://www.tinkercad.com/dashboard?type=circuits&collection=designs
  • 17. LED blink Program With Arduino :
  • 18. LED blinks With Contrast :
  • 20. Digital And Analog Input Receive Digital Input Receive :
  • 23. Use Of Condition condition : each time through the loop, condition is tested; if it's true , the statement block, and the increment is executed, then the condition is tested again. When the condition becomes false , the loop ends. increment : executed each time through the loop when condition is true . If ...else condition, boolean condition etc
  • 24. LED Blink Using Condition :
  • 26. Multiple LED Blink Without Loop :
  • 27. Use Of Loop Multiple LED Blink Using For Loop :
  • 28. Multiple LED Blink Using For Loop :
  • 29. Use Of Array Array : An array is a consecutive group of memory locations that are of the same type. To refer to a particular location or element in the array, we specify the name of the array and the position number of the particular element in the array. All of the methods below are valid ways to create (declare) an array. int myInts[6]; int myPins[] = {2, 4, 8, 3, 6}; int mySensVals[6] = {2, 4, -8, 3, 2}; char message[6] = "hello"; You can declare an array without initializing it as in myInts. In myPins we declare an array without explicitly choosing a size.
  • 30. LED Blink Using Array :
  • 31. LCD Display Simulation With Arduino
  • 32. LCD Display Using Arduino :
  • 33. Servo Motor Simulation With Arduino A servomotor is a rotary actuator or linear actuator that allows for precise control of angular or linear position, velocity and acceleration. It consists of a suitable motor coupled to a sensor for position feedback.
  • 34. Servo Motor 90 Degree Rotation :
  • 35. Servo Motor 180 Rotation :
  • 36. Extra Work : LED Blink Using Push Button
  • 37. Conclusions : As a beginner with arduino i am pleased to learn using Tinkarcad.com.Wishing that ,the feedback by practice i’ll be able to be an expert with that embedded system design.Next, I shall go for expert and advanced level using arduino.