Hi all.
Not many days passed, since I discovered arduino's wonders, so still not strong enough to talk to it.
Hope you guys can help me solve this puzle.
I have variation of popular controler for reef lighting .Originally written by "Christian". I will demonstrate idea. Not whole sketch , just essentials :
int blue = 10; // blue LEDs connected to digital pin 10 (pwm)
int white = 11; // white LEDs connected to digital pin 11 (pwm)
int bluepercent[11] = { 0, 26, 52, 78, 103, 128, 154, 180, 205, 230, 255 };
int whitepercent[11] = { 0, 26, 52, 78, 103, 128, 154, 180, 205, 230, 255 };
for (int i = 1; i <= 10; i++) // setting ib value for 10% increment. Start with 0% - at given time blue leds fade in from 0 to 255
analogWrite(blue, bluepercent[i]);
lcd.setCursor(13, 1);
lcd.print(i);
for (int i = 1; i <= 10; i++) // setting i value for 10% increment. Start with 0% - after blues are at 100% , whites start to fade in
analogWrite(white, whitepercent[i]);
lcd.setCursor(18, 1);
lcd.print(i);
As you see blue lights come in first and fade in following " bluepercent" schedule. After it finishes , whites start fading in folowing its own " whitepercent" schedule which is same in my case.
What I want to change , is that I want both lights fading in at the same time but different schedules : like
int bluepercent[11] = { 0, 26, 52, 78, 103, 128, 154, 180, 205, 230, 255, 255, 255, 255, 255 };
int whitepercent[11] = { 0, 0, 0, 0, 0, 26, 52, 78, 103, 128, 154, 180, 205, 230, 255 };
"11" as i understand is not the right number anymore.And thats all what I understand at the moment $
And how to make LCD to show real degree of each light intensity in this case ? Better 0 as min to 10 as max. LCD space is limited
Thanks in advance to anyone, who will bother to help or just read to this word.