jjdezek wrote:ok im interesting in doing this code but im new to the coding and dont know what the channel max and flicker is? i know i my lights dont kick on until they hit 10 and they peak at 35 for whites and 40 for blue. where do you get the 31 number and the 200's from?
Channel max is basically the max intensity you want your lights to be (from 0-255) and channel flicker is how low your lights can be dimmed before they start to flicker. Keep in mind that both values must add up to 255 or less, any more and the lights won't turn on.
What I ended up doing was using percentages to calculate the values; I keep all of my lights at 60% max so I multiplied 255 x .6 and got 153 for channel max. As for the channel flicker, my drivers can dim to 0 without flickering so I put it as 1. If you have drivers that can't dim to 0, you'll have to do some trial and error to see how low they can go without flickering.
jjdezek wrote:so my max is 40% on blues so i take 255 x .4=102 so i would put 102 in the channels that are for blue? whites peak at 35% so i would put 89?
ok i went through the code and changed things to my liking and what not. i tried loading it and it came back with error invalid digit "9" in octal contstrant
do you paste the code into the regular sketch or is there someplace else you put it? i tried the standard code without modifying it and it gave me the same error? what are the steps to load this code?
The following features were automatically added:
Watchdog Timer
Version Menu
The following features were detected:
Simple Menu
sketch_jun02b.cpp:41:19: error: invalid digit "9" in octal constant
sketch_jun02b.cpp:41:27: error: invalid digit "9" in octal constant
sketch_jun02b.cpp:41:35: error: invalid digit "9" in octal constant
Awesome so those errors are telling you which lines have errors in them. Sometimes its above or below depending on the errors. Can you post the full code?
i tried it said the code was too big to upload...i went back to original code and redid it now its scanning fine. before i load this into my dimmer expansion i have one question. i put the lat and long for hawaii but im in ga if i understand it correctly it will still come on in the morning here not there right?
ok so i loaded the program and lights were on for a few mins then they just completly shut off, my whites are at 8% and lights should kick off at 10% but my blues are showing at 16% so they should still be on. i also staggard my lights to go at different times left should be 30mins before middle and middle 30 mins before right. the only thing i would think that would cause that is the flicker settings? anyone agree or disagree?
YOU MUST READ EVERY WORD IN THIS SECTION IN ORDER TO APPROPRIATELY CONFIGURE THIS PROGERAM- READ EVERY LINE BELOW///
byte ChMax[]={102,89,102,89,102,89,0,0};//Incremental value (Max-flicker) above flicker you want as max intensity (!!!!!!! Light Set Point is ChMax PLUS Flicker !!!!!!)
byte flicker[]={29,29,29,29,29,29,0,0};//need to input actual values here for flicker point on all channels in PWM expansion box
also do i need to change anything with my original light schedual, will that interfere with this coding? reason i ask is since i loaded the new coding it should off set my lefts by 30 mins each from the way i set them up but all whites are reading same percent and all blues are reading same percent almost like my wizard set up for lights is interfering with this code?
Did you modify the ChOffset settings? Those are what will determine how much (if any) delay and advance is configured for sunset and sunrise.
As far as I know, any settings you coded into your RA module with the wizard should have no effect, since the Weather Sim code takes over the PWM dimming completely.
//THESE values are the number of seconds that a particular channel will be offset from the rise/set time, i.e. negative to rise earlier/set earlier
int Choffset[]={
-7200,7200,-7200,7200,-6600,6600,-6600,6600,-6000,6000,-6000,6000,0,0,0,0};
now when i woke up this morning my lights look like there on full power but my RA display and the portal are showing that my blues are at 4%. so it seems the wizard is still working the display but the coding is working the expansion. only question i have is why is it so bright this early in the morning? is it going to get brighter? how do i tell what % its really at?
According to the tutorial text, the lights should hit ChMax around noon time so they shouldn't have been at max brightness that early in the morning. As for getting the % value to output to the controller display, we'd have to wait for rufessor to wander back in here for assistance.
well its now 2:43 and the lights havent gotten any brighter they may have dimed a little hard to tell. I did get some cloud action kinda freaked me out at first thought something was going crazy and burning up the way it was going dim bright dim bright but then it went bright and stayed. i dont know if i put something in the code wrong, most likely did. if anyone can see anything here is the parts i changed in the code
byte ChMax[]={102,89,102,89,102,89,0,0};//Incremental value (Max-flicker) above flicker you want as max intensity (!!!!!!! Light Set Point is ChMax PLUS Flicker !!!!!!)
byte flicker[]={29,29,29,29,29,29,0,0};//need to input actual values here for flicker point on all channels in PWM expansion box
boolean Wchannel[]={0,1,0,1,0,1,0,0}
byte DimOrder[]={0,0,1,1,0,0,0,0};
//set all channel positions that you would like to use for the lightning strike effect to 1 (0-5 are PWM channels 6,7 are Main PWM outs)- and channels with a 0 are not used in strike
byte StrikeChannel[]={0,0,0,1,0,0,0,0};
byte MoonCh[]={0,0,0,0,0,0,0,0};/
int Choffset[]={
-7200,7200,-7200,7200,-6600,6600,-6600,6600,-6000,6000,-6000,6000,0,0,0,0};
// NOW SET YOUR LATIDTUDE AND LONGITUDE COORDINATES as Degrees, Minutes, Seconds of Lat and Lon
//If Your NORTH of the equator your LONGITUDE must START with a NEGATIVE number (the rest are positive) e.g. All of North America, Europe, Russia etc are negative
//If Your EAST of the Prime Meridian your LATITUDE must START with a NEGATIVE number (the rest are positive), e.g. Most of Europe, All of China, India, Austraila, Russia etc are negative
latitude=dmsToSeconds(20,54,00);//United States of America- Salt Lake City, local time is -7 hours GMT
longitude=dmsToSeconds(-155,35,00);
that LAT and LONG is Hawaii and im in Georgia. While sitting here typing this two more clouds passed. they seem to go really fast.
Well I think I figured out what I did. In the time offset I wanted the lights to come on later and turn off later. I put a negative infront of the on time so instead of them turning on later there turning on earlier. Whooopsy
Yeah the wife had to get up at 5:30 and said lights were on that's when I put two and two together. Might still have to play with it to get it to come on at the right time. Thanks for everyone's help. I will post a video of the lightening when I can catch it
ok got another question on this, i read through the cloud dimming part and it says to pair the lights you want to dim together with 0's and 1's. I have three different lights that go from left to right on my tank i put the left lights (blues and whites) as 0 then put the center lights (blues and white) as 1 then the right lights (whites and blues) i put as 0. does that make them dim with the left lights? if so is there a way to make them dim as a third set, so it would go left lights center lights then right lights? could i plug the number 2 in there or would that mess the code up? any help would be greatly appreciated.