Page 1 of 1
How to control 2 WP-40s and a DC6000 with the DCPUMP class?
Posted: Mon Oct 21, 2013 4:12 pm
by Smotz
Hi all,
I have 2x WP40s and a DC6000 DC return pump. My current code is listed below (I haven't implemented the return pump yet). I will be adding the DC6000 using the modified Jebao cable for ATO.
How can I set a different setting for the return pump than what I have set for my WP-40?
For instance, I want to turn the DC6000 off during feeding mode but keep my WP-40's on 30%.
Code: Select all
ReefAngel.DCPump.FeedingSpeed=30;
ReefAngel.DCPump.WaterChangeSpeed=0;
ReefAngel.DCPump.DaylightChannel = Sync;
ReefAngel.DCPump.ActinicChannel = Sync;
Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla
Posted: Mon Oct 21, 2013 4:19 pm
by lnevo
Dont use the dc pump class for the return pump. Use it through the PWM class the way we used to.. Put an if feeding mode then set to whatever % or 0.
Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla
Posted: Mon Oct 21, 2013 4:25 pm
by Smotz
Gotcha. I am debating on not using the DCPUMP class all together coz of the memory increase - I don't use the portal to control my wave makers. Can you think of any other benefit?
Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla
Posted: Tue Oct 22, 2013 6:25 pm
by Smotz
lnevo wrote:Dont use the dc pump class for the return pump. Use it through the PWM class the way we used to.. Put an if feeding mode then set to whatever % or 0.
Hey dude, would you be able to elaborate a bit? What would the command be to use the PWM class with the ATO? would this be it:
Code: Select all
pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,45*2.55);
the above would set it to 45% ? If so - whats with the * 2.55 ?
To take it further - how can I set the value for this in internal memory so I can change it when I want?
Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla
Posted: Tue Oct 22, 2013 6:45 pm
by rimai
Yes, that's it.
*2.55 is because the controller uses a range from 0-255, but we humans use 0-100 so, we need to multiply by 2.55.
If you want to use internal memory, you can do something like this:
Code: Select all
pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,InternalMemory.LEDPWMActinic_read()*2.55);
Then use the android app to change the value you want to use.
Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla
Posted: Tue Oct 22, 2013 7:08 pm
by Smotz
rimai wrote:Yes, that's it.
*2.55 is because the controller uses a range from 0-255, but we humans use 0-100 so, we need to multiply by 2.55.
If you want to use internal memory, you can do something like this:
Code: Select all
pinMode(lowATOPin,OUTPUT);
analogWrite(lowATOPin,InternalMemory.LEDPWMActinic_read()*2.55);
Then use the android app to change the value you want to use.
Nice - sorry for the barrage of questions but I have more
What memory location would I change for this? I don't quite understand LEDPWMActinic_read .. ?
Can I set a default value - say 50% ? that gets changed via the droid app - I would want that value to stick should I reboot, etc ... is that possible ?
Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla
Posted: Tue Oct 22, 2013 7:14 pm
by rimai
Yeah, just use android app and set the memory location PWM Actinic to 50. Internal memory is persistent, so it doesn't get erased when power is lost.
Re: How to control 2 WP-40s and a DC6000 with the DCPUMP cla
Posted: Tue Oct 22, 2013 7:16 pm
by Smotz
rimai wrote:Yeah, just use android app and set the memory location PWM Actinic to 50. Internal memory is persistent, so it doesn't get erased when power is lost.
Nice. Thx man.