Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void loop() {
- int numArray[6] = { 3,5,6,9,10,11 };
- int randomIndex = rand() % 6;
- int randomValue = numArray[randomIndex];
- analogWrite(randomValue, brightness);
- brightness = brightness + fadeStep;
- delay(10);
- if (brightness == 255 || brightness == 0){
- fadeStep = -fadeStep;
- }
- delay(10);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement