Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int ledPins[] = {3, 5, 6, 9, 10, 11};// hard code locations for leds
- const int numVals = 6;
- int pwmVals[numVals];
- void setup(){
- for( int i = 0; i < numVals; i++){
- pinMode(ledPins[i], OUTPUT);
- pwmVals[i] = 0;
- }
- }
- void loop(){
- for( int i = 0; i < numVals; i++){
- pwmVals[i] = int( random(255) );
- analogWrite(ledPins[i], pwmVals[i]);
- }
- delay(100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement