I'm multiplexing RGB LEDs on my Nano. The PWMs are 9, 10, 11, and each of the available output ports connects to one LED's ground.
The SIK RGB sketch (attached) has showSpectrum, which cycles through the spectrum for one color at a time.
I want to apply this to all my LEDs, with each subsequent LED color lagging behind (maybe if any RGB color value hits 0 or 767). Hopefully, it will look like a color wave.
Is it going to be as tricky as I think or might there be a common solution that intertwines the timing so as not to lose the smoothness of the color changes?
I know I'll need millis(), but where and how?
Circuit_03_rgb.ino (5.38 KB)
I'm just trying to get some valid input, not a lecture.
I thought being vague might allow for outside the box thinking.
Different coders have different experiences and prefer different methods, that's all.
I can change the port registers to save time and create an array of values that offset from LED 1 prior to the delay and not have any major issues.
I'm just not convinced it's the most efficient way.
But you didn't help. You judged and chided unnecessarily.
If these tend to be your responses, perhaps you should only answer when you have beneficial info.
This forum is full of people like me. I'm always attempting new things and trying to save time by asking questions after failing to find answers on my own. I'm happy to admit that questions I've asked seem especially simple, but sometimes the right answers aren't so easy to find.
If you don't want to help, don't reply. Most others are here to help.
@Delta_G
I've just read some of KoogieBuffalo's, or is it Zip_Ferndale's or whatever other aliases (s)he's using, other posts. Seems (s)he knows a bit more that the average Newbie. Always wondered why people continue to change their login ID. Is it to continually be perceived as a Newbie thinking it garners sympathy? I came across another a while back, kept changing his/her name, but always started by stating "I'm a noob. I'm 75 years old. Please help me". I'm with you, time better spent elsewhere.
I ask a lot of questions and didn't want to seem overly helpless. I thought using 2 names would make each of me seem only halfway ignorant. So much for that theory...
There's no shame in appearing ignorant, otherwise why would you be here asking for assistance? What switches most of us off is those who are overtly arrogant. If we respond to a question at a level too far over the head of the poser, they often get intimidated and that's the last they're heard of. Not a promising introduction. The tried and true better approach is to assume nothing and work up. If your level of competence is already above that, there are polite ways of making that known. No need for accusations of condescension. We are people too, and freely giving our time, at least as valuable as your own, to many, by choice. Those who receive the most assistance are those we connect with. That onus is on you. You are one of many posting each day asking questions. We try to help as many as we can. How would you respond to a belligerent attitude?
My apologies, then. I didn't think my original post was belligerent or full of attitude.
Zip_Ferndale:
I thought using 2 names would...
...get you banned? Yup. It will.
@Zip_Ferndale has left the building.