3D RGB LED CUBES‎ > ‎CharlieCube64‎ > ‎

Programming

Assuming that you built the cube exactly as i described, and assuming I accurately described the process to build the cube, then the software that asher glick wrote should work perfectly.

Check out the programming section on his website, and download the files from there.
Quick links;
Here you can read about and download the code.
http://aglick.com/charliecube.html#howIsItProgramed

This is a dirrect link to the libraries download.
https://github.com/AsherGlick/Charliecube/zipball/master

You will need to download and unzip the files to a folder, then open your arduino program, connect your arduino, make sure you have the right serial port set, and the right arduino type (mine is nano with 328), then open the charliecube.ino file, and click the upload button. It should compile, and upload the program, then start running.

Once you have a working cube, you should test the to make sure everything is setup right.

If you look in the charlicube.ino file, you will find this section:
void loop() {
  planarSpin();
  fountian();
  trifade();
  shiftSquares();
  tunnel();
  chaseTheDot();
  planarFlop3D();
 
}
Simply comment out programs you dont want it to run like:
void loop() {
 // planarSpin();
 // fountian();
  trifade();
//  shiftSquares();
//  tunnel();
//  chaseTheDot();
//  planarFlop3D();
 
}

Now the cube will only do the trifade routine. Let scroll down to look at it:

change all the :drawBox(blue and drawBox(green to drawBox(red in the trifade section, and it will just light up every LED red. You can upload the program, and you should see every LED turn red. Change those to green, and blue to test each individual LED lights. Try wiggling the spires if you have loose connections, some LEDs may flicker, track down the weak/broken solder joint(s), and repair.


If everything passes that, then go back to the void loop() section and comment out trifade, and uncomment fountain. Scroll down to the fountain code, and change the speed to 1000, this will slow it down to about 10 seconds per sequence. Upload the program and it should run, pay attention to where the first LEDs light up. It should start with the 4 center LEDs on the bottom plane, then move up to the next plane, then the 3rd plane, then the top plane, then to the outside 12 LEDs on the top plane, and it sequences each plane down to the bottom. It then changes color, and does the sequence again. If your spires dont have the correct orientation, it will like the wrong layer first (it may start in the middle or top layer, then sequence).

If you get all your spires lined up the same direction, but start your wiring with the cube turned the wrong way (this is really very easy, there are 3 ways to get it wrong, 1 way to get it right), you will need to change the mapping. its not in the mapping.h file, its in the Flush Buffer section of the cubeplex.h file. I modified the cubeplex.h file to include mappings for all 4 possibilities.

When you are testing the code, comment out all the programs except the fountain program. The fountain should start with the 4 center LEDs a the bottom of the cube, then go up, and to the outside square and down, then change color and repeat.

If you have any of the 16 arduino connections miswired, you could probably fix that in the mappings,h file, or you could fix it in the cubeplex.h, but that would probably be the harder way to fix it.

Now that the cube tests out, go and re-program it to do new things!  Change the patterns that it displays, add features like sound or controls, ...whatever it takes to have a good time, then share it with the rest of us.
ċ
cubeplex.h
(76k)
Hippy Nerd,
Apr 18, 2013, 10:42 AM
Comments