Page 1 of 1
temporary pwm override?
Posted: Wed Nov 21, 2012 5:40 pm
by Meshmez
I have my dimming running off of the ReefAngel.PWM.DaylightPWMParabola(); code, is there a memory bit to temporarily force it to a certain percentage? im looking at doing some par testing in my tank and i want to be able to dial in certain pwm values during the testing.
Re: temporary pwm override?
Posted: Wed Nov 21, 2012 9:22 pm
by 00Warpig00
Try this...
ReefAngel.PWM.SetChannel( 0, 100 );
Where the first value 0 is the PWM channel and the second value 100 is percentage.
I just finished my own custom menu with a PWM Mask On/Off/Clear option and needed this info myself.
EDIT: This is for the PWM Module not the ports on the relay box.
Nick
Re: temporary pwm override?
Posted: Wed Nov 21, 2012 10:23 pm
by Meshmez
ya this is for the 2 on the relay box, and im just looking for something temporary, like how with the relays you can temporarily disable the program and say on or off, wasnt sure if there was a way to temporarily use the android app or something to dial in and change pwm settings without having to program.
Re: temporary pwm override?
Posted: Thu Nov 22, 2012 3:42 am
by rimai
Yes, there is.
Here is how to do it:
Set a relay bit for your lights in the setup() section. If you generated a code with the Wizard, the line should already be there and you just need to adjust which bit is your lights port.
Code: Select all
ReefAngel.LightsOnPorts = Port3Bit ;
Now, everytime you override port 3, you are also overriding the 2 standard PWM ports in the relay box.
On Android or iPhone, you can change memory locations 220 (LEDPWMDaylight) and 221 (LEDPWMActinic) to change the override %.
As soon as you turn off the override on relay port 3, the PWM channels will resume their normal %.
Re: temporary pwm override?
Posted: Thu Nov 22, 2012 11:59 am
by Meshmez
I figured you had a way to do this! awesome! Thanks Roberto! And happy Thanksgiving!