If you were paying attention in the last step, you may have got a clue from the photo there, about what we are now going to build. Grab yourself a bread board, and wedge your freshly programmed Tiny45 in the middle of it, straddling the divide.
Next, get your LED and give it's underside a good close looking at, with a magnifying glass if you need to. Inside the clear plastic, one of the four pins is wired up differently to the other three. (see the photo) This is your common pin (i'm assuming, like me, you are using common anode LEDs). Make a note of this pin, don't loose it. Push the LED into the bread board, at an angle of about 45 degrees, this allows each pin of the LED to sit in a different track on the bread board. Now remove the LED again, because you've forgotten which pin is the common, find it, and push it back in again.
Grab the Tiny45 datasheet
, or specifically this
image, and with a bit of wire, connect the Common Anode pin to the same track of the breadboard that the t45's Vcc pin is sitting in.
Next, use the your resistors to connect the other three pins of the LED to ports PB1, PB3 and PB4 of the chip.
Now Grab your Arduino, and connect the 5V and Gnd to the chip's Vcc and Gnd tracks. This provides power for your Pixels. Next, connect PB0 on the chip to the Arduino's Analogue port 4, and PB2 to the Arduino's Analogue port 5. This is the I2C
connections, the data bus down which instructions are sent to the pixels
Use the photos I've included as reference.
Now that everything is wired up, you should connect the arduino to a USB supply, and let the power flow! If it all goes well, you should see... er... nothing. perhaps a little flash from the LED as you power it up, but otherwise nothing at all. Don't panic, we should be all right.
Load up the BlinkM sequencer you downloaded in the last step, and in the file menu, select "connect to arduino". It will ask you what COM port, and you should enter whatever the arduino is on (help
!). When the status text in the very bottom right of the sequencer window tells you it's connected, hit any colour on the swatch panel. Bask in the light of your own creation, as the LED glows forth. Or not. If it doesn't ( and it should) there is something wrong. Check these things:
You have the I2C lines plugged in the right way round.
Check the Fuses on the ATtiny45.
Reflash the BlinkM communicator Sketch onto the arduino and then connect the sequencer to the arduino again.
You are using the right code for the right kind of LED? (Common Cathode, or Anode?)
Check all your cables.
Every time I built a new pixel and tested (admittedly, I've only built four so far) It didn't work. But every time it didn't work it was because I'd either forgotten to unset the "Clock Div by 8" Fuse in the uC or I'd screwed up the wiring. (Once it was because I thought I'd been clever and made some mods to the BlinkM communicator sketch on the arduino. Keep it fresh kids, use it right out of the tin until you know what you are doing.)
I'm going to assume that you've just spent five minutes cursing, quietly, and then suddenly low and behold the light shines on!
Awesomeness in the supreme! You have built a Ghetto Pixel!
Next up, lets look at making this a bit more permanent, grab your iron, we're going a solderin'...