Weather Simulation for Dimming expansion module

Share you PDE file with our community

Posts: 20
Joined: Thu Apr 25, 2013 10:12 pm
PostPosted: Sun Jun 02, 2013 9:27 am
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.

Posts: 329
Joined: Fri May 17, 2013 1:35 pm
PostPosted: Sun Jun 02, 2013 11:09 am
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?
Image

Posts: 20
Joined: Thu Apr 25, 2013 10:12 pm
PostPosted: Sun Jun 02, 2013 11:30 am
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?


Yup, you got it!

Posts: 329
Joined: Fri May 17, 2013 1:35 pm
PostPosted: Sun Jun 02, 2013 12:26 pm
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
Image

Posts: 329
Joined: Fri May 17, 2013 1:35 pm
PostPosted: Sun Jun 02, 2013 2:10 pm
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?
Image
User avatar
Posts: 5421
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Jun 02, 2013 2:26 pm
Sounds like a syntax error, can you post the full code and the compiler error msg.

Posts: 329
Joined: Fri May 17, 2013 1:35 pm
PostPosted: Sun Jun 02, 2013 2:32 pm
i tried but it said im only allowed 60000 files too big.....im a noob and not sure how to do all this posting codes on forum
Image

Posts: 329
Joined: Fri May 17, 2013 1:35 pm
PostPosted: Sun Jun 02, 2013 2:36 pm
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
Image
User avatar
Posts: 5421
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Sun Jun 02, 2013 3:00 pm
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?

Posts: 329
Joined: Fri May 17, 2013 1:35 pm
PostPosted: Sun Jun 02, 2013 3:05 pm
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?
Image
PreviousNext

Return to My PDE/INO file

Who is online

Users browsing this forum: No registered users and 2 guests

cron