Adjust dosing pumps with app?

Community contributed apps

Posts: 329
Joined: Fri May 17, 2013 1:35 pm
PostPosted: Mon May 30, 2016 4:04 pm
Can it be set up to adjust when and how long dosing pumps come on from the app? It's a pain to go in and reprogram them every time you want to adjust them.
Image
User avatar
Posts: 5348
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon May 30, 2016 8:00 pm
Yes. They need to be set to be used from InternalMemory and then you can change them under that section.

Posts: 329
Joined: Fri May 17, 2013 1:35 pm
PostPosted: Tue May 31, 2016 12:18 am
How would I go about doing that?
Image
User avatar
Posts: 5348
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Tue May 31, 2016 3:30 pm
Post your dosing pump code and what app you are using on your phone. Take a look in the portal to start and look under Internal Memory. There is a section inside for Dosing Pumps. You can put your settings in there and once we update your code it will get the numbers from there instead of hard coded in your program.

Posts: 329
Joined: Fri May 17, 2013 1:35 pm
PostPosted: Tue May 31, 2016 4:01 pm
im using the iphone app on my iphone 6s.
Code: Select all
[quote]
#include <ReefAngel_Features.h>
#include <Globals.h>
#include <RA_Wifi.h>
#include <[color=#CC6600]Wire[/color].h>
#include <[color=#CC6600]OneWire[/color].h>
#include <Time.h>
#include <DS1307RTC.h>
#include <InternalEEPROM.h>
#include <RA_NokiaLCD.h>
#include <RA_ATO.h>
#include <RA_Joystick.h>
#include <[color=#006699]LED[/color].h>
#include <RA_TempSensor.h>
#include <[color=#006699]Relay[/color].h>
#include <RA_PWM.h>
#include <[color=#006699]Timer[/color].h>
#include <Memory.h>
#include <InternalEEPROM.h>
#include <RA_Colors.h>
#include <RA_CustomColors.h>
#include <[color=#006699]Salinity[/color].h>
#include <[color=#006699]RF[/color].h>
#include <[color=#006699]IO[/color].h>
#include <[color=#006699]ORP[/color].h>
#include <[color=#006699]AI[/color].h>
#include <[color=#006699]PH[/color].h>
#include <[color=#006699]WaterLevel[/color].h>
#include <[color=#006699]Humidity[/color].h>
#include <[color=#006699]DCPump[/color].h>
#include <[color=#CC6600]ReefAngel[/color].h>

[color=#7E7E7E]////// Place global variable code below here[/color]
#define NUMBERS_8x16
[color=#CC6600]void[/color] DrawCustomMain()
{
[color=#7E7E7E]// the graph is drawn/updated when we exit the main menu &[/color]
[color=#7E7E7E]// when the parameters are saved[/color]
[color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawDate[/color](6, 112);
[color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawText[/color](COLOR_INDIGO, COLOR_WHITE,25,5, [color=#006699]"Jeremy's Reef"[/color]);
[color=#CC6600]pingSerial[/color]();

DrawStatus (20,80);
DrawParams (5,40);
DrawParamsa (0,10);
[color=#CC6600]pingSerial[/color]();
[color=#CC6600]byte[/color] TempRelay = [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#006699]RelayData[/color];
TempRelay &= [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#006699]RelayMaskOff[/color];
TempRelay |= [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#006699]RelayMaskOn[/color];
[color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawOutletBox[/color](12, 93, TempRelay);
}

[color=#7E7E7E]////// Place global variable code above here[/color]


[color=#CC6600]void[/color] [color=#CC6600][b]setup[/b][/color]()
{
    [color=#7E7E7E]// This must be the first line[/color]
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]Init[/color]();  [color=#7E7E7E]//Initialize controller[/color]
    [color=#7E7E7E]// Ports toggled in Feeding Mode[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]FeedingModePorts[/color] = [color=#006699]Port5Bit[/color] | [color=#006699]Port6Bit[/color] | [color=#006699]Port8Bit[/color];
    [color=#7E7E7E]// Ports toggled in Water Change Mode[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]WaterChangePorts[/color] = [color=#006699]Port1Bit[/color];
    [color=#7E7E7E]// Ports toggled when Lights On / Off menu entry selected[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]LightsOnPorts[/color] = 0;
    [color=#7E7E7E]// Ports turned off when Overheat temperature exceeded[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]OverheatShutoffPorts[/color] = [color=#006699]Port3Bit[/color] | [color=#006699]Port7Bit[/color];
    [color=#7E7E7E]// Use T1 probe as temperature and overheat functions[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]TempProbe[/color] = [color=#006699]T3_PROBE[/color];
    [color=#CC6600]ReefAngel[/color].[color=#006699]OverheatProbe[/color] = [color=#006699]T3_PROBE[/color];
    [color=#7E7E7E]// Set the Overheat temperature setting[/color]
    [color=#CC6600]InternalMemory[/color].[color=#CC6600]OverheatTemp_write[/color]( 820 );

    [color=#7E7E7E]// Feeeding and Water Change mode speed[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]FeedingSpeed[/color]=0;
    [color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]WaterChangeSpeed[/color]=0;


    [color=#7E7E7E]// Ports that are always on[/color]
    [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]On[/color]( [color=#006699]Port4[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]On[/color]( [color=#006699]Port5[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]On[/color]( [color=#006699]Port6[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#006699]Relay[/color].[color=#CC6600]On[/color]( [color=#006699]Port8[/color] );

    [color=#7E7E7E]////// Place additional initialization code below here[/color]
    

    [color=#7E7E7E]////// Place additional initialization code above here[/color]
}

[color=#CC6600]void[/color] [color=#CC6600]loop[/color]()
{
      [color=#CC6600]ReefAngel[/color].[color=#CC6600]DosingPumpRepeat[/color]( [color=#006699]Port1[/color],15,360,8 );
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]DosingPumpRepeat[/color]( [color=#006699]Port2[/color],15,360,8 );
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]StandardATO[/color]( [color=#006699]Port3[/color],30 );
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]StandardHeater[/color]( [color=#006699]Port7[/color],770,775 );
    [color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]SetChannel[/color]( 0, [color=#CC6600]PWMSlope[/color](8,0,20,0,5,55,180,5) );
    [color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]SetChannel[/color]( 1, [color=#CC6600]PWMSlope[/color](8,5,20,5,5,45,180,5) );
    [color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]SetChannel[/color]( 2, [color=#CC6600]PWMSlope[/color](8,10,20,10,5,55,180,5) );
    [color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]SetChannel[/color]( 3, [color=#CC6600]PWMSlope[/color](8,15,20,15,5,45,180,5) );
    [color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]SetChannel[/color]( 4, [color=#CC6600]PWMSlope[/color](8,20,20,20,5,55,180,5) );
    [color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]SetChannel[/color]( 5, [color=#CC6600]PWMSlope[/color](8,25,20,25,5,45,180,5) );
    [color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]DaylightChannel[/color] = [color=#006699]AntiSync[/color];
    [color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]ActinicChannel[/color] = [color=#006699]Sync[/color];
    [color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]ExpansionChannel[/color][0] = [color=#006699]None[/color];
    [color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]ExpansionChannel[/color][1] = [color=#006699]None[/color];
    [color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]ExpansionChannel[/color][2] = [color=#006699]None[/color];
    [color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]ExpansionChannel[/color][3] = [color=#006699]None[/color];
    [color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]ExpansionChannel[/color][4] = [color=#006699]None[/color];
    [color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]ExpansionChannel[/color][5] = [color=#006699]None[/color];
    [color=#7E7E7E]////// Place your custom code below here[/color]
      [color=#CC6600]if[/color] ([color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]Mode[/color]==Custom)
  {
    [color=#CC6600]ReefAngel[/color].[color=#006699]DCPump[/color].[color=#006699]UseMemory[/color] = [color=#CC6600]true[/color];   
  }


    [color=#7E7E7E]////// Place your custom code above here[/color]

    [color=#7E7E7E]// This should always be the last line[/color]
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]Portal[/color]( [color=#006699]"jjdezek"[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#CC6600]ShowInterface[/color]();
}

[color=#CC6600]void[/color] DrawParamsa([color=#CC6600]int[/color] x, [color=#CC6600]int[/color] y){
[color=#CC6600]char[/color] buf[16];
  [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawText[/color](DPColor,DefaultBGColor,x+70,y+10,[color=#006699]"WP40L:"[/color]);
[color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawSingleMonitor[/color]([color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]GetDaylightValue[/color](), DPColor, x+108, y+10,1);
[color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawText[/color](APColor,DefaultBGColor,x+70,y+20,[color=#006699]"WP40R:"[/color]);
[color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawSingleMonitor[/color]([color=#CC6600]ReefAngel[/color].[color=#006699]PWM[/color].[color=#CC6600]GetActinicValue[/color](),APColor, x+108, y+20,1);

}

[color=#CC6600]void[/color] DrawParams([color=#CC6600]int[/color] x, [color=#CC6600]int[/color] y) {
  [color=#CC6600]char[/color] buf[16];

  [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawText[/color](COLOR_BLACK,DefaultBGColor,x+5,y,[color=#006699]"Temp:"[/color]);
  [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawText[/color](COLOR_BLACK,DefaultBGColor,x+80, y, [color=#006699]"PH:"[/color]);
  [color=#7E7E7E]// Temp and PH[/color]
  y+=10;

  [color=#CC6600]ConvertNumToString[/color](buf, [color=#CC6600]ReefAngel[/color].[color=#006699]Params[/color].[color=#006699]Temp[/color][[color=#006699]T1_PROBE[/color]], 10);
  [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawLargeText[/color](T1TempColor, DefaultBGColor, x+5, y, buf, Num8x16);
    [color=#CC6600]ConvertNumToString[/color](buf, [color=#CC6600]ReefAngel[/color].[color=#006699]Params[/color].[color=#006699]Temp[/color][[color=#006699]T2_PROBE[/color]], 10);
  [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawLargeText[/color](T2TempColor, DefaultBGColor, x+5, y+12, buf, Num8x16);
    [color=#CC6600]ConvertNumToString[/color](buf, [color=#CC6600]ReefAngel[/color].[color=#006699]Params[/color].[color=#006699]Temp[/color][[color=#006699]T3_PROBE[/color]], 10);
  [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawLargeText[/color](T3TempColor, DefaultBGColor, x+40, y+12, buf, Num8x16);
  [color=#CC6600]ConvertNumToString[/color](buf, [color=#CC6600]ReefAngel[/color].[color=#006699]Params[/color].[color=#006699]PH[/color], 100);
  [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawLargeText[/color](PHColor, DefaultBGColor, x+80, y, buf, Num8x16);
  y+=5;
   [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawText[/color]( COLOR_DARKKHAKI,DefaultBGColor,10,18, [color=#006699]"SAL:"[/color] );
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawSingleMonitor[/color]( [color=#CC6600]ReefAngel[/color].[color=#006699]Params[/color].[color=#006699]Salinity[/color],COLOR_DARKKHAKI,33,18, 10 );   
}

[color=#CC6600]void[/color] DrawStatus([color=#CC6600]int[/color] x, [color=#CC6600]int[/color] y) {
  [color=#CC6600]int[/color] t=x;
  
  [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawLargeText[/color](COLOR_INDIGO,DefaultBGColor,15,y,[color=#006699]"High"[/color],Font8x16);
  [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]DrawLargeText[/color](COLOR_INDIGO,DefaultBGColor,85,y,[color=#006699]"Low"[/color],Font8x16);
  
  [color=#CC6600]if[/color] ([color=#CC6600]ReefAngel[/color].[color=#006699]HighATO[/color].[color=#CC6600]IsActive[/color]()) {
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]FillCircle[/color](55,y+3,5,COLOR_GREEN);
  } [color=#CC6600]else[/color] {
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]FillCircle[/color](55,y+3,5,COLOR_RED);
  }
  
  [color=#CC6600]if[/color] ([color=#CC6600]ReefAngel[/color].[color=#006699]LowATO[/color].[color=#CC6600]IsActive[/color]()) {
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]FillCircle[/color](70,y+3,5,COLOR_GREEN);
  } [color=#CC6600]else[/color] {
    [color=#CC6600]ReefAngel[/color].[color=#006699]LCD[/color].[color=#CC6600]FillCircle[/color](70,y+3,5,COLOR_RED);
  }
}

[color=#CC6600]void[/color] DrawCustomGraph()
{
}

[/quote]
Image
User avatar
Posts: 5348
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Jun 01, 2016 4:23 am
Change the DosingPumpRepeat lines to this

Code: Select all
DosingPumpRepeat1(Port1);
DosingPumpRepeat2(Port2);


In the iphone app, go to Settings. Click on the Internal Memory tab, then open the Dosing Pump section and set your values. You can set the before you upload or after.

Posts: 329
Joined: Fri May 17, 2013 1:35 pm
PostPosted: Wed Jun 01, 2016 5:06 am
Ok I will try that when I get home. Could I also do that for my dimming expansion?
Image
User avatar
Posts: 5348
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Jun 01, 2016 4:01 pm
Pretty much. We'd have to go line by line to see what would change. It might be easier to build a new INO from the wizard and choose memory settings. That would at least let you see how those functions would change in that case.

Looking at your lighting settings, your case may be a little trickly because you have offsets every 5 minutes. We support that in memory but I have to see the easiest way to utilize it.
User avatar
Posts: 5348
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Jun 01, 2016 4:02 pm
Your heater settings and ato timeout can be removed from code and just leave the ports. Make sure they are set first before uploading or right after.

Posts: 329
Joined: Fri May 17, 2013 1:35 pm
PostPosted: Wed Jun 01, 2016 5:16 pm
Ok do I just delete the numbers from the temp and ato?
Image
Next

Return to Apps

Who is online

Users browsing this forum: No registered users and 2 guests