So i have built all of the hardware needed by following this... http://www.stationinthemetro.com/index.php/archives/2008/01/19/makedc-led-cube-workshop/
Yet, It does not say where to connect the led's. I tried looking in the code, but i dont know that much to see what pins are connecting the led's. Would someone please just tell me where to connect the nine anodes.. Thanks so much...
Well, somewhere in the code it says:
/*
** Defining pins in array makes it easier to rearrange how cube is wired
** Adjust numbers here until LEDs flash in order - L to R, T to B
** Note that analog inputs 0-5 are also digital outputs 14-19!
** Pin DigitalOut0 (serial RX) and AnalogIn5 are left open for future apps
*/
int LEDPin[] = {16, 3, 1, 15, 4, 6, 14, 5, 7};
int PlanePin[] = {19, 18, 17};
So, the planes should be connected to analog 3,4,5 and the leds to digital 1,3,4,5,6,7... analog 14,15,16...
Play around whit the order of the pins and you should get the same result as on that site...
Jon
I built this too, anodes or positive go to: i16, 3, 1, 15, 4, 6, 14, 5, 7
Cathodes go to: 19, 18, 17,
If you sequentially organise the anode connections, I went from 13 down to 4, it's easier to troubleshoot
A couple of cubes i saw needed some sort of transitor do i need one on those here? I think it was 2n2222
I am thinking of creating something like this too but I'm not really sure if the code would allow me to control each of the LEDs.
Is this possible with the arduino, and if so how do I do it. Sorry I'm a total newbie.
I used this code and it works great! All of the leds worked just like they should. Basically just solder up a 3x3x3 led cube and connect it by looking at what we said earlier in these posts, and you should be fine.
#include <avr/pgmspace.h> // allows use of PROGMEM to store patterns in flash
#define CUBESIZE 3
#define PLANESIZE CUBESIZE*CUBESIZE
#define PLANETIME 3333 // time each plane is displayed in us -> 100 Hz refresh
#define TIMECONST 20 // multiplies DisplayTime to get ms - why not =100?
// LED Pattern Table in PROGMEM - last column is display time in 100ms units
// TODO this could be a lot more compact but not with binary pattern representation
prog_uchar PROGMEM PatternTable[] = {
// blink on and off
B111, B111, B111, B111, B111, B111, B111, B111, B111, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B000, 1,
// flash each LED in sequence:
// Left->Right column, then Top->Bottom row, then Upper->Lower plane
B100, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B010, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B001, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B000, B100, B000, B000, B000, B000, B000, B000, B000, 1,
B000, B010, B000, B000, B000, B000, B000, B000, B000, 1,
B000, B001, B000, B000, B000, B000, B000, B000, B000, 1,
B000, B000, B100, B000, B000, B000, B000, B000, B000, 1,
B000, B000, B010, B000, B000, B000, B000, B000, B000, 1,
B000, B000, B001, B000, B000, B000, B000, B000, B000, 1,
B000, B000, B000, B100, B000, B000, B000, B000, B000, 1,
B000, B000, B000, B010, B000, B000, B000, B000, B000, 1,
B000, B000, B000, B001, B000, B000, B000, B000, B000, 1,
B000, B000, B000, B000, B100, B000, B000, B000, B000, 1,
B000, B000, B000, B000, B010, B000, B000, B000, B000, 1,
B000, B000, B000, B000, B001, B000, B000, B000, B000, 1,
B000, B000, B000, B000, B000, B100, B000, B000, B000, 1,
B000, B000, B000, B000, B000, B010, B000, B000, B000, 1,
B000, B000, B000, B000, B000, B001, B000, B000, B000, 1,
B000, B000, B000, B000, B000, B000, B100, B000, B000, 1,
B000, B000, B000, B000, B000, B000, B010, B000, B000, 1,
B000, B000, B000, B000, B000, B000, B001, B000, B000, 1,
B000, B000, B000, B000, B000, B000, B000, B100, B000, 1,
B000, B000, B000, B000, B000, B000, B000, B010, B000, 1,
B000, B000, B000, B000, B000, B000, B000, B001, B000, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B100, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B010, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 10,
// Some little cube - big cube fun
B000, B000, B000, B000, B011, B011, B000, B011, B011, 10,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 10,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 2,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 2,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 2,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 2,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 2,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 2,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 1,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B110, B110, B000, B110, B110, B000, B000, B000, B000, 1,
B100, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B110, B110, B000, B110, B110, B000, B000, B000, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 1,
B000, B000, B000, B000, B011, B011, B000, B011, B011, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B110, B110, B000, B110, B110, B000, B000, B000, B000, 1,
B100, B000, B000, B000, B000, B000, B000, B000, B000, 1,
B110, B110, B000, B110, B110, B000, B000, B000, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B011, B011, B000, B011, B011, B000, B000, B000, 1,
B000, B000, B001, B000, B000, B000, B000, B000, B000, 1,
B000, B011, B011, B000, B011, B011, B000, B000, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B000, B000, B110, B110, B000, B110, B110, B000, 1,
B000, B000, B000, B000, B000, B000, B100, B000, B000, 1,
B000, B000, B000, B110, B110, B000, B110, B110, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B011, B011, B000, B011, B011, B000, B000, B000, 1,
B000, B000, B001, B000, B000, B000, B000, B000, B000, 1,
B000, B011, B011, B000, B011, B011, B000, B000, B000, 1,
B111, B111, B111, B111, B111, B111, B111, B111, B111, 1,
B000, B000, B000, B110, B110, B000, B110, B110, B000, 1,
B000, B000, B000, B000, B000, B000, B100, B000, B000, 1,
B000, B000, B000, B110, B110, B000, B110, B110, B000, 1,
// Diagonal wipe, starting in the center
B111, B111, B111, B111, B111, B111, B111, B111, B111, 5,
B111, B111, B111, B111, B111, B111, B111, B101, B111, 1,
B111, B111, B111, B111, B101, B111, B111, B101, B111, 1,
B111, B111, B111, B111, B101, B111, B111, B100, B111, 1,
B111, B101, B111, B111, B100, B111, B111, B100, B110, 1,
B111, B101, B111, B111, B100, B111, B111, B100, B110, 1,
B111, B011, B111, B111, B100, B110, B111, B100, B100, 1,
B111, B100, B110, B111, B100, B100, B111, B100, B000, 1,
B111, B100, B100, B111, B100, B000, B111, B000, B000, 1,
B111, B100, B000, B111, B000, B000, B011, B000, B000, 1,
B111, B000, B000, B011, B000, B000, B001, B001, B000, 1,
// 2-LED wide diaginal stripe that orbits the cube
B011, B000, B000, B001, B001, B000, B000, B001, B001, 1,
B001, B001, B000, B000, B001, B001, B000, B000, B011, 1,
B000, B001, B001, B000, B000, B011, B000, B000, B110, 1,
B000, B000, B011, B000, B000, B110, B000, B100, B100, 1,
B000, B000, B110, B000, B100, B100, B100, B100, B000, 1,
B000, B100, B100, B100, B100, B000, B110, B000, B000, 1,
B100, B100, B000, B110, B000, B000, B011, B000, B000, 1,
B110, B000, B000, B011, B000, B000, B001, B001, B000, 1,
// Now, with center flashies, for flavor
B011, B000, B000, B001, B001, B000, B000, B011, B001, 1,
B001, B001, B000, B000, B001, B001, B000, B000, B011, 1,
B000, B001, B001, B000, B000, B011, B000, B010, B110, 1,
B000, B000, B011, B000, B000, B110, B000, B100, B100, 1,
B000, B000, B110, B000, B100, B100, B100, B110, B000, 1,
B000, B100, B100, B100, B100, B000, B110, B000, B000, 1,
B100, B100, B000, B110, B000, B000, B011, B010, B000, 1,
B110, B000, B000, B011, B000, B000, B001, B001, B000, 1,
B011, B000, B000, B001, B011, B000, B000, B001, B001, 1,
B001, B001, B000, B000, B001, B001, B000, B000, B011, 1,
B000, B001, B001, B000, B010, B011, B000, B000, B110, 1,
B000, B000, B011, B000, B000, B110, B000, B100, B100, 1,
B000, B000, B110, B000, B110, B100, B100, B100, B000, 1,
B000, B100, B100, B100, B100, B000, B110, B000, B000, 1,
B100, B100, B000, B110, B010, B000, B011, B000, B000, 1,
B110, B000, B000, B011, B000, B000, B001, B001, B000, 1,
B011, B010, B000, B001, B001, B000, B000, B001, B001, 1,
B001, B001, B000, B000, B001, B001, B000, B000, B011, 1,
B000, B011, B001, B000, B000, B011, B000, B000, B110, 1,
B000, B000, B011, B000, B000, B110, B000, B100, B100, 1,
B000, B010, B110, B000, B100, B100, B100, B100, B000, 1,
B000, B100, B100, B100, B100, B000, B110, B000, B000, 1,
B100, B110, B000, B110, B000, B000, B011, B000, B000, 1,
B110, B000, B000, B011, B000, B000, B001, B001, B000, 1,
// Wrapping up
B001, B001, B000, B000, B001, B001, B000, B000, B001, 1,
B001, B001, B000, B000, B001, B001, B000, B000, B001, 1,
B000, B001, B001, B000, B000, B001, B000, B000, B001, 1,
B000, B000, B001, B000, B000, B001, B000, B000, B001, 1,
B000, B000, B000, B000, B000, B001, B000, B000, B001, 1,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B000, 3,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B000, 3,
B000, B000, B000, B000, B000, B000, B000, B000, B001, 5,
B000, B000, B000, B000, B000, B000, B000, B000, B000, 3,
// this is a dummy element for end of table (duration=0)
B000, B000, B000, B000, B000, B000, B000, B000, B000, 0
};
/*
** Defining pins in array makes it easier to rearrange how cube is wired
** Adjust numbers here until LEDs flash in order - L to R, T to B
** Note that analog inputs 0-5 are also digital outputs 14-19!
** Pin DigitalOut0 (serial RX) and AnalogIn5 are left open for future apps
*/
int LEDPin[] = {16, 3, 1, 15, 4, 6, 14, 5, 7};
int PlanePin[] = {19, 18, 17};
// initialization
void setup()
{
int pin; // loop counter
// set up LED pins as output (active HIGH)
for (pin=0; pin<PLANESIZE; pin++) {
pinMode( LEDPin[pin], OUTPUT );
}
// set up plane pins as outputs (active LOW)
for (pin=0; pin<CUBESIZE; p
Actually why don't you just go here, i could not put all the code in...
http://www.stationinthemetro.com/index.php/archives/2008/01/19/makedc-led-cube-workshop/
What about the schematics, it looks really complicated and I want to try this out on a breadboard first just in case. So it's important for the initial layout to work.
Lets see, its based on a podcast done by bre pettis "x" make magazine...They have exactly the stuuff in here, just skip over the stuff about the mini pov kit if u want.... heres the link... Make a Pocket LED Cube - YouTube
You would probably need a very large breadboard for this, you could try it, but i did not make a mistake if you make a jig which helps you solder... Thanks for the replys!
Sorry I was a bit busy but I will give it a try soon. I really do need this to work before early January.
Well, there good news for you, because t only took me a week to build this and have it work...