Jump to content
C4 Forums | Control4

u-20t

c4Forums Member
  • Posts

    18
  • Joined

  • Last visited

Reputation Activity

  1. Upvote
    u-20t reacted to South Africa C4 user in Creating Nightlights   
    While I have not looked at your code in detail, I think you should start by doing the following:
    1. Moving all of the code except for the first line into your scheduleS (so that it does this at your scheduled time).
    2. The first half of your if statements would then go into a schedule set for sunset and the second half into a schedule for sunrise.
    3. you would need the if statement (if state=White is true) in both of these schedules.
    4. you should delete the if daytime / nighttime conditions as this is dealt with by your schedules times.
    5. For any other colour that you are using on your UI button, you need one line of code to set your state=white variable to false.
    Hopefully this points you in the right direction.
    Happy programming. 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.