0% found this document useful (0 votes)
5 views9 pages

Led Flasher

The document outlines a procedure for programming LED flashing operations using a microcontroller. It includes code snippets for controlling red, green, and blue LEDs with specified on/off timings and duty cycles. The document emphasizes the use of digitalWrite and delay functions to achieve the desired LED flashing effects.

Uploaded by

u191318phy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views9 pages

Led Flasher

The document outlines a procedure for programming LED flashing operations using a microcontroller. It includes code snippets for controlling red, green, and blue LEDs with specified on/off timings and duty cycles. The document emphasizes the use of digitalWrite and delay functions to achieve the desired LED flashing effects.

Uploaded by

u191318phy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

ARH CorTEY M1cOCcNfOLLI F

y. No....32 bit ) L D Page No...


(Vate::I0:22

pim:
LEDEost FJashicq basic
celaur CRed, blueqraan) Fon
Coxtor paataying
minoCoatran
ü) To tuoak he ccodesio tdurto
The on ot timins and henco The
chatga
pattens

Rrquttomenti CAriy
Tavas Dsttunont TTVA
TM4C12 3Gtdanch pa

Prtocedutei
The falleina ca aotaro inttface
Qnatgia(l8E21)
mito omtrolla
nd upsad to tim
Page No 13
|Exp. No...

Date:

Pxoqam
Red ED ON and OFF Lns
Flashing
/* Bink RED LED
t dine LED RED LED
veid satup )
Pinmode CLED, oUTPUT)
void leopC)
digitate CLED, HIGHH)) +laxn Tho LED OH
delay CiBso); wait fort a econd
digitalwnite (LED, LO;un tae LED
6EF by making Tae uatag Lou

ca Flashing GREEN LED ON and OFE


/* Blik GiREEN LED
#datine LEbGREENLED
Veid eu up)
Pinmee (LED, ouTPUL
|Exp. N.
Paye No....
Date

Pregran
() Flashing Reed LED eN and ofE \ng
/* Bink RED LED
t dline LED
LED REDLED
Veid setup)
Pinmole (LED, oUTPUT);

void loop)
digitalite CLED, HIGtH) turo The LED oN
CHIGLH c the vol tagedaue)
delay Ciaso); wat ot aecand
digital wnite (LED, LO)un Tao LED
GEf by making The uatalou
dalay Ciono);wait onacend

C2) Flahing GREEN LED ON and OEE


/* Blink GREEN LED
# daine LEDlaREENLED
satup)
Pinmoale (LED, DUTPUT)
DATEOO

,3

Ani02710168
Exp. No...
Page No...S
Date

void loo p)
Aigtalwite CLED, HIGH)l turo The LED
ON CHItt the voltaele
delayCieec), l wit for aa acond
digtal wade CLEDLow); tuno 1te LED.
DEF by niaking tine vetagp Lew

(3) Elashinq BLUE LED ON and oEF fon ms

* Bink BlUE ED
dafine LED BLUELED
void setup)
Pinmode CLED, OTPUT);
Vpid Loop)
digitalwatite (LED, HTrH) turn The LeD
ONCHIGH sthe Vatuge louad
dalay C1oool; l lwait for a second
digitál istite CLED, LowiLt n the LED
by making the vetage la
dalay Ciosol; Lait fa a Second
Dutycycle (y. ) ON time
Total time

ON

Tfme
oFF
Time
Duty cgcle
Cms) Cms)
(r)

507

500 000

500 333/
Exp. N0...
Page No..
Date

Ce) Theak the GtREEN LED ON time eot uara


ave qnetation wits 50 dutyycle.
/*Blink HREEN LED
#datine LED GHREENLED
Void Setup)
Pinmade CLED, OuIPUr)
void Loop)
digitalrite (LED, HIHH)/tun the LED
ON (HiH the Vo ltage level
delay (ssol; wait feia loca
digital arite (LEDLON tun The LED
DEE byimakiag the
rae vsltagla
delayiocp) waiH fona sacone

(5) Tiweak the BluE lED ON Hme fon Sauane


ave gnetatian witt souty cyce
/*Bink GREEN LED
detine LEDBLUE lED
Meid setupl)
Pinmede (LED,bLTPUT ;
Exp. N0... | Page No......
Dafe

Void Lbop()
digitaloite(LED,HLGtH );/! tum the LEDoN
CHigh vo ltae level)
dalay (soo ); //wait fot aSacond
digital writelieD, Low ); tunn LED
OEF by Making The voltage Law

Rest:
Naicu, LED ELashing operatiaod a
pfamd wsing Software "Contral by wsing
L-OEF imings The LED Flah
Cesatorl waue fom ganetatian

You might also like