Page 1 of 1

Re: Debug

Posted: Sun Mar 23, 2014 11:02 pm
by cef
The main loop repeats after it finishes.

You need to put some delays in there to stop the program from doing anything while displaying those LEDs. (eg: sleep(500) - which is 500 millseconds), before it moves on to the next part.

Otherwise what happens is:
Sets the display to BLACK (all off).
Immediately turns on the BLUE LEDs
Immediately after that, turns on the RED LEDs.
Goes back to the top of the loop.

And it does this all as fast as it can.

That last step does take longer than the steps in between (how much depends on the Arduino, it's clock speed, the size of the code, how you're setting the outputs, etc).