loading
How to make that cube do what you want it to!

I followed the instructable here and built a 3x3 LED cube run by an Arduino. I was delighted! But it could only do one routine. Again and again and again and again and again.... So I decided to try and program a different routine. I needed a change. Do you?

If you study the code in the cube's Arduino sketch you can see all the instructions right in front of you. To me, it looks like the Matrix, streaming by in all its digital confusability. I needed a graphic interface to help me code the routines. I FOUND ONE!!! But it wrote code that contained extra information that I did not want. How to rewrite all those instructions? Read on!

Be prepared, this is a twisted solution, combining an (apparently) anonymous website with a macro in my word processor, but in the end I have come up with a routine that is very powerful indeed!

Step 1: graphic pattern generator

I searched and searched for "LED Cube Programmers" on the web. I found some, but they were for PIC based cubes. I changed the title of my search to "LED Cube Pattern Generator" and BINGO! I finally found this one, and it allowed my simple mind to grasp the relationship between little flashing lights and gobs of 1's and 0's. I could punch little buttons on the screen and see a simulation of what I was doing! Just what I wanted. This generator allows one to use a cube of any size! Press the "new" button and you will be prompted to set up your cube.

'Insert' creates a new frame, just like a simple animation program. We are going to make a 'flip book,' in effect. Each page is programmed and then you hit the insert button to add another frame. Notice the speed parameter near the bottom of the window marked 'frames.' F and E mean 'Fill' and 'Erase.' Program a few frames and hit the 'Play' button. Your animation will be shown in the 'preview' window. Simple! When you are done and want to save your new light show, hit the 'File' button. You will see the buttons marked 'New',' to Code',' Load' and 'Save' appear. Press 'To Code,'and a window will open, asking you to choose in which order you wish to display your data. You can go back and change this later if you get it wrong. Just choose one for now.

You will then see a window with all your animation's coded bytes.

Advertisement

<p>Hey!<br>I'm having some problems programming a 3x3 LED cube and was wondering if someone could help and send me the correct ARDUINO coding?</p><p>Thank you in advance! (Btw, my email is 1loki2loki@gmail.com)</p>
Here are two examples that should work. One uses a library called ledcube.h that can be found here: https://github.com/gzip/arduino-ledcube/blob/master/LedCube.h<br><br>The other works for me. <br><br>/*<br> ledcube.pde - Example sketch for controlling an LED cube.<br> Created by Gamaiel Zavala (gzip), 2009-2012<br> MIT License. See accompanying LICENSE file for terms.<br>*/<br><br>#include <br><br>#define SIZE 3<br>#define COLS (SIZE*SIZE)<br><br>byte levelPins[SIZE] = {11,12,13};<br>byte colPins[COLS] = {2,3,4,5,6,7,8,9,10};<br><br>LedCube cube(SIZE, levelPins, colPins);<br><br>void setup ()<br>{<br>}<br><br>void loop ()<br>{<br> delay(10);<br> <br> // light each light one at a time<br> for(byte level=0; level {<br> for(byte col=0; col {<br> cube.lightPulse(level, col, 100);<br> }<br> }<br> <br> // light one level at a time, increasing speed each time<br> for(byte d=25; d&gt;2; d-=2)<br> {<br> for(byte l=1; l &lt;= cube.getLevels(); l++)<br> {<br> cube.lightLevel(l, d);<br> }<br> }<br> <br> // light each row on each level<br> for(byte level=1; level&lt;=cube.getLevels(); level++)<br> {<br> for(byte row=1; row&lt;=cube.getLevels()*2; row++)<br> {<br> cube.lightRow(row, level);<br> }<br> }<br> <br> // light each plane<br> for(byte i=3; i; i--)<br> {<br> for(byte row=1; row&lt;=cube.getLevels()*2; row++)<br> {<br> cube.lightPlane(row, 10*i);<br> }<br> }<br> <br> // single random light at a time<br> cube.randomLight(random(25,100),100);<br> <br> // random column drop<br> for(byte x=0; x&lt;=15; x++)<br> {<br> cube.lightDrop(random(0,cube.getCols()), random(50,150));<br> }<br> <br> // circle around cube at a random level<br> for(byte x=0; x&lt;=5; x++)<br> {<br> cube.lightPerimeter(random(0,cube.getLevels()), random(1,5), random(25,100));<br> }<br> <br> // light each face<br> byte planes[] = {cube.getLevels()+1,cube.getLevels(),cube.getLevels()*2,1};<br> for(byte i=5; i; i--)<br> {<br> for(byte p=0; p {<br> cube.lightPlane(planes[p], 5*i);<br> }<br> }<br> <br> // random columns<br> cube.randomColumn(25);<br> <br> // turn off a single column randomly<br> cube.enableBuffer();<br> for(byte c=0; c&lt;30; c++)<br> {<br> cube.fillBuffer();<br> cube.invertBuffer();<br> cube.randomColumn();<br> cube.drawBuffer(7);<br> }<br> cube.enableBuffer(false);<br> <br> // cols in and out<br> for(byte c=1, d=0; c&lt;=10; c++)<br> {<br> if(c%2 == 0)<br> {<br> for(d=0; d&lt;20; d++)<br> {<br> cube.lightColumn(2,1);<br> cube.lightColumn(4,1);<br> cube.lightColumn(6,1);<br> cube.lightColumn(8,1);<br> }<br> }<br> else if(c%4 == 1)<br> {<br> for(d=0; d&lt;30; d++)<br> {<br> cube.lightColumn(1,1);<br> cube.lightColumn(3,1);<br> cube.lightColumn(7,1);<br> cube.lightColumn(9,1);<br> }<br> }<br> else<br> {<br> for(d=0; d&lt;70; d++)<br> {<br> cube.lightColumn(5,1);<br> }<br> }<br> }<br> <br> // diamond and box<br> byte diamond[] = {0,4, 1,1, 1,3, 1,4, 1,5, 1,7, 2,4};<br> byte box[] = {<br> 2,0, 2,1, 2,2, 2,3, 2,5, 2,6, 2,7, 2,8,<br> 1,0, 1,2, 1,6, 1,8,<br> 0,0, 0,1, 0,2, 0,3, 0,5, 0,6, 0,7, 0,8<br> };<br> cube.lightSequence(box, sizeof(box), 200);<br> cube.lightSequence(diamond, sizeof(diamond), 400);<br> <br> // helicopter effect<br> byte topSeq[8] = {0,3,6,7,8,5,2,1};<br> byte botSeq[8] = {8,5,2,1,0,3,6,7};<br> for(byte loops = 0, delay = 50; loops&lt;=8; loops++)<br> {<br> for(byte s=0; s&lt;8; s++)<br> {<br> byte seq[] = {2,topSeq[s], 1,4, 0,botSeq[s]};<br> cube.lightSequence(seq, sizeof(seq), delay);<br> } <br> if(loops &lt; 5) delay-=10; else delay += 10;<br> }<br> <br> // turn off one light at a time<br> cube.enableBuffer();<br> cube.fillBuffer();<br> cube.drawBuffer(25);<br> for(byte w=0, l, c, max = cube.getNumLights(); w {<br> // lower bound is inclusive, upper is exclusive<br> l = random(0, cube.getLevels());<br> c = random(0, cube.getCols());<br> <br> if(cube.getBufferAt(l,c) == HIGH)<br> {<br> cube.lightOff(l,c);<br> cube.drawBuffer(5);<br> w++;<br> }<br> }<br> cube.enableBuffer(false);<br>}<br><br><br>/////////////////////////////////////////////////////////////////<br>and the second:<br>/////////////////////////////////////////////////////////////////<br><br>/*<br>Based on ledcube.c from Make: September 7, 2007 weekend podcast <br>http://blog.makezine.com/archive/2007/09/make_a_pocket_led_cube_we.html<br><br>Custom animation programmed by Mark Boszko, http://stationinthemetro.com<br>*/<br><br>#include // allows use of PROGMEM to store patterns in flash<br><br>#define CUBESIZE 3<br>#define PLANESIZE CUBESIZE*CUBESIZE<br>#define PLANETIME 3333 // time each plane is displayed in us -&gt; 100 Hz refresh<br>#define TIMECONST 5 // multiplies DisplayTime to get ms - why not =100?<br><br>// LED Pattern Table in PROGMEM - last column is display time in 100ms units<br>// TODO this could be a lot more compact but not with binary pattern representation<br>prog_uchar PROGMEM PatternTable[] = {<br><br> <br> B101, B010, B101, B000, B000, B000, B000, B000, B000, 50 , <br> B000, B000, B000, B000, B010, B000, B000, B000, B000, 50 , <br> B000, B000, B000, B000, B000, B000, B101, B010, B101, 50 , <br> B000, B000, B000, B000, B010, B000, B000, B000, B000, 50 , <br> B101, B000, B000, B010, B000, B000, B101, B000, B000, 50 , <br> B000, B000, B000, B000, B010, B000, B000, B000, B000, 50 , <br> B000, B000, B101, B000, B000, B010, B000, B000, B101, 50 , <br> B000, B000, B000, B000, B010, B000, B000, B000, B000, 50 , <br> B101, B010, B101, B000, B000, B000, B000, B000, B000, 50 , <br> B000, B000, B000, B000, B010, B000, B000, B000, B000, 40 , <br> B000, B000, B000, B000, B000, B000, B101, B010, B101, 40 , <br> B000, B000, B000, B000, B010, B000, B000, B000, B000, 40 , <br> B101, B000, B000, B010, B000, B000, B101, B000, B000, 40 , <br> B000, B000, B000, B000, B010, B000, B000, B000, B000, 40 , <br> B000, B000, B101, B000, B000, B010, B000, B000, B101, 30 , <br> B000, B000, B000, B000, B010, B000, B000, B000, B000, 30 ,<br> B101, B010, B101, B000, B000, B000, B000, B000, B000, 30 , <br> B000, B000, B000, B000, B010, B000, B000, B000, B000, 30 , <br> B000, B000, B000, B000, B000, B000, B101, B010, B101, 30 , <br> B000, B000, B000, B000, B010, B000, B000, B000, B000, 20 , <br> B011, B101, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B101, B101, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B110, B101, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B100, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B101, B110, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B101, B101, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B101, B011, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B001, B111, B000, B000, B000, B000, B000, B000, 10 ,<br> B011, B101, B111, B011, B101, B111, B000, B000, B000, 10 , <br> B101, B101, B111, B101, B101, B111, B000, B000, B000, 10 , <br> B110, B101, B111, B110, B101, B111, B000, B000, B000, 10 , <br> B111, B100, B111, B111, B100, B111, B000, B000, B000, 10 , <br> B111, B101, B110, B111, B101, B110, B000, B000, B000, 10 , <br> B111, B101, B101, B111, B101, B101, B000, B000, B000, 10 , <br> B111, B101, B011, B111, B101, B011, B000, B000, B000, 10 , <br> B111, B001, B111, B111, B001, B011, B000, B000, B000, 10 ,<br> B011, B101, B111, B011, B101, B111, B011, B101, B111, 10 , <br> B101, B101, B111, B101, B101, B111, B101, B101, B111, 10 , <br> B110, B101, B111, B110, B101, B111, B110, B101, B111, 10 , <br> B111, B100, B111, B111, B100, B111, B111, B100, B111, 10 , <br> B111, B101, B110, B111, B101, B110, B111, B101, B110, 10 , <br> B111, B101, B101, B111, B101, B101, B111, B101, B101, 10 , <br> B111, B101, B011, B111, B101, B011, B111, B101, B011, 10 , <br> B111, B001, B111, B111, B001, B111, B111, B001, B110, 10 ,<br> B011, B101, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B101, B101, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B110, B101, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B100, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B101, B110, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B101, B101, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B101, B011, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B001, B111, B000, B000, B000, B000, B000, B000, 10 ,<br> B011, B101, B111, B011, B101, B111, B000, B000, B000, 10 , <br> B101, B101, B111, B101, B101, B111, B000, B000, B000, 10 , <br> B110, B101, B111, B110, B101, B111, B000, B000, B000, 10 , <br> B111, B100, B111, B111, B100, B111, B000, B000, B000, 10 , <br> B111, B101, B110, B111, B101, B110, B000, B000, B000, 10 , <br> B111, B101, B101, B111, B101, B101, B000, B000, B000, 10 , <br> B111, B101, B011, B111, B101, B011, B000, B000, B000, 10 , <br> B111, B001, B111, B111, B001, B011, B000, B000, B000, 10 ,<br> B011, B101, B111, B011, B101, B111, B011, B101, B111, 10 , <br> B101, B101, B111, B101, B101, B111, B101, B101, B111, 10 , <br> B110, B101, B111, B110, B101, B111, B110, B101, B111, 10 , <br> B111, B100, B111, B111, B100, B111, B111, B100, B111, 10 , <br> B111, B101, B110, B111, B101, B110, B111, B101, B110, 10 , <br> B111, B101, B101, B111, B101, B101, B111, B101, B101, 10 , <br> B111, B101, B011, B111, B101, B011, B111, B101, B011, 10 , <br> B111, B001, B111, B111, B001, B111, B111, B001, B110, 10 ,<br> B011, B101, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B101, B101, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B110, B101, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B100, B111, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B101, B110, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B101, B101, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B101, B011, B000, B000, B000, B000, B000, B000, 10 , <br> B111, B001, B111, B000, B000, B000, B000, B000, B000, 10 ,<br> B011, B101, B111, B011, B101, B111, B000, B000, B000, 10 , <br> B101, B101, B111, B101, B101, B111, B000, B000, B000, 10 , <br> B110, B101, B111, B110, B101, B111, B000, B000, B000, 10 , <br> B111, B100, B111, B111, B100, B111, B000, B000, B000, 10 , <br> B111, B101, B110, B111, B101, B110, B000, B000, B000, 10 , <br> B111, B101, B101, B111, B101, B101, B000, B000, B000, 10 , <br> B111, B101, B011, B111, B101, B011, B000, B000, B000, 10 , <br> B111, B001, B111, B111, B001, B011, B000, B000, B000, 10 ,<br> B011, B101, B111, B011, B101, B111, B011, B101, B111, 10 , <br> B101, B101, B111, B101, B101, B111, B101, B101, B111, 10 , <br> B110, B101, B111, B110, B101, B111, B110, B101, B111, 10 , <br> B111, B100, B111, B111, B100, B111, B111, B100, B111, 10 , <br> B111, B101, B110, B111, B101, B110, B111, B101, B110, 10 , <br> B111, B101, B101, B111, B101, B101, B111, B101, B101, 10 , <br> B111, B101, B011, B111, B101, B011, B111, B101, B011, 10 , <br> B111, B001, B111, B111, B001, B111, B111, B001, B110, 10 ,<br> B000, B000, B000, B000, B000, B000, B100, B000, B000, 20 , <br> B000, B000, B000, B100, B000, B000, B000, B000, B000, 20 , <br> B100, B000, B000, B000, B000, B000, B000, B000, B000, 20 , <br> B010, B000, B000, B000, B000, B000, B000, B000, B000, 20 , <br> B000, B000, B000, B010, B000, B000, B000, B000, B000, 20 , <br> B000, B000, B000, B000, B000, B000, B010, B000, B000, 20 , <br> B000, B000, B000, B000, B000, B000, B001, B000, B000, 20 , <br> B000, B000, B000, B001, B000, B000, B000, B000, B000, 20 , <br> B001, B000, B000, B000, B000, B000, B000, B000, B000, 20 , <br> B000, B001, B000, B000, B000, B000, B000, B000, B000, 20 , <br> B000, B000, B000, B000, B001, B000, B000, B000, B000, 20 , <br> B000, B000, B000, B000, B000, B000, B000, B001, B000, 20 , <br> B000, B000, B000, B000, B000, B000, B000, B000, B001, 20 , <br> B000, B000, B000, B000, B000, B001, B000, B000, B000, 20 , <br> B000, B000, B001, B000, B000, B000, B000, B000, B000, 20 , <br> B000, B000, B010, B000, B000, B000, B000, B000, B000, 20 , <br> B000, B000, B000, B000, B000, B010, B000, B000, B000, 20 , <br> B000, B000, B000, B000, B000, B000, B000, B000, B010, 20 , <br> B000, B000, B000, B000, B000, B000, B000, B000, B100, 20 , <br> B000, B000, B000, B000, B000, B100, B000, B000, B000, 20 , <br> B000, B000, B100, B000, B000, B000, B000, B000, B000, 20 , <br> B000, B100, B000, B000, B000, B000, B000, B000, B000, 20 , <br> B000, B000, B000, B000, B100, B000, B000, B000, B000, 20 , <br> B000, B000, B000, B000, B000, B000, B000, B100, B000, 20 , <br> B000, B000, B000, B000, B000, B000, B000, B000, B000, 20 , <br> <br> };<br><br>/*<br>** Defining pins in array makes it easier to rearrange how cube is wired<br>** Adjust numbers here until LEDs flash in order - L to R, T to B<br>** Note that analog inputs 0-5 are also digital outputs 14-19!<br>** Pin DigitalOut0 (serial RX) and AnalogIn5 are left open for future apps<br>*/<br><br>//int LEDPin[] = {16, 3, 1, 15, 4, 6, 14, 5, 7};<br>int LEDPin[] = { 2, 3, 4, 5, 6, 7, 8, 9, 10};<br><br>//int PlanePin[] = {19, 18, 17};<br>int PlanePin[] = {13, 12, 11};<br><br>// initialization<br>void setup()<br>{<br> int pin; // loop counter<br> // set up LED pins as output (active HIGH)<br> for (pin=0; pin pinMode( LEDPin[pin], OUTPUT );<br> }<br> // set up plane pins as outputs (active LOW) <br> for (pin=0; pin pinMode( PlanePin[pin], OUTPUT );<br> }<br>}<br><br>// display pattern in table until DisplayTime is zero (then repeat)<br>void loop()<br>{<br> // declare variables<br> byte PatternBuf[ PLANESIZE ]; // saves current pattern from PatternTable<br> int PatternIdx;<br> byte DisplayTime; // time*100ms to display pattern<br> unsigned long EndTime;<br> int plane; // loop counter for cube refresh<br> int patbufidx; // indexes which byte from pattern buffer<br> int ledrow; // counts LEDs in refresh loop<br> int ledcol; // counts LEDs in refresh loop<br> int ledpin; // counts LEDs in refresh loop<br><br> // Initialize PatternIdx to beginning of pattern table<br> PatternIdx = 0;<br> // loop over entries in pattern table - while DisplayTime&gt;0<br> do {<br> // read pattern from PROGMEM and save in array<br> memcpy_P( PatternBuf, PatternTable+PatternIdx, PLANESIZE );<br> PatternIdx += PLANESIZE;<br> // read DisplayTime from PROGMEM and increment index<br> DisplayTime = pgm_read_byte_near( PatternTable + PatternIdx++ ); <br> // compute EndTime from current time (ms) and DisplayTime<br> EndTime = millis() + ((unsigned long) DisplayTime) * TIMECONST;<br><br> // loop while DisplayTime&gt;0 and current time &lt; EndTime<br> while ( millis() &lt; EndTime ) {<br> patbufidx = 0; // reset index counter to beginning of buffer<br> // loop over planes<br> for (plane=0; plane // turn previous plane off<br> if (plane==0) {<br> digitalWrite( PlanePin[CUBESIZE-1], LOW );<br> } else {<br> digitalWrite( PlanePin[plane-1], LOW );<br> }<br><br> // load current plane pattern data into ports<br> ledpin = 0;<br> for (ledrow=0; ledrow for (ledcol=0; ledcol digitalWrite( LEDPin[ledpin++], PatternBuf[patbufidx] &amp; (1 &lt;&lt; ledcol) );<br> }<br> patbufidx++;<br> } <br><br> // turn current plane on<br> digitalWrite( PlanePin[plane], HIGH );<br> // delay PLANETIME us<br> delayMicroseconds( PLANETIME );<br> } // for plane<br> } // while } while (DisplayTime &gt; 0); // read patterns until time=0 which signals end<br>}<br><br>/////////////////////////////////////////<br>let me know how that works.<br>Jim<br><br>
<p>nicely explained !!!<br>thanks :)</p>
<p>why i get like thi. what i have to do</p>
<p>Try this website my friend has made. It is so much easier than the method outlined in this instructable.</p><p><a href="http://www.ledcube3d.tk/" rel="nofollow">http://www.ledcube3d.tk/</a></p>
<p>I'v get an error &quot; <strong>prog_uchar</strong> &quot; is undefined and that &quot; <strong>pgm_read_byte_near</strong> &quot; is a expected an expression don't know that means? could i missing a library and if i am which one??</p>
<p>Jacob, </p><p>if you look at this site, designed by my friend to program these <br>cubes, you will ind a much easier way to program a cube like this one. He is a fantastic coder in India, 15 years old... Check your pin numbers and rewrite them in your sketch to match the ones he uses. Let us know how it works.</p><p>A fantastic programming interface! Try it!! </p><p><a href="http://www.ledcube3d.tk/" rel="nofollow">http://www.ledcube3d.tk/</a></p>
<p>Will do, Thanks for the advise .</p>
Hello I had build this cube a while back and everything functioned correctly but when I tried to upload the code to my cube I keep getting an error on the very last like of the code. Error goes as follows<br>Expected 'else' before '}' I have read over the code atleast 20 times and I cannot figure it out. The code is exactly the same as what is posted on this site. Any help would be greatly appreciated
If you look at earlier comments on this instructable you will see a link I posted to a site my friend made. There you can program your led routine and upload his code. Try that it works and gives you more flexibility. Let me know how it goes.
OK thank you so much!
<p>on the 17th line of code in your example, &quot;prog_uchar PROGMEM PatternTable[] = {&quot; Needs to be modified. &quot;prog_uchar&quot; should be &quot;const char&quot;. Im not sure what &quot;prog_uchar&quot; is for, but in the current version of Arduino firmware, it does not know what to do with that. The line of code that worked for me was &quot;const char PROGMEM PatternTable[] = {&quot;</p>
<p>rkshirsarar, </p><p>if you look at this site, designed by my friend to program these cubes, you will see the pin numbers in his setup code located in the code examples he provides. He uses these pins for his setup and it works great! </p><p>int g1=4; <br>int g2=3; <br>int g3=2 (pins 4,3,2 for the transistors, 5-13 for the anodes, as stated there)</p><p>A fantastic programming interface! Try it!! </p><p><a href="http://www.ledcube3d.tk/" rel="nofollow">http://www.ledcube3d.tk/</a></p>
<p>Could you tell which pins of Arduino are connected to transistors and which pins are connected to anode of led's, I mean the schematic of the cube.</p>
<p>If anyone tries this... you should have a look at this fantastic online programmer for 3x3x3 cubes: <a href="http://ledcube.tk" rel="nofollow"> http://ledcube.tk</a></p><p>Lots of great features, and no more need for this workaround! </p><p>Thanks Satvik for the coding and work there. You've done a great job!</p>
<p>Hy,</p><p>I want to ask u about the </p><p><a href="http://ledcube.tk" rel="nofollow">http://ledcube.tk</a> I have done the led cube and I uploaded the code from the site but I have to change something in the code to make it work something like (a1),etc.CAn u help me please?</p>
It doesn't work for 4x4x4 cube.
i have a question about the code. <br>When i want to upload it to my arduino, i get an error on line: <br>int LEDPin[] = { 2, 3, 4, 5, 6, 7, 8, 9, 10}; <br> <br>it says: <br>sketch_jan07a:34: error: expected ',' or ';' before 'int' <br>sketch_jan07a.ino: In function 'void setup()': <br>sketch_jan07a:45: error: 'LEDPin' was not declared in this scope <br>sketch_jan07a.ino: In function 'void loop()': <br>sketch_jan07a:95: error: 'LEDPin' was not declared in this scope <br> <br>what can be the problem?
Your first error indicates a problem *before* inserting the changed lines. Check everything VERY carefully from the beginning and see if you can find a missing semicolon.
Hi, this is very interesting, but i have a question, is posible to program 2 or 3 routines and start them whit a button? thanks for afterhand
I never thought of that... why not? It is a matter of storing the routines as data, and then using a switch to select the data set, or the switch could select the starting point of the routine with case switch commands. There are others out there who are brazilians of times better at this than I am. We will have to seek the answer!!
Great able ,been looking for the led generator &amp; everytime go to Download more junk seems to be getting downloaded than the program, where did you get it Wout all the other advertisers junk..Thanks for sharing project &amp; time finding the way to go..D
I couldn't understand how to embed a video in any of the steps. Here is a link to one showing a short routine done using this method.<br><br>http://www.youtube.com/watch?v=aUib24e1Dzk

About This Instructable

63,057views

60favorites

License:

Bio: former musician. I have made kites, music instruments, electronic doodads, pitching machines, stomp rockets, water rockets, windless windchimes, circuit bent toys, animatronics, clock escapements, CNC ... More »
More by stringstretcher:3X3 LED Cube Programming tips (Arduino based) Simple (Deluxe!) Sonotube Food Dehydrator 
Add instructable to: