You are on page 1of 44
\ Arduino Basics ARDUINO obese ite A Yoid setup () { 1 put ypu setup code here, to vun one: Noid loop) ¥ I pak your train ovde Wnere,, 1 run repeatedly: 3 tem Ot Schematic PRo’ EAM Q 0 a Yoid setup () f 3302. 1 put ‘your setup crde here, to vun once: pinMade ( 155 OUTPUT); @sv ¥ leo el Yoid loop) ¥ I puk your Mmatn ode here, 10 run repeatedly: + digital Wute (13, Hien); 3 PROGRAM) Youd setup () { Mout your setup code here, to yun once, pin Mode ( 13) OUTPUT); g Yoid loop 6) ¢ J pak your tain ovde Wnere, 19 run repeatedly digital Wie (13, Low Jj t subseribe on youtube, R06 Benginerdinath PROGRBWN, Yoid sehup () I pat your setup onde here, to wun once: pm Mode ( 13) OUTPUT) ; g Yoid loop) $ IF put your train ode Wee, 10 run wept digital Wute (13, HIGH); delay (1000); digital we (13, Low); delay (1000); Schematic Bread Board Connechons 8 = G30. TpINs Arduine (sy Y 10 Prachce Problem: Write a onde ard construc he arautt tn the headboard: Control a red LED ty blink 5 Anes » belay (ovd ms ) Men blink, a green LED 1D ‘nies delay Sms, ard thon blink Yells) LED IS hines , deloy 49) ms Subsorilve 00 youtube Afb : Genginerdinath jot - nkegors F\oat - dedmals Sivieg ~ bedexs [uards PROGRAM ie geen ED 2¢ Creat a pegreun hat will bln an LED int fast = 50 Shines at delay of ACD ms , teem blink x ee «0D 3hme, at delay of 36) mg, toon blink Sloat pis 34 again Zhmes at delay of JD ms and String word = ‘ Arduino Tutorials” uongtruct Fre vant th breadboard Yoid setup () f I put ‘your setup code Were, td run once, pin Mode Cgicen iD » OUTPUT); ' Schematic oid (oop ( 1g ah J pu your _ onde 1s, repeattdly Lo? ama digital iite € greenLe®, Hct); t L delay ( fast ); sy hy LED digital Wule C geen LED, Low); { crord pio delay (fast 5 digital winie C guenLED, (GH); delay ( fast ); digital we C geen ED, Low), delay (fast >; digital We C grenLeD, (6H); delay ( fast 5 digital Ware ( gicen LED, Low); delay (fast )5 3 digital Wark, C green LED , Hien); delay ( slbw 5 digital Wie C geen LED, Lov)), delay (dow); digital were C gwenLeD, ich); delay ( slow ); digital Wee Cgeen ED, Low); delay (slow); digital We, ( greenLED | HGH); delay (slow )5 digital We U green \ED, Low); delay (slow); digtalvire C grenLeD, ich); delay ( fast 2; digital we te C green LEV, Low), delay (fast )5 digital Write C green LED , HIGH); delay ( fast 5 digital Ware ( green LED, Lou); delay (fast 95 digital Write ( green LED HIGH); delay ( fast ); digtalWiite C geen LED, Lov) ); delay (fast ); delay (pause); 3 subsorilte.0n youtube, Lfb Gengnerdmatn 9 Binary Numbers Subsotibe, 00 yputulle, Rf D Binary (4-8) LEO @enginerdmath s S ae | ERS LS ° ° ° ° O@00 DJSSsnqveGLyvw—o § 5 4 is Create an, LED Bingry Counter from D ciralt in Bread board : PROORAM yt pia = % ink phd = 3; ink pind = 45 tnt pins *S; io wait = 750 Youd setup Of put your setup crde here, to run once pin Mode (p25 OUTPUT); patiode (pind > OUTPUT); pin Mode ( pied ) OUTPUT); 9 Mode ( pind > OUTPUT); aos FS oesesss -—— oc 9 oO SS --— 290--9 e779 —G-o-0—- Oo + @E0 CO e0000 00 ©000000 @0 008000 00 O00 O0000 a program and lonsruct the, 5 Yoid loop ) ¢ 1 put your rain oode neme,, 10 run repeatidly S diatal ue (pn, Low); Conk inuation vs digital uci Cpind 5 Low); digital rite (pind; Low); digital write (pins Low); digital Wei, (pind wie) digital re, Cp, wow); digitale, Cpinas Low); delay (work); digital wie Comms, wt) ; digital Wee, (pnt, tow); delay (wort) ; digital lee, Cond» LOW); digital eke, Cyn, Lov); digital Werke, (pins Low); digital Unk, Cn. owt )5 digital Write, (pms Hut); digital Were, (pms el D5 delay (wart); digital Wee, Cp Lovl Da digtal lek, Cprn2, Low); diay (wat) 5 digital Write (pnd Low); digital ube Coin? Low); digital Write, (pin4, wut) ; digital Write (ping 5 Hak); digital Write, Coss Low); digital uke, (pina s mod; delay (wart) ; Aigital Werle (pms IHU) 3 digital Wee, (pnt, Low); delay (wart) ; digital were, Coin y Low); diggtal we, (pind, luk) ; digital Write, Cpina 5 wo); digital Write (pins 5 tow); digitalWate, Corns, wut); digitale, Cpinas Low); delay (wart : digital Wek (pms, ww ); digital ik, Cpin2s Low); deiay (um) digital ede, Cpind s Mull); digital uct, Cpt, wu); Aga ee, (ana, tow); digital Wk, (pn35 Low); digital Write, prs y Low ); digital Ue Cena Low); day (wat) digital Werke (pms 5 Het) j deiay COM) | sprite yatibe. 2% @enaywerdmath Aigital Werke, (ym2, we); digital Wee, (pind Low); digital Werke, (pin 5 wu) ; digital Wee, (pms lw); delay (wart) : digital Wie, (pnd lu) 5 Gigital Werke, (pm3,5 Low); digital Werke (pina ibe ); Aigital Wek, (pins 5 iH); delay (wart); digital Write (pints wut) j Aigttal Wek (om3 5 Valo ); Aigttal Weike, (ain, Low); digital Wik, Cons, ww ); delay (watt) 5 Aigytal i, (pm2 wu) ; digital Wik, (ping 5 Wh); digital Wee, (png Low); digital Write (pms 5 Hut); delay (watt) ; . __ Subseriloe, on youtuloe, Bf tonkinyabion i, @erginerdmatn digital Wee, (pint, uk) ; Aigttal Wea, (pm, inutt) ; digital Werke, (pins Wut); digital Write, Cows 5 ww); delay (wart; digital wei, (pm2., putt); digital Werke (pnd 5 inbit) ; digital Wee, (pins vill); digital Wee, (pws 5 Ie); delay ( wart’) ‘ Schemakc pez Bp PAE Ud) 2 8 8 YY w Ww w w | = pin ground Arduvno + Subsorlve, on youtube, Rf Genginerdmatn fom 0- YG > Sots UR only the gins with syinlio| ~ 0 - BY pins 3,5, 6) 4 10,11 Prograra 5 jot pur = 3 int Drignt = aob 1 you (aX adjust Value from d- 9e6" Yoid setup 0) { 1 pat your setup oode here, +o vun once, pin Mode C pina > OUTPUT); $ Yoid lop) ¢ I par your main code Were, 10 run repeattdly analy Write, Can, bright) PWM lsc width midulatior:ion frliWrite. Va ype Period Ts [T= ton t tog a ded: |p. bn - ta Too byt t Duty 3 T ton + off V overage = Dpeak Ohm's Law (PY Ov -&R al< “ suboorite 0 ypbite 2.96 “Rralos, Read Cominand @enginerdmatn use only prs AO) Al, A2, k3) MY, fo wads “alue from D- 1023 Lid bits) Create program Hhok can veod He vyott age, aims Ry with the, dvant below — — pin AS Cbd eduino Vein P ~ ww) R32 | Vy=9 ON 2 R= 10.0 Arduino GND pn Using Noltage Divider) empacted “hy: y,- dQ = 1 bV (nas 2302. PROGRAM : int wadPin = AB; wnt read ave ; Sloat V2 20; M veikiale. YR ink deayTime = D0 5 Yoid setup © £ I put pur setup nde here, to run vice, pin Mode (ready » \NPUT 5 Serial -hegn (bdo) Usk Youd vate Yoid loop) ¥ I pak your main ode \nene,, 10 yun repeatedly readValue = ainalogftead) (‘ead ®\n) Yr = (B /1023.) % readNolue j 9) ge N22 (G/i023))read Value ) uge linear equabon , bet y =%b and %= veadNaue, » X (readNalue) Y(N2) ° 2 (v23 is you Wave He ordinates LOD) ard ( W23)5) jusing dopant Bem of ating: y-y2 PW OC yy x ; -o= 222 (x0 y= co cee) = BS % or No = readalue y [023 1023 Serial .println, (2); del Tine) + Subsorilve 09 youtube RP ay CadagTine) Genginerdmath OUTPUT should be, vag avd |b 1b Jab j.rs 11S 1.0 Sena ort al Pant Grand PRoERAM int Jel; nt warkTine = 7D Yoid setup () f I put ‘your setup code here, tr yun once, Serial -hegny (.4bb0>) 4 _ loop ( ) ¢ (put oar main ode Wnere,, 1 run repeat Serial panty, (9); J=SHY, delay ( delagfine); subsotilbe 01 youtube, Rf Genginerdmath OUT WT = fev ‘paneer Int Jat; oi workTime = 75D Sing myShirg ~ "J = ' Youd setup () f 1 put ypur setup code bere, to run vnce, Serial “begin, (9600) Yoid loop) ¥ SureUr I pak your tain onde mene, 10 run repeatedly Serial gant CerySting); Serial panty (5); J=SH, delay ( dase); $ ex wind Cu i) we I =3 PROGRAM Subsotibe, on youtube Rf 3 mines ? =4 @enginerdmath int 25 Int delaglime = SD i) Sinng mpsring = Youd setup () { I pat ‘your setup code here, to vun once, Seria\ beg) (Abdo) Void loop) ¢ I pu your rain code Wnere,, 40 yun repeatedly: OUT PUT. Serial . grin 69} 34 7=10 Serial , pink CemyShing) j Sa Serial grint Cy) ; ar Fz =10 Serial prt C" =") i Serial -yivtly, (2); delay ( ddasline); 3 Float ple 3M) Lhyat ve 2 Sloat fireg, ) int delagTivme = 460 Youd sehup Of put your setup cde here) to un once, Serial “begun ( 400) Yoid loop) ¢ J pak your main ode ene, 10 run repeatedly ara = pix Ver; Subsorilve 01 vypatuloe AP Serial. print C'A Crde With Radius”) 7 Beryhacath Serial. print Cr )) Serial pant UC" Has hrea of = ir Seria\ pra (awed) j OUTPUT Sandl. print aur “); A curde With Radius 2.00 ay brea of 1258. delay ( delat); A tive With Radius 2.00 Vag hea of 12-56. i A Curde With Radius 2.0 Hag brea of 125. You (an inurement Fy DI by adding the tae: i OUTPUT Serial print (area) » A tide With Radius 2.00 Has frea oF 1256. SenideprinE (6) A tude Wh Radius 2.5 Has fen af 03 delay ( dase); A Cide With Rads 3.00 Yay fren of 24.2 rertog, L : DN pm hrdune Potonhoweters — - voltage divider \ 2 i T @ev +e pin £3 Urduins’) 2 3 Copy Yhe same PROGRAM as = *GND pm heduind \n read hey to wutpwk im serial oni’ the Nwhye vading on fin han We YAmRy of atte the kino ” PRooRAn : int weadfin = AS; Subsorite,on yputuloe, Rf yt reatalue, 5 @enginerdmath float V2 = 95 a Yu int deauTine = po void setup 0) £ I pat ‘your setup code here, 4 yun once, pin Mode ( weadAy > \NPUT i Serial -begny ( 9b00°) Usk aud vate Yoid loop) ¥ J pak your tain onde Were, 10 run vepeaitely: read\alue = Aralogfteod, (readin) Yr = (@ /1023.) # readNolue 5 Serial panty (V2); delay (Gelay Tie, } procrary: If Ve AN tum LED ON, v2 >4¥ dwn LED ON int readPin = AB; wot readNalue > Sat Ve=o, Morale. Ye wnt dda sine, = br 5 nk red Pin = 5 Youd setup 0) { I pat ‘ypu setup corde here, tr vun once, in Mode ( reader, » INPUT); gin Mode CeedPin , yuTPUT); Serial -begny ( 9b007) WV sek aud vate 1% Yord loop) ¥ W put your rain code Where, 10 run repeatedly: read\aliie = orologtend (readin) Ya = (@ /1023.) * readNolue ’ Serial . wink C" Polen tometer Vottage is 2) Subsctilte.0n youtube, fb Genginerdmath Serial pintly (V2); ff CY2<4.0) § digital Wate’ ( redPiny HLbH); 4 BV pin hrduino @x : — pn 3. Ubrdwne’) s i (¥2>40) § > END pm frdumd digital Write. C redPin Low); g 3 Ww By (Halas ) ren 1 3302 ai Ime) 4 = ’ + ev J \EO \~ poround, en procram: VF v2 =Swl jun ved ON, of v2 #ow toy LED ON int readPin = AB: vot readNalue, float 220, Mittal, VE it ddayTine = 20 ; wt wed Pin = 5 Void setup () f 1 pat ‘your setup onde here, 4 van omce, pin Mode (ready ) INPUT ); gin Mode, CeedPin, yuTPUT); Usk baud vate Subsorlbe, on youtube, ff Go Serial -begn ( 40d0°) @enginerdmath Yord loop) ¢ J put your rain code \nexe,, 1 run repeatedly read\alue. = aralogfteod (eadPin) Yo = (@ /1023.) * veadNolue ; Serial print: C" Pofen tometer Voltage. is \ Serial .pritly, (V2) j if (v2 ==59§ digitalWrke C eaPin, Hill); if (V2 I-50 digital Write, ( reAPin Low) 5 3 ay Leela 5 proernm: 16 24 V>*3, 4m ED ON, 1 ¥2 <2 of Y233 ty LEP ON int readfin = AS; wot readalue. 5 Sloat va =o; MH nvkiae, YO jnt delayTime, = 0) nk ed Pin = 95 Yoid setup () f I pat ‘your setup code here, ty run once, pin Mode (ready 9 \NPUT 5 pin Mode, CAPin, guTDUT), Serial begin ( 4600) sek woud vate, b 5 Subsoribe, 0 yputulbe $f Yoid loop) ¥ @enjinerdmath I pat your main onde Were, 1 run repeatedly readalue = Atnalofeod (eadPn) Yr = (& 1023. * readNolue Serial . prt C" Polen homeley Voltage Is ‘) Setial.qintly (V2) ; fF (2 >Q W263) 9 digital Yate: ( rdPin, Mi bw), i (vad | 2>3)e digital ite, ( redPin, Lou) ); ddoy, (Belay Tone) ; DV pin Nrduino PRIGRAM : int pin =G t Qev ye. pn Ao (rue) int pinds =i 3 me pe = FOND pn hedutnd Doo! Lede j j Yoid setup Of Wy put your setup erde here, fr vun once: TP o BN pinfede ( pas INPUT ); sv Y i gin Mode, C pnd, wrt); | eeuma cin Y Serial -begn, (4000) ; pr a yord loop) ¢ suse 09 youbule, Bf I pak your tain ode exe, 10 run repeatedly @enginerdinatn pokvalue = avologead C pnd); LEDvalue = C285: /1025.) ¥ pobrvolte. 7 using meat equation, hoe % (phvalue’) ard _y (LB%alne ) (9) pot valve = [d\0) and (1083, 85>) . i 25-0 [023 255 Y O° To U0) _ os J* Tay” sa LEDalue = Per Wye, andlogWwie (pnb, LENalue) ; wad Serial print. ( Ledue) ; g | FOR LooPS Sclie asc blink: yell LED Ames, than =. aw aik a - Dirk sed LED 3 ney gine hrduno pap uno int redpny = 95 Rms S Rese. wot Yollowhing, = 00 5 me abe = OP ow nt yploullnk = > ; - a wt reali = S| me oy 7 : oid setup 0) f ~ ptum @ND pry 1 put your setup onde Nere., 4d vun once, pin Mode C yalowpin , ue gin Mode, Crap , vuTPUT); 2 * ond loop () ¢ Subsorilte.0n yputuve, Rts J pak your main cade Where, 1 run repeatedly Gengmerdmatia fir joa yee yoloublunk 5 J =yh4) § digital rite ( yellowpn (cH); delay Cyelowhme) 5 digital We C yetloupn, Low); delay ( yllwhne); 5 fy Getz ye wedloln JHE digitabwre redpin, HIGH); delay ( redbme,) 5 digital Wete ( veda, Low); deloy ( vedhme); 5 PROGRAM, - counler fem |b lo Int J; outPyy, jive delayhme =~ SDD 5 ! Youd sefup 0) f 3 I pat ‘your setup cnde here, to eun vice, as Serial -begny (Ab00) ; 4 8 Yord loop ) ¢ ib J pak your math onde were, 0 run repeattaly i Ae (yet, yer WO; JHE 3 Serial. pint (5) ks delay ( delaytine ) ‘ 1) Sestal , prin, Oy; 5 PROGRAM — counlor fem Ob 4 Int y ink J Hdlaghne = ~ DD; Youd sefup 0) { pat your setup cnde here, tr run once, Serial beg, (9000) ; 3 Yord loop ) If put your main ode Were, 1 yun repeat fir Gep gy 21 7 JADE Serial, pantry (3)) delay ( delaytine) $ Serial. printly LY 4 g -YAHILE = LOOPS int J; jot ~ delayhme = = DD, void sefup Of 1 pat ‘your setup code here, to un vice, Serial . begin (bdo) | g Yord loop) ¥ VV Ae ad main oode ere, 1 run repeatedly ahve (ye=) 5 Subsotibe 0 ypatube, hb @engynerdinatn out yy lo ape Foe —NE FSP e g UT AIT wee pec A eure 2D Serial prnthn, (3); siestite.00 yubibe, 2.6 delay ( delay im) } @enginerdinath J =Skl) g Sesia\ . prntlny 0, 5 PRoORAN\, Tura LEO DN wy \Ja\ > Ivvo and turn OFF rt pokNal OHhurunse, NV pin hrduino int delajfine =100, int =): 2 a porn = dO + ad ited fin> 3)" C nN Chrdwro) 3 Void setup () H oat your setup cde here, tr wun once GND pin hedutnd res a 1 Serial -begry (4000) ; ay pinMnde ( pot fin , (Nour) i bon apa nMode freAhin , OUIWT); cheno sv Y Leo Yord loop) $ Re I pak your tain ode Wrene,, 7 yun repeatedly + éroud pra paval = analogRew (qt Pn); + Serial print, ( qotNal ) ; delay ( delaytine while C pobVal > two) digitale, ( ran, HUGH), aval = anralogRewd ( pot Pind; Serial pintly (tal ) ; delay ( delaytime) 3 Subscribe on youtulbe hits digitale, ( redPm, LOW ) ; Genginerdmath $ “Reading Nuns Fan) Sol Monitor jot mgNmhar 5 String $4 = “Please Enlor Nour Nurator: "5 String tisg2= "Your nary Us q Void sebup 0) { 1 pat ‘your setup crde here, > yun once, Serial -hegin (.4b00) | Yord loop) ¢ If pat your main code \neme,, 1D run repeatedly gurtuT Serial. printly, (msg); Please Env Xow Nowa: ; sihile (Serial. available () ==0) § Yoav Naw 2 95 Please Enter Now Numhuy : mmytlumhoy = Sonal. pavsetint OY; Youy Nur 2 Serial pant ( msg) ; Sete, Coad); PRooEAM. Mk Mew Many Ares ty bunk LED wrt patinBivoles =v How many inks do avail Sirng msg = wk 3; ink We = DP, vol red = ‘ y Yod setup Of sorte on yptite 29 Yat your setup code here , > wun once @engynerdmath Serial begin (9000 ; pinede, (redPn, DUTPNT y, g Yoid loop) ¢ J pak your rain onde Wnexe,, 1 run repeatedly Serial .prntin (8g) while ( Serial-availayle (==) § RQ WW ramblny= Sonal. parseint CY; ire, fe 3a. ano fr G24, 047 vurBlnte g JD G BY V iso digital Wark, C red , HIGH); | craig \ delay (b¥); digital wire C rear , Low); L delay ( v¥)) 3 5 avs Calalake Pirea of Owed: Float — Yodtus; String msg = “What isthe radius oF your ud?" ; Ghing nege Your Garth ‘nas aieq of: ” Plat Orea, Float pl= 3.) Yoid setup () f 1 pat ‘your setup code here, to un vince, Serial begin) (Abd) | Yoid loop) $ Subset 00 yputuloe, Rf IF pak your tain ade nere,, 1 yun repeatedly @enginerdimatn Serial, pintin ( vsg); awhile ( Serial. avaloyle () == °) 5 rads = Sonal. pavseint CY j areg = pre cadlugk Fads 5 Serial . int ( ms?) ; jhe -ptin Cara )) ore : Sir.cg — mmyName; , Shing msg = “Whal ts yp mate ? "4 SHG msg = “Yale "5 ‘i String muge = “Weloine ty Arduino Z Youd setup Of 4 pat your setup grde hee, fo run once, Seria) begin) ( 9¥00) ; std loop) ¢ OT PUT I 4 your an a tee run repeatedly Hal pint, ( msgh) phil ( Serial. onailable () ==) § Hello Taysun eae » Kedar Whakis yor name 7 Whak is up nave? iny Name, = Sonal. cead Sng OF Serial pent ( eso) ; Seria\ , print ( vay Name )) Serial intl (-msq9); ay PROGRAM subscribe on youtube, 9.6 wnt tll . 1 @enginerdmatn mt in mt BeBn = 0; Shing my Ger j \ Shiny msg = "What Calor LED? j Youd setup Of I put your setup crde here, to wun once, Serial beg (4bd0 ; Pintilde, (redPin QuTput y, pindede, (geen, DTP yy pinMede, CiuePin , QUTPLT 8 Yoid loop) $ 7 pi ip ap le ett ey Serial. printle, (msg), m2 pri] pd Ubvduuno nile ( Serial-ovoilalle ()==0) § ® f wwe) may t= Ynal cead Shrwg U), 2 2 Af Cmytalr == "sed" We mygllor 22's") § Q YY BY dupalubite, ( redpn ony; [s w lw dupa Write, ( geanpin 0d y —L = pin ground dupa ite, (pep iad) Arduvno 5 if Comylalor == "gn! |) myGsbor 22 Geen ) | dupa ubike, Cveekpin lw); dunt Vite, ( qeaypn with 5 5 if C nyQy == "lic! yl = =P") § digtalite, (reapn, Lov 5 dugtal Wie, Cyaan, Lov))y data ite, Coen, Wet Jy r . Subsoriloe, on uoutulee, dupa Uke, Osten ) ww )j Gexjnerinath % Re@® LED Roce PROGRAM Py = (ej Paar RWG G wit Den = 05 { J Sheng my lj | pre AD pal pa sity ynsg = "What or LED? j Yord setup © f I put ‘your setup orde here, to wun once, Serial “beg (4000) pode, CredPom, WTP) ppndiede. (gunn, vst" 7 pnMede, CtuePin, 0uTPuT y, 3 W oid loop) $ subsoflve 09 yputube Bf I put your tain cade Wwere,, 1 run repeatedly @enginerdmnat Serial partly, (msg); while (Serial: avoillaile ()==0) § 3 tng b= Sonal . eee a Comglolor == rea” I eng oles ated”) dupta\ hike, ( redpin Nery; apa jompn wwf dipta\wnite, (phepin unl) 5 af Congo == "90m" vbr 22 Gee) § dhoptal white, (reapin, Low jj Auptadite, Cgearrn wl dupa Wide, Coeprn yy) jj i if (gtr 2 "he! myllr ==") § dinta\ Wiite, (reap Low) jj dip Uke, (gearpin ww); Arpt Wite, Cops» Bt Yp af C-mybiln == “0167 WE vwydon == “Ol f dupadviite, Cred pin L } duit Vite, C gear wut Agimubite. Cyuepn, vo w 4 sotscfte on yar 2 Genginerdimath fe Cmgtdor == Yoga! t mylar ==" huil) f dog ite, Crean Ld an loge (yee (yeapn, 2° y ana MC buen, jj § 5 heiNe Buavas PGP M Rng Yre bua Wun He uct amar 1 10 jit yflugey vo puaaPin = 87 Schama ae 59. = ae \wput ypu ayn pin ¥ (Adu) 1D duno Youd atta of *) L “ anim) 1 pat ‘yur setup crde here, > run tice, Serial -egn ( Ab00) ; pede. Gorratin, WWTP) void loop 6) ¥ J pak your rain ode here, 10 yun vepeaitely Serial println, ( msg), while (Serial: ovoilayle () ==0) ¥ 5 aN = Ql. gavelote QO) ing Nualwt >) 4 dita uhite, (won , HbR), a subsorilve.0n youtube, BP ~ ‘34)) Gengnerdinath dypta Uhite, (worn, (0) )j £ 5 PROGRAM: Ring the Burro why He, ql > tod int pot Pin = AS) tind poral j schumah © wh \uarAn = © pin © (Aduno) void setup 0) § nD pine hrduthe) W yak yout setup gnde here, bo wun once +7 Serial -begny (4b00) ; pdde Umreahn, TMT); BV pin hrduna paniihde, Cort fig, NOUT & oid toop 6) ¢ J pak your main code ‘ere, 1 run repeatedly peal = = analog ead Cyst Pint); } Serial .prnbln, (pata); white € ral > tov) 5 dugtad nite, ( (warn, bib); poeval = oedogead (yey; F Serial pantln, (patel) ; dita vite, (wren, pW) j g Pe Rom wk wuvaineg ink aL = VY nb Ake = 2) ine J; Yoid setup () f I pat ypu setup onde here, > vun once, Serial begin (9b00) ; pdhde, Caan , wrpt )- Yoid loop) ¥ IF pak your tain onde ‘here, 10 run repeatedly Be Get) peo POs 341) f dipta Ui, (waetn, hen), delay CoH) j digptal white, (own, (00) j delay Cae) j Be GF 4) jee 0; J =J41) § Avot Write, ( wan nbn); delay Cay j digiluite, (Worn, (pi; delay Ca), Suosorlte, 0 yputulee, he Benginerdmatn schematC pin © CAdano) Gnd pinch uivo) Ey j ARR Ne Subsofilbe, on youtube, Bh -veeds QUN by vun @erginerdmatn PM SRAM wok ara eq) schemattC ink dbl = 60) pin ® Chun) Void setup Cf | Gn pinchaune) I ut ‘your setup cde Neve, 4) yun once, 7 7 Serial begin ( Ab00) ; pinede, Corafin, DUTT 5 ord [oop 6) ¥ If pak your main onde ene, 1 run vepeitealy duyitnUiite, (waa, nny; delay Mumsewrds Cdk); dupa ike, (warn, (01) j delay M iurseinrd s (ak), 3 HVoGRUM: Conte Hr Aue of Rastue Durrr fm ys \DMus wa polndenclor ——-Schemarh © = Al jt por®n Ay, pn (ka) Wwe guerin = By wk gael, Gn pincheurne) BV pin Neduino i JH fot tne 5 Youd setup Ot CG CN) 2 en bl 1 pat yur setup cade here, to run once, (Arduino) Serial -begny (Ab00) ; = pinlkde Carsahn, TPL, = PEND pin Aedutnd pnMode, C pot Pig ) {NOUT ) i 7 £ Subsotite, 09 yptulbe RP pial = avalog ead ( potin), @enqinerdmnat - 0 | fine ale C4240. / 1013-0) ¥ it Ul +e . mde : , : re ty and ov, 0, ) \we linen eaudroy fry = L0,6D) AM Ky Ts f Nal va peal metal “ ~ [ov dip Wie, (wortn, biby); delay Mvmsewonds C tore\lel); Atal Write, (wrvPn, [0\) ) delay Miroseanrds CtoreNal’), 3 VPOISTTREASEST logit dependent tesish oP Readtance, \ Me > Light iwlensty FROLWAN : = When hy, (yt 1s ON | greh LED is oN, Whun ly? 5s OF wnt lighten = 0, red LED ON ine Night Nal Ant = aD, WW pedi = a) int grew = s st ail sch CS Subsotibe, on youtulte ff @ dina pat your setup nde here, to van once Scvematie _ Serial -begn ( 4bd0) 5 pm’ duno pre Arduno pndlede, Credfig , vsTBt pindhde Cayeenfo, wip); Q-mnZ S Ryr sma pintlede, Ulugnfen ip INMTY, gen red g Ye TM Yoid loop) ¢ JF put your tain code Vnere,, $0 run vepeatclly L hrtuno 68D pm Serial. peinctin Vigna geen, wee By fF (luptal > 30) § gin ho dita vhite, (gunk, Men), eo digtadite, ( reARn, LOU) j 3 > Maun OND py ne (gta) <7) 3 dina Uke, Cqemny Low jj diptadUbike, CreAPon, lati )j “3 PROLRAM- Lreate a poyyann Phat wid wap the swung of buaaer vy) the hgit vakensiy Novhny fw phir resistyr B Supsorive 0 Youtube, Ab Benginerdinatn wt Wien = hoy, BV pn ) Crchuw’) 2 g vit buaePin = v eG o yw wnt gata) ; Panto mt delay; 3 aa Yord setup () f V pat ypur setup ode here, , ty qun once: T= Ptumo GND py pntiode, Ab, = \NQOT j shemalt piniiisde Chuapin ov 07) pin © (Adu) | enp pinchvd ato) Yoid loop) $ rn - y par your main code here, 1 run vepeately lightVa| = ara Seu Uigit An); daa = (4/550. habe — C4 200. / 5501) + hej a J} fr he Frrmula, we Vine equethen & y) (an D 7) i L = pele) dag vend y-Ye DAL xm) pel) cag vending const hy Sei = Wo=l (eae) = debujl = aga] ~ 05) 0) Yrs ADL (naa) = SGT = Lye RED 4 digitalvlinte (wean, HCl); dela’ (adayT) j digiWete (uaa, lb); delay, (dayT) j 4 Pash puttin Swit and Pall Up and Pull own Resists | i itsebe-0n ype, 3.9 are _ seta . surtdh dosed @enginerdmatn e = aCaN PULL UP REASTOR 7 ws —*peah ws Qa BO » wn w oy [- We lo “Wr O = * 4" > )" NF BV Rat i) . oO eo Ren [ ‘ 0 , vy 7 a S drome, rc) ANN tom & 3302 (peSL oak uitery i a r +)3V VY leo /O % Ground por] Ground pI. Urdu) Urduawe) = PRooPAM~ fun de, OM yhyt = Hou sultan 6 qusud , OF wan Nor int Lh 28; jot OubvAn = 12) int bulloReed 7 wnt db = BND) ® void sehup OT I put ‘your setup ode here, > cuN vmce,: susorive-on ypabulie Rf @enginerdi pritinde, (has, MOT V5 ergerdmatn pitted. CLORn ov WT); Yoid loop) ¢ I pak your tain onde \nene,, 1) run repeatedly bubbrRead = digits) Fead Cutis); Sena « prntisy CahnRend), delowy (ae) Chua ted <=D 7 dagihluiik, ( Lert, LY, HE Cluthn ead == 7 dighhlinie, ( Levey, Wl); PWotwAM- Dun Hr sikh Ic ptsed, Ye dale af LED wl Cae ad shy on that state Unhl Ry, sch (yp mpl batenold lool 7 Je svikh shite ia) nt [Dota =O; - o— | nh LED Mn = Fy ° ‘0 a bbutten Ro = 127 in bultesy plu » me uty Mea ime at = 10d, Void setup 0) { I pat ‘your setup code here, to ean once Made, (wale, \ryg0oT D4 Fiatiede (LPR os; Yoid loop) ¢ J put your Ymatn onde Were, 0 yun repeaitel bub New) = digital ea) CWutbn); Sena). pranks 1) Cvatintend) ; delay (AY) 5 a C put == «kh lh == 1)$ if CLEDshle ==0) $ dig HlWnle ( LEPRn, Wu) LeDstok 4 dee. % dighiunte, ( Ust, Ld); LeDStk = 0, g 3 tuthnQd = Yathntow); delay) (AY) , PRoeENM- Switch 1 hy numgy the lidnt whens Suh 2 fy dereage he Tint iy puny vill nny af te wht nen iH read Ye rina t moximunry \aonsity Ground pn Chekanve") Sdeamoric aA wen pat a [/O Q tpn & Perm * ev 3302 ound PIM Urdu) w cde?) J \eD subsorile on youtulie, 2. Genginerdmatn SUpSONYE, ON YOUTUVE, Py Sdpornotie ‘ nxn) @enginerdmath w oy a v une) lo Seite wen pus 89 ~Ground pr’ By Le daw) /O | sah 2 Q Ground po ANY Ubawe) ten 2 3300 schemat'C Behutto wie + \sV UW pina U lund hy ee GND pinc hed utwe) 6rourd pio Uw) + ae int batinBy= Ire, Dana 11 ve Agua 45 to nwtnel 7; wie dk = cun once, pnitide, ( wateaPe, )rgoT ) 4 initiode, Cvaltntin, wry); nifivde, (LER 5 WRT); pintiiede. (huvetin, DPUT 5 Youd loop) ¢ J pak your main othe Wnene,, 10 run repeatedly baba al] = digital ea) CwuthaPhi); yubnal2 = digta ead Cubana); Sena) . print (Bulla 4 = ‘)j Subsotite 00 youtuie, RF Sena) . qth Coutsnval @enginerdmatn Sena} yank C Bute 2"); Sena) grmnelhy Cloutinval 2), delawy (ae) 5 1f Catraval 4 = = 9) 2 LED nghit = LEP ght 0 arly Write. (HBR, LEP nyht) 3 1f Cowhmnlal 2 = > 9) $ LEP ght = LED Dnyht —t0 if C LeDbnght us jj LE nit = 855) digital ede ChuaaPn, Hoty, daday Cae) » ae. (hay Ww) day Cae 3 1S CLeAPbwht< 0) 4 LeDIght = 0 j digitally de Cuan, Wel), delay Cat) digital Mk Chat, Ww), day C ae) g aralng Write, (Rn LED gh) 3 * eee ~ age wiban Fn 010° subserbe on yputlve 0 Genginerdmata Cee UWewn) CY? avdaino MC Ued) > SV Adana Cantar (orarge > pn avduina PRooRAN # include Z Sewo.W> int ganoPin = 9 ink — GervoPes 05 Sewo Nysoryp : ke Void sebup () f I pat ‘your setup nde here, to wun orice, Serial -begn (4000) 5 mySen0. attach (sanofin), 3 Yoid loop) $ I put your main cde \nene,, 1 run repeatidly mySeno, vive senoPes); ypu can change eve vf Serbo.» 0-19 3 PROGRAM— Wolale the feo accarding ty they light wensthy hag Ay Hirdude 2 Seno > do esishe ink Lightlal; Van vot tytPine Ade Urano’) (nt a = x; ? é ink — anda, 5 an Ay we SONORA = FA 3 (that) Sewo NYSED | oto. Yoid setup () ( J pat your main code Were, 0 yun repeat > heduno 6D py Serial -begry (Ab00) ; ov Zh * rntude, ( lyitle, 80oT )9 sure. 0n youtube ffs nitivde, ( sawfin, OUTPUT ) 5 Genginerdmath ray Seno. attach, Usavefin, quo Weve) ©%0 arduanvo Yoid loop) ¥ WU (ed) > SV Ordunmo Conntar ( orm =e \ J pak your main cade were,, 1? yun repeatedly Ye) > pin arduind gna] = avaloglead ( Wren) ; = Se Clugheval 5 oy (lb. / >.) * ‘ya aneae j ) formula dowd fhm \iveow ight any tmgnid fiom sem a DN Ugh my Send, write ange); (TOY STORY +5Y | Re BY 4 switch, = ond ea wt Pin = ink YPin = i int An = 2 nt al; 4) int yNaly = i ’ subsorie on yprtulbe, Lf He aay, Gerginerdinath Yoid setup (Yt y pot pur setup code here, ty run once, sie “beg apo j mide, c xPw, Ivor ) 3 pintinde { yy Pan. (NUT. d; aude © 5Pin , NUT); digtaliile CoB) bl )y Tar gra can gut pil-up nsw bh 364 yord loop) ¥ If put your tain onde \nene,, 1 run vepeatcly xxlq| = owwllogRead xP); val = ayalon ead Cyn); sb = aga Read (stn) dey Ca), Sena) qont (x We 6 "2, Senalagnt Coral 7 Sena « print (*y Value 6°); Sena), . ya) ); Senay * surtala Sale 16"); Sew), wen (el al); 3 PRoGPAMN~ fontallng jw sD using Jay ick # include Z Seon Soyo Ksent Sond Yon eno Weve) 6% arduwo nit Xpin = AD; UC Leh) 9 SV Adan = My Condor (orarye) > pm arduina wot Yan = At, i ‘SOND 4 we Sens 2) Wt Xm =a, sSubsotile.on youtulre, fb me YSpn +10 5 cD ardame oeaiverdmati wot WouaaPin= 3 eno Wem ) oe We Wy We Uh) > BV Adan Certo (ear) yyw) avd Wnt Wy} sont’ Int val ; poy Int Yul; 0 ne Sva\ ye wy, —s pn M4 i x Vv nt at = wy x z J Youd setup Of 1 pat pur Setup code here, tr run once, W pind, Serial begun (4000) | / aa switch pmiivde, (Xm, |NT 73 = eno pinttde © Yon, xeor_); mntide, (Som, NUT 5 eer’. yee — ); sohumah'C Pitvde, ¢ larady , oR yi an, Crduno) digtalilde (stv, Habl); Xeon. alkadr, (%Spm); Yeenro. alka) C1Sp), Yoid loop) ¥ Gn pinc hd utno)) i I pak your main onde ‘heme, tD run repeatedly Yaia| = analog Read (%pn) j Wilx = (\@./\0v-) «ual 5 /) Yval = analog head (pa), (do Wy = i@./1073 J Yual,/) (0,0) Sal = aga Read (any Xsenvo . write (Whe), Ysovo write (wy); TL (Sal==d)¥ b digitale Chaatin , Habit )) 3 Subsorilbe, on yptube Rf eke § Genginerdmath digtalbile Chuan , tnbik)) ty (ak) , Sema prt! (*XNalwe 6 7) Sena). qrnk Yuval 5 | Sena}, prt Cy Value 1s "y, Sonal, print ' Nval 5 Sena. pnt C° Suntd Sade 15 "9; Sena) « qrintlh Sval y, 3 joe nwt Rn = 25 S) 7 wok pun alg ; dhe wt dt = B®) pind, _rc Youd setup q/ pore 1/0 I put nt setup ede bere, 40 yun once, [ Serial beg, (9000) ; “onp ph Irlewo nitude, ¢ wartin Pin , wiry, digtallne Coit, Yb): Yord loop) ¥ I put your tain code Were, 10 run repeatedly butt Value = di si ead Clovttinin) i, Sena « prnk ; “Naw Bull is ‘)) Sona «prnkiny Clout alae, dele Cat) }

You might also like