Monday, November 17, 2025

Arduino ( 3 - 8 ) LED Fade In / Fade Out

 Code များအား ကူးယူရာတွင် Code များ မကျန်ခဲ့စေရန် သေချာဂုရုစိုက်၍ ကူးယူစေလိုပါသည်။


Code ##

const int ledPin = 9;

void setup() {
//Declare LED Pin as Output
pinMode(ledPin, OUTPUT);
}
void loop() {
for(int a = 0; a <= 255; a++)
//for ( initialize; control; increment or decrement)
{
analogWrite(ledPin, a );
delay(10); //Slowly turn on the LED
}
delay(200);
for(int a = 255; a >= 0; a--) {
analogWrite(ledPin, a);
delay(10); //Slowly turn off the LED
}
delay(200);
}

No comments:

Post a Comment

Home Appliances ( 1 - 3 ) လျှပ်စစ်မီးဖိုစစ်ဆေးခြင်း

မီးဖိုတခုကို မီးထိုးထားချိန် တခါတရံ ဓါတ်လိုက်ခြင်းကို ကြုံဖူးပါလိမ့်မယ် . မြန်မာနိုင်ငံတွင် Earth စနစ်တပ်ဆင်ထားခြင်း အလွန်နည်းပါးတာကြောင့် အ...