bantu donk para master arduino tuk kembangkan sketch ini,, 10 led berkedip secara bergantian ,,pengembangannya saya butuh 10 step delay time ( delay dari 10 - 100 detik) yang bisa diatur dengan 2 buah push button up dan down,
// These constants won't change. They're used to give names
// to the pins used:
const int lowestPin = 0;
const int highestPin = 9;
void setup() {
// set pins 2 through 13 as outputs:
for (int thisPin =lowestPin; thisPin <= highestPin; thisPin++) {
pinMode(thisPin, OUTPUT);
}
}
void loop() {
// iterate over the pins:
for (int thisPin =lowestPin; thisPin <= highestPin; thisPin++) {
// fade the LED on thisPin from off to brightest:
for (int brightness = 0; brightness < 255; brightness++) {
analogWrite(thisPin, brightness);
delay(2);
}
// fade the LED on thisPin from brithstest to off:
for (int brightness = 255; brightness >= 0; brightness--) {
analogWrite(thisPin, brightness);
delay(2);
}
// pause between LEDs:
delay(100);
}
OK.txt (846 Bytes)