The Planted Tank Forum - View Single Post - Another Arduino LED light schedule sketch
View Single Post
post #14 of (permalink) Old 05-16-2013, 01:39 AM
JustAGuy716
Algae Grower
 
Join Date: Aug 2012
Location: Madison WI
Posts: 42
Quote:
Originally Posted by AquaPorn View Post
Just a thought that might be my answer...

The function is only finding 2 channels when I have 9. Now, I did not change the code and left it as it was originally written...which was for a 2 channel set-up.

I am now thinking I will need to expand upon the function in order to find all channels and periods.
Does that sound like I may be on the right track??

Thanks for anything.
Did you change the #define lines for CHANNELS & MAXPERIODS?

It also looks like you need to update the int lightvalue[CHANNELS]= to

int lightvalue[CHANNELS] = { 0, 0, 0, 0, 0 };

The same type of things need to be done whenever the phrase ...and so on shows up in the code. Without that change, the pins themselves won't be initialized (for pinMode statements) or updated (for analogWrite statements)

Last edited by JustAGuy716; 05-16-2013 at 01:46 AM. Reason: Found additional possible cause
JustAGuy716 is offline  
 
 
For the best viewing experience please update your browser to Google Chrome