Go Down

Topic: LED Light Cube strategy question (Read 221 times) previous topic - next topic

dbfox

Hi,

have build a LED light cube, the hardware is ok and working.

I would like to choose different colors and also a RGB fade mode....
I dont have a problem to choose different colors by using serial-data. e.g. i press 1 for green, 2 for blue etc... but i need some help to start with the RBG code... i normaly use the while function, but when i enter 0 (to switch off the cube) the rgb-mode should stop imediately, and not when the while functions jumps to the next...

I hope you can understand what my problem is. What kind of strategy would you choose to use as less as possible code, and dont mess it up too much?

PaulS

Quote
What kind of strategy would you choose to use as less as possible code, and dont mess it up too much?

Personally, I'd define a protocol for sending messages to the Arduino. Then, I'd be more concerned about implementing that protocol correctly than in implementing it with the least amount of code.

You seem to have missed reading the sticky at the top of the Programming Questions section, particularly section 6.

Go Up