ARDUINO ေရးသားနည္း

Download as pdf or txt
Download as pdf or txt
You are on page 1of 81

 Arduino ?

 Arduino Card
 Arduino Uno
 Arduino Nano
 Arduino Mega
 Arduino Due
 MCU and MPU


 LED ON and OFF example
 Programming Basic
 Library files
 Structures
 Variables
 Function
 Control Structures
 Operators
 External Device Library files
 Arduino Card Library files
 External Power Supply Card
 Arduino Digital OUTPUT
 Arduino Digital INPUT
 Input “PULL OWN‟‟ resistor
 Input “PULLUP‟‟ resistor
 Motion Sensors
 Analog Read and Write
 Variables resistor
 Analog Input Resolution and Output Resolution
 DC motor Variable resistor
 HCSR 04 Ultrasonic Sensor

 1602 LCD (LiquidCrystal Display)
 L298 DC motor driver
 L298 DC motor driver
 DC Relay
 Magnetic Contactor
 DC relay and Magnetic Contactor
 NRF24L01 Wireless Device
 Bluetooth Device
 Bluetooth device
 L298
 Android Phone with ardu Droid
 DC motor
 Battery
 Two axis Joysticks
 Funduino Joystick Shields
 Wireless Control Car
 NRF24L01
 Funduino joystick Shields
 12 volt Battery
 DC motor
 L298 DC motor driver
 ARDUINO STARTER KIT
 74HC595 and 7 Segment Display
 LDR or Photoresistor
 ULN2003 Stepper Motor
 LM35 Temperature sensor
 Flame Sensor
 Ball tilt Sensor
 4*4 membrane Keypad
 DHT11 Humidity and Temperature Sensor
 Buzzer
 IR receiver and IR transmitter
 Max7219 and Matrix LED
 20*4 LCD and I2C Bus
 Four Way Wireless Remote Control Kit
 Node MCU ESP8266 Testing Board
 ESP 8266 Internet Of Things Development Board
 WS2812 RGB LED
 Strain Guage Pressure Sensor
 12volt 0.43amperes Solenoid Electronic Lock and 4*4
Keypad L
 Wireless Exacavator
 ARDUINO MEGA 2No.
 NRF24L01 Wireless Tranceiver 1Set
 Servo Motor 4No.
 L298 Motor Driver 2No.
 Battery 3 Cells 2200Mah 1No.
 DC motor and Wheel 12No.
 Battery Emulator Circuit 1No.
 12 volt LED light 1No.
 Key (Super Cup Motor Cycle) 1No.
 Push Button 1No.
 2 Channel Relay 1No.
 1.5 *4 Battery Case 2No.
 Variable Resistor 2No.
 Toggle Switch 1No.
 Two axis Joystick Shields 4No.
 DC motor 3No.
 Horn 1No.
 Automatic Water Filling System
 ARDUINO UNO
 HCSR04 1No.
 Power Supply Card 1No.
 Magnetic Contactor 1No.
 Overload Relay 1No.
 SafeGuard 1No.
 2 Channel Relay 1No.
 Solenoid 1No.
 Contactors
 Overload and MCB and Fuse and Circuit Breaker Calculations
 AUTO Transfer Switch System
 ARDUINO UNO
 6 Channel Relay 1No.
 12 volt DC relay 2 No.
 220 volt AC relay 2No.
 Magnetic contactor 2No.
 Miniature Circuit Breaker 2No.
 Fuse 4No.
 Power Supply Card 2No.
 DC 12 volt to 5volt Converter 1No.
 DC voltmeter 1No.
 AC voltmeter 2No.
 Cabels
 Contactors
 Cable and Magnetic Contactor and Load Calculations
 Auto Searching Free Space and Avoid Disturbance Car
 Arduino Motor Shield
 Arduino Uno
 Bty
 Servo sg90
 HCSR04
 DC motor Car
 ESC (Electronic Speed Controller )
 BEC (Battery Emulator Circuit )
 Drone Basic
 IMU (Inertial Measure Unit) and Coordinate System
 Motor and Propellers
 Controllers
What is Arduino?

Arduino IC (Chip) ။ PCB


Printed Circuit Board ။
Company ။
Programming Language ။



။ ATmega328P chip ။
chip ။ computer
USB plug ။ external
electronics ၥ
။ ၥ motors, relays , light
sensors, laser diodes, loudspeakers, microphones, etc:
။ Arduino 2005
။ Arduino Board

Document ။

Program Writing , Compling and Uploading the
Programs Into the Boards ။

http:// www.arduino.cc ။

Arduino Uno Power External Power supply port


and usb port ။ ။
7 V to 12V ။ Arduino Uno card Power
Card 5V and 3.3V ။
Power
။ Ground pin(GND) 3 pin ။
analog pin 6 pin (A-0 to A5)
။ A0 to A3 ။
I2C Bus component
။ ။ digital INPUT or OUTPUT
digital pin D0 to D13 (14 pin) ။ D0
and D1 digital INPUT or OUTPUT ။
Serial communication pin UART (Universal Asynchronous

။ digital INPUT or OUTPUT

Arduino Power Power on light ။

Tx and Rx card
communication data sent
and received ။ Test Led pin digital pin
13 ။
LED ။
Arduino (UNO) card
။ ။
OUTPUT
ampere 40mA ။ ampere
။ Card ။ 40mA
5V DC relay ။
5V 12V relay ON or OFF
။ 3.3V Power pin external component or device
50mA device
။ Arduino card Flash memory
Program card Upload Sketch
program memory ။ SRAM
Variable memory ။
variable ။ EEPROM

M ။ Volatile and Non Volatile ။ Volatine


Power
Power ။ Non-Volatile Power
။ Flash and
EEPROM non volatile ။
Program
။ Program

UART Universal Asynchronous


Receive and Transmitter ။
Rx and Tx ။
Sketch
P Arduino Board
။ Board ။

Uno SoftSerial Due and
Mega SoftSerial ။ Serial communication
။ ။ ။

Arduino Nano

arduino nano card arduino Uno Digital


Input or Output 14 pin ။ analog arduino Uno
2 ။ ၈ ။

Arduino Mega
arduino mega Power 7-12V ။
digital pin 54 pin ။ PWM pulse width
modulation pin 14 pin ။ arduino Uno/Nano
။ analog pin 16 pin ။
flash memory 256KB ။
။ ။

Arduino DUE

Arduino Due Output current



။ Microcontroller AT91SAM3X8E
။ Arduino Due Board driver
Install ။ Serial
SoftwareSerial library file
။ Serial1, Serial2,… ။ Software
Serial library file
။ Card ၂ ။ Speed


MCU and MPU

MCU Microcontroller ။ MPU


Microprocessors ။
U PU ။

MCU and MPU ။ U
flash memory ။

။ MCU
Start–Up period Program
executing ။
memory ။ MCU Flash memory
2MB ။

MPU
။ memory external storage
device ။ P store
memory N - ။
external DRAM load ။ execution ။
MPU MCU ။
memory ။ Hard DISK
memory ။ Power ။ U
Power ။ PU Power
။ ။

။ arduino Micro-
Computer Microprocessing unit
။ ။

Installing the softwares

Arduino arduino ide software install


။ Install software Internet
download ။ Computer Internet explore ။ Search box
Arduino ide software free download ။ Arduino ide latest
version download ။
phone Download ။ Phone Internet
Browser ide 1.8.1 ။ arduino .cc link
။ ။ windows ZIP
file for non admin install ။ ။ Just
download ။ Download ။
IDE 1.8.1 ။

'

Download ။
Download ။ ။



။ ။
။ Setting ။ ။
Personal Hotspot ။ Wifi Hotspot

Wifi ။ Connect ။
Wifi Password Password Configuration ။
password ။

DownLoad Install ။ Install arduino ide


zip file ။

Arduino 1.8.1 ။
Arduino.exe double click ။

arduino softwares arduino


card and arduino software ။ driver
installation ။ Download ။
drivers folder ။

drivers folder ။

Windows 64 bit
dpinst-amd64.exe ။ 32bit dpinst-x86 ။
drivers card
arduino nano ။ USB 2.0 drivers
။ Software ။
internet ။ nano card computer ။
device manger ။ Mycomputer>right click>manage ။ Yes ။

nano right click ။ Update driver software


။ Search automatically “ ‟‟ update driver software ။
internet install ။ internet
။ Arduino nano Driver software

Digital Input and Output
။ Arduino
IDE software ။ Arduino IDE software
„„Title bar, menu bar, Option bar‟‟ ။ „„Title bar‟‟
„„arduino version and sketch‟‟ Program name
။ „„menu bar‟‟ „„file, edit, Sketch, Tools, Help‟‟ ။
„„Options bar‟‟ „„verify, upload, New, Open and Save‟‟

„„File‟‟ New Program Page

„„Open‟‟
sketch “Open‟‟ ။

„„Open recent‟‟ Program

။ „„Example‟‟
။ „„close‟‟ arduino IDE
။ „„Save‟‟ Program ။
။ „„Save as‟‟
Program
။ ။

„„Page setup‟‟ Program page


။ ။
“Print‟‟ Program print

„„Edit‟‟ ။

„„Sketch‟‟

„„Sketch‟‟ Verify and compile Program


arduino card upload ။ Sketch menu
Option bar ။ „„Upload‟‟
sketch files card ။ „„Include Library‟‟
L install ။ arduino IDE
။ Bluetooth device
L arduino library

device library Download ။
Sketch > include library >add zip library Download
Zip file ။ arduino ide
software arduino ၥ
။ Library Sketch > include library
>manage library Library install ။
library file install manage library file
manage lib Download

lib Download ။ Library file
။ ။

„„ ‟‟

„„Serial monitor‟‟ device and Computer


data sent and received result ။
analog voltage input Arduino card
„„Serial monitor‟‟ ။

„„Board‟‟ Program Card


။ Computer Card
။ Program ။
„„port‟‟ Card port ။

Card ။

„„Help‟‟

„„Help‟‟ ။

Program, card, IDE ။

Program ။ Digital Output ။ LED1


။ Control
။ digital Input and Outpur function
။ write function output digitalWrite
(pin, Input function digitalRead
(pin); ။ pin Arduino
pin number digitalWrite
function value HIGH digital pin
5V LOW digital pin 0V
။ digitalRead function 5V HIGH
0V LOW ။ 5volt and 0volt

Arduino Card Built In LED


။ IDE software >File
>Examples>Digital>Blink ။ ။
IDE 1.8.1 Examples> Basics ။
P Arduino Flash Memory ။
Program Arduino Card upload
။ Program ။

Verify ။ IDE software


Verify upload ။
Verify Card ။
tools> Board Card port Card
Serial port ။ Upload
။ U ။ Arduino Board
L ။

Arduino Board LED pin 13 Output
။ pinMode(LEDBUILT_IN, OUTPUT); ။ digitalWrite
(LEDBUILTIN , HIGH); Arduinon Card
။ delay (1000); 1seconds ။
digitalWrite(LEDBUILTIN , LOW); Led
။ delay(1000); 1second
။ ။ loop
။ ။
။ digitalWrite
Output LED ။

Led ။
။ ။
။ LED
LED
။ Digital 1 or 0 ။ LED
ON Digital 1 5V ။
Digital 0 0V ။ Analog
Type 1V ,2V , 3V, 4V , 5V ။
Digital 1 or 0 ,Output 5V or 0V ။
။ Arduino ။
Arduino digital pin 0 to 13 ။ digital Control
component L ။
INPUT

digitalWrite(pin,
Value); Function ။ Pin pin
number ။ LED pin 3 digitalWrite(3,HIGH); ။
digitaWrite(3,LOW); ။ DigitalWriteOUTPUT
pinMode(pin,OUTPUT);
။ DigitalReadINPUT pinMode(pin,INPUT);
။ INPUT ။
default ။ digital

။ IDE ။
Arduino Board USB cable Computer ။
LED ။
LED Current and voltage ။

Power ။
power
။ ။
။ Power ။
arduino ON 5V ။
LED Voltage 3 L ။
ၥ Voltage
။ ။ LED
Resistor ။
Resistor ။ LED
volt 3V current 10mA ။ R=V/I (O ‟
equation) ။ arduino digital pin ON 5V
။ LED used volt 3V and current 10mA ။ R=5-3/0.01;
= Ω ။
LED 1

Resistor 270 ohm

Arduino Uno

Bread Board

Jumper wire

arduino card
P AC 220V to DC
5V and 12volt Power card ။
။ ။

Power card 12V, 5V ။


arduino card or other device
Power ။


LED ON and OFF Connection ။

bread board connection


။ LED bread board Resistor 270 ohm ။
resistor LED GND pin and Arduin Uno GND
။ Arduino Digital 9 and LED + pin ။
။ LED „„ON‟‟
„„O ‟‟ P ။ Arduino IDE ။
New ။

On and Off ။ ။

။ Tools > Board >
Arduino Uno ။Tools > port > ။
upload ။ IDE soft
Upload complete ။

Card flash memory ။



upload Board and port
error ။ Board and Port

#include<lib> ။

digitalWrite(
Arduino ။ Built in
။ L
Library or Header
file ။

Program ။
။ void setup(); Function
digital pin 9 Output
pinMode(pin,mode); Function ။ Output
pinMode function

။ ။

Serial.begin(); Arduino communication


။ Speed Baudrate 9600 ။

loop LED „„ON‟‟ digitalWrite(pin, value);


Function ။

။ ။
Contorl ။

delay(time); Function
။ time ။ time
ms ။ 1000ms 1s ။
digitalWrite(pin, value); Function
။ “value‟‟ LED ON HIGH၊OFF
LOW ။ Program Verify
။ ။

LED ။
။ loop loop ။

LED ။
Arduino GND bread board GND line ။
။ LED GND and bread board GND line Resistor

LED anode (+) Arduino digital pin 7 and 8 ။ pin


။ pin ။
Program ။

LED ။ pin 7
LED ON pin 8 LED O ။
pin 7 LED pin 8 LED OFF ။ program
။ pin 7 On ။ 1seconds
။ pin 8 LED ။ ။
။ W

LED ON and OFF


၁။ P

၂။ IDE software

၃။ LED
၄။ Resistor

Program ။


Program English
grammer ။
။ Arduino Program

1. Header file (Library file)
2. Structure
3. Variables
4. Functions
5. Control structures
6. Data types
7. Further Syntax
8. Advanced I/O
9. Analog I/O
10. Digital I/O
11. Operators
 Arithmetic Operator
 Comparison Operators
 Boolean Operators
 Bitwise Operators
 Compound Operators
12. Pointer access Operators
13. Time
14. Math
15. Trigonometry
16. Characters
17. Utilities
18. Random Numbers
19. Bit and Byte
20. Interrupts
21. Communication
22. USB

LIBRARY File
Library file prog ။
။ void setup()
။ ။



Library file

LED digitalWrite()
။ Function
library ။
IDEsoftware
။ Wireless device
IDE Wireless driver (LIBRARY) ။
Internet LIB download IDE ။

#include<LIB or Header file> ။
။ ။
Wireless device Data transmit
။ W L ။
။ Object name. write (
) ။ ။

C language ။ Case
sensitive
။ (I) (i) ။

Structures

Structures Arduino IDE software


။ „„ ‟‟ „„ ‟‟
Function ။
„„ ‟‟
။ “ ‟‟
Function ။ Function Method

။ level

။ “ ‟‟ Power
level ။ level ။
level ။ void setup()
။ level
loop() Function ။

Variables

“ ‟‟ ။
“ ‟‟
။ but
“ ‟‟ ။

equation ။ Program
analog voltage 0 to 5V ။ analogRead(pin);
Function ။ analogRead(pin);

0 to 5 ။
a=analogRead(pin)+c; ။
b=analogRead(pin)+d; ။ equation

Variable name ။
။ ။

။ Car=
။ Car
။ program ။
။ ။
“ ‟‟ format ။ “ ‟‟
“ ‟‟ ။“ ‟‟ “Variable name‟‟ ။

“ ‟‟ ။ ။
“ ‟‟ ။ „„ ‟‟
“ ‟‟ ။
။ 1 ။
။ - ။

။ “ ‟‟
။ “ ‟‟ SRAM
RandomAccessMemory ။ “ ‟‟
။ “ ‟‟

arduino “ ‟‟ „„ ‟‟ SRAM
2bytes ။
။ Arduino Uno SRAM 2KB ။ 2KB

1byte=8 bit, 2Kbyte 2*1000*8=16000 bit Byte


(2000 byte) ။ int=2bytes ။ “ ‟‟
။ memory full

။ P
Program ။ Program
keywords ။

Program ။

4. Function

Function Program ။ Program Main


Program ။ Program Main Program
။ Main Program
။ Main Program

Arduino ide “void setup()‟‟ Function
“void loop()‟‟ Main Function ။
။ setup
“loop()‟‟ Function

example Function ။ Function


a=b+c; void setup(); void loop();
။ equation ။
။ ။ Function
equation or working
Function name ၥ ။
။ Function name ။

။ pinMode() or digitalWrite()
digitalRead() analog func ။
pinMode()

pinMode() Program ။

Arduino ။

။ Function
Function name ။ digitalWrite(pin,value);

pin 13 output pinMode(13,OUTPUT);


digitalWrite(13,HIGH); Pin 13 ။ LOW
။ delay(1000); Function 13
။ time milliseconds(ms) ။ 1000ms
1 second ။ Program digitalWrite()
Function 5volt
။ analog voltage analogRead(pin);
။ analog voltage analogWrite
(pin,value); ။ analog function
speed LED
။ Digital 5V


. ။

။ ။Function or Method ။
Function ။
Bluetooth car ။

5. Control strutures
Control strutures Program Control
။ Control

။ ၊ ၊
၊ ၊

Control ။ Control

။ Program
Contorl ။ Control
။ ။
။ ။

။ ။
Control ၊
၊ ။

။ Program

။ Contol structure ။

„„if ‟‟

„„ f‟‟ Control ။ „„if‟‟





if (someVariable >50) ။
{ do something }
။ ။ if
someVariable>50do something ။
။ ။
if condition




။ Prog ။

။ ။
if(buttonPress==1) digitalWrite(2,HIGH); digitalWrite(3,HIGH);
။ ။
။ if condition

။ ။ if(buttonPress==1) {
digitalWrite(2,HIGH)} digitalWrite(3,HIGH);

။ Comparison and
O ။ ။
Program x 120
။ digitalWrite(LEDpin1,HIGH); ။ 120
။ O


။ ။
Program


။ ။

။ ။
။ ။


။ ။
Program ။
if( ==1) { } 1 ။
zero ။ ==
Operator ။ ။

„„ / ‟‟

„„ /else‟‟ Control ။ „„if/else‟‟ „„if‟‟


„„ ‟‟
။ pinFiveInput 500
။ action A
action B ။

„„ ‟‟ „„ ‟‟
„„ f‟‟ and „„else if‟‟ ။ “if‟‟ pinFiveInput 500
A „„else if‟‟ pinFiveInput 1000
1000 B „„else‟‟
c ။ „„if
/ else if‟‟ ။ ။
„„else‟‟ „„if‟‟ and „„else if‟‟ ။

“ ‟‟ Control

For L ။
။ Limit
။ ။ Counter
။“ ‟‟ Control
။ ။ Condition
။ ၊
၊ ။ Condition
။ ။ Condition

Condition O

O
။ ။ ++ ။-
- ။ += a+=b;
a= a+ b; ။ -= a = a – b;
။ *= a = a* b; /= a = a / b; %=
a = a%b; ။
„„i=o‟‟ ။ „„ ‟‟
။ Condition „„ <=255‟‟ „„ ‟‟ 255

analogWrite(PWMpin,i); ။ „„ ‟‟ (++) ။
analog Write Function analog volt ။
LED ။
LED volt 5V i++

Program analogwrite() Function analog
voltage ။ „„ ‟‟
။ analogWrite(PWMpin,0) ။
„„if‟‟ == “ ‟‟ 255
။ “ ‟‟ 0 ။ x = -1
။ 10 milliseconds „„ ‟‟ Control condition
။ i=i+x ; i=0+1; i=1 „ ‟‟ -1

analogWrite(PWMpin ,1) ။ „„if‟‟


== “ ‟‟ 255 ။
“ ‟‟ 1 ။ x = -1 ။ 10
milliseconds „„ ‟‟ -1

„„ ‟‟ Control ။ „„ ‟‟ x
- ။ 255 Analog read/write
။ “ ‟‟
။ ။
“ ‟‟ „„if‟‟

„„w ‟‟

While for ။ Condition


။ Loop

။„„ hile‟‟
။ Expression Condition „„if‟‟/“ ‟‟
။ ။

var = 0 ။ „„while‟‟
var<200 ။ var==0
။ var++ ။ „„var‟‟
။ 0 + 1 = 1 „„var‟‟
expression ။
2။

။ ။
။ „„while‟‟

„„ ‟‟

„„ witch case‟‟ ။
switch ။
case ။

။ „„ ‟‟
“break;‟‟
Control ။ break
။ ။ ။
။ ။ “break ‟‟

var 1 ။ switch case


။ case 1: case 2: case 1 switch 1
case 2: ။

„„switch case‟‟ ။
။ P

“Operators‟‟

“O ‟‟ equation
။ ။
။ O

။ Arithmetic Operators
။ ။ Comparison Operators
။ O
။ Bitwise Operators
။ O

program ။
output pin ။ pinMode(13,OUTPUT);
pinMode(LED_BUITIN ,OUTPUT);
။ LED_BUILTIN arduino LED
pin 13 ။ original ။
Built in LED_BUILTIN ။

void loop
digitalWrite(LED_BUILTIN,HIGH) ။

delay(1000); digitalWrite(LED_BUILTIN
,LOW); ။

Program scan Cycle


။ Program

။ ။

။ ။Program
။ ။

header file
Variables ။ void setup
။ loop ။
Program ။ Loop
loop
။ Repeat

LED ။
LED ၁၁ ။ L
။ ။ ၁၁
။ “ ‟‟ and while loop ။


LED 11 digital pin
0 to 10 output ။ void setup
pin 10 pinMode(0,1,.. OUTPUT); 10 ၁
pinMode(pin,OUTPUT) ။ “ ‟‟
condition ။ ။
pin 0 pin 10 10
။ 0 ။
။ pin ။ ။
။ ။
“ ‟‟ loop
။ loop ။
loop ။ loop
0 to 10 ။
digitalWrite(pin,HIGH); ON
။ “ ‟‟ loop
“ ‟‟ loop ။

။ ။

0 to 10 10
“ ‟‟ loop 10 0 ။
0 to 10 10 to 0
။ ။
pin variable name ။ “ ‟‟ pin
“ ‟‟ pin ။ ။

LED 8 number “ ‟‟ loop
။ Resistor 300Ω ၈ LED ၈ ။

arduino Uno ။
arduino mega/ Nano /Due ။
Digital pin 2 to 9 Output Digital pin LED
resistor ။
။ ။ LED

။ ။
။ LED
။ ။
Device ။ ။
Digital pin IN/OUT
။ variable ၂
။ pin and count ။ void setup() function Digital
Output ။
Output digitalWrite(pin,OUTPUT);
၈ “ ‟‟
loop ၂ ၉
။ Output pin
။ ။

loop function LED ON OFF ။


LED ၂ ၉ ။ ၉
၂ ။
Count variable ။ count
1 3
။ pin 2
။ 9 ။ ။ 2 9
။ 9 ။
။ pin 9 ။ 2
။ ။ L ။ 2
။ count ။ 3 ။
။၂ ။
။ count ။ 3 ။
count ။ 4 3
။ ။
။ for loop ။ Count loop


။ ။

pin 2 to 5, pin 9 to 6
။ Program ။
3 ။ “ ‟‟

။ count ။
။ “ ‟‟ pin ။
။ ။

3 count=0
။ count 3 ။ ။
LED ၈ ။ ။ ၁ ။
။ ။
။ ။ ။ ။ ။ ။
။ ။ ။ ။ ။ ။
။ ။ count++

။ ++ count ။

။ 2 3 4
6789 ၄ ။

2468 1357

LED ၈ 2 2
။ 3 3 ။ 9 ။ ၉
။ ။
။9 ။

pin 2 ။ 3 9
။ 4 ။

pin 9 ။ 2 ။
4 ။ ။ count
pin
။ Delay

။ ။ Digital pin OUTPUT OUTPUT


pin Power Ground and 5volt ။

LED ON or OFF ။ Dgital INPUT


LED ON or OFF ။
Input
5V GND ။
။ 5V Input
arduino ။
arduino 5V ။
arduino 5V ။ arduino
။ ။ N
။ N ။
GND and 5V ။ ။ pin ။

GND arduino
။ N ။
arduino ။ 5V ။
5V ။
။ 5
GND ။
resistor “PULL OWN‟‟ N
5V
resistor “PULLUP‟‟ ။ “PULL OWN‟‟
system
“PULLUP‟‟ system arduino

““PULL OWN‟‟‟‟ system ။

Push Button switch

Jumper wire

Arduino card

connection ။

““PULL OWN‟‟‟‟

““PULL OWN‟‟‟‟ resistor ။


Arduino Uno Power output 5V ။
Arduino Uno Digital pin 7
။ Resistor 1 Ω Arduino
Uno GND ။
။ ။
Arduino card ။
5V Arduino digital pin 7 ။
Arduino V digitalRead(pin);
function ။ 5V arduino

Arduino Card 5V
Arduino card ။
။ N ။
။ GND
5V and GND ။
5V၊ auto N
။ 5V
Auto N “PULL OWN‟‟ resistor
။ Electric shock Resistor
။ Arduino Card 5 HIGH
N LOW ။ Digital pin INPUT
PULL UP or PULL DOWN ။

“PULLUP‟‟ or “PULL OWN‟‟ ။
void setup() pin 7 input
pin 6 output ။
program
void loop ။ pin 7
။ „„if‟‟ ၍ digitalRead(7) 7 == HIGH, 5V
( ) digitalWrite(6,HIGH); ,
pin 6 5V ။ digitalRead(7)
7 == LOW N (
)။ digitalWrite(6,LOW);
။ program
။ if(digitalRead(7 == HIGH)) ။
။ Power ။ loop

“PULLUP‟‟
““PULLUP‟‟‟‟ system ။

arduino Input “PULLUP‟‟ “PULLUP‟‟


resistor BuiltIn ။ “PULLUP‟‟
resistor “PULL OWN‟‟ Resistor
။ “PULLUP‟‟ resistor function
(INPUT_”PULLUP‟‟ ; ။
5V Power ။ Internal “PULLUP‟‟
5V Input ။
switch GND pin
arduino digital input pin ။
Ground (0 V arduino
LOW arduino Input pin
internal “PULLUP‟‟ system 5volt HIGH

။ ။ INPUT pin 5volt


(-V) volt ။

Internal “PULLUP‟‟ ။ 5V
internal ။ ။
N LOW ။
LOW HIGH ။ ။

You might also like