Bought one of these RGB LEDs from Adafruit; here’s a video of it in action. I didn’t save the Arduino sketch, but I simply declared the PWM out value for each pin as a random byte between 0 and 255 in the setup() function and just added 1 to each value every iteration of the loop() function (since they were declared as bytes, it wraps around after exceeding a value of 255).

Tagged with:
 

Comments are closed.