Richard, thanks for your help - that works a treat. I've changed the value in the first line for testing, but using the following code it changes from night to dawn, ramps up to 100%, changes to day, then to dusk at the set time, and fades down to 0% and changes to night- in 12 minutes. I'll reset the value to 7 and see how long the cycle lasts.
Now as I want to learn from this experience, can you please explain the use of the double forward slash and exclamation markCode:case DAWN lcdout $FE,$80+13,"DAWN " if ss//1= 0 then if ss != old_ss then B_PWM=B_PWM+1 old_ss=ss endif endif if B_PWM = b_max then Blue_Day_Cycle = DAY endif case DAY lcdout $FE,$80+13,"DAY " if counter1 =1208 then Blue_day_cycle = DUSK endif CASE DUSK lcdout $FE,$80+13,"DUSK " if ss//1= 0 then if ss != old_ss then B_PWM=B_PWM-1 old_ss=ss endif endif if B_PWM = b_min then Blue_Day_Cycle = NIGHT endif case NIGHT lcdout $FE,$80+13,"NIGHT" if HH = S2H and MM = S2M then Blue_Day_Cycle = DAWN endif


- in 12 minutes. I'll reset the value to 7 and see how long the cycle lasts.


Bookmarks