temporary pwm override?

Basic / Standard Reef Angel hardware
Post Reply
Meshmez
Posts: 32
Joined: Fri May 11, 2012 2:44 pm

temporary pwm override?

Post 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.
00Warpig00
Posts: 289
Joined: Wed May 16, 2012 9:52 pm

Re: temporary pwm override?

Post 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
180G FOWLR
20GH QT#1
29G QT#2

Image
Meshmez
Posts: 32
Joined: Fri May 11, 2012 2:44 pm

Re: temporary pwm override?

Post 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.
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: temporary pwm override?

Post 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 %.
Roberto.
Meshmez
Posts: 32
Joined: Fri May 11, 2012 2:44 pm

Re: temporary pwm override?

Post by Meshmez »

I figured you had a way to do this! awesome! Thanks Roberto! And happy Thanksgiving!
Post Reply