Stap 4: Project schets, foto's en video 's
LEDs zijn aangesloten op Arduino PWM pinnen 3, 5, 6, 9, 10, 11
int geleid [7] = {3, 5, 6, 9, 10, 11};
int va0 = 0;
int va1 = 0;
int va2 = 0;
int va3 = 0;
int va4 = 0;
int va5 = 0;
int va6 = 0;
int delayVal = 0;
VOID Setup {}
randomSeed(0);
LED pinnen als uitgang instellen
for (int i = 0; ik < 6; i ++) {}
pinMode (led [i], OUTPUT);
}
}
void loop {}
Rode LED
va0 = willekeurige (180, 255);
analogWrite (onder leiding van [0], va0);
Rode LED
va1 = willekeurige (180, 255);
analogWrite (onder leiding van [1], va1);
Rode LED
va2 = willekeurige (180, 255);
analogWrite (onder leiding van [2], va2);
Witte LED
va3 = willekeurige (10, 20);
analogWrite (onder leiding van [3], va3);
Gele LED
va4 = willekeurige (50, 180);
analogWrite (onder leiding van [4], va4);
Rode LED
va5 = willekeurige (180, 255);
analogWrite (onder leiding van [5], va5);
delayVal = willekeurige (40, 120);
delay(delayVal);
}
Foto's & Video 's
Test No. 1 Video
Test No. 2-Video