This instructable is to make programmable light effects using an RGB LED (this is an LED containing individual Red, Green and Blue elements) and the low cost Adafruit Trinket microcontroller. These lights can be used and re-used for multiple projects such as night lights, party lights and pumpkin lights for Halloween. The entire project only costs around $10 fully assembled.

Step 1: Preparation

Here are the components I used for this project:

1 x Adafruit Trinket (5V) (http://www.adafruit.com/products/1501)
1 x Adafruit Perma Proto Breadboard PCB (http://www.adafruit.com/products/589)
1 x Diffuse common-annode RGB LED (http://www.adafruit.com/products/302)
3 x 220 ohm resistor
1 x 9V battery connector
Some female headers that shipped with the trinket
Some male headers (http://www.adafruit.com/products/392)

Note that you can use a solderless breadboard instead of soldering this onto a PCB (and you should always do this first to make sure it works before committing to PCB). However, if you want to keep and reuse this project, I definitely recommend using a PCB. The great thing about the Adafruit breadboard PCB is that it is laid out exactly like a regular breadboard with lines of connected pads which makes soldering so much easier in my opinion.
Are you able to actually modulate pin #4 on the (blue) with the code above? My understanding is that you need to jump through some hoops to enable PWM on pin #4, as described in <a href="http://learn.adafruit.com/trinket-powered-analog-meter-clock/code" rel="nofollow">this Adafruit tutorial</a>.
I did run into this issue and posted a message on the Adafruit forum here: <br> <br>http://forums.adafruit.com/viewtopic.php?f=52&amp;t=43951&amp;p=219302&amp;hilit=trinket+pwm#p219302 <br> <br>There is some information here what to work around the issue. I haven't actually tried it myself yet but it is supposed to work. Hope that helps.
<p>Adafruit just posted a solution to this issue. See the end of this page:</p><p>https://learn.adafruit.com/introducing-trinket/programming-with-arduino-ide#analogwrite</p>
Do you have the re-written code with the fix for the pin 4 PWM issue? If so, could you add it to the instructable? I'd like to adapt it for a project I'm working on. Thanks
This is great keep up the good work

About This Instructable




Bio: I'm a software architect with an interest in electronics, robotics and generally making cool projects with my kids.
More by agrove3:Dalek Voice Changer Arduino Shield How to make an Ood Translation Sphere RGB LED lighting effects with Adafruit Trinket 
Add instructable to: