I d/l it an used it all the time it was a great thing to have put my little jr online in just a few minutes
I copy everything that I seen with the ph code in it.
This is what I did in Sensors
#ifdef _ORP
if (initORP()) {
p(F("ORP OK. "));
logMessage(F("ORP sensor initialized."));
} else {
beepFail();
p(F("ORP Init failed "));
logMessage(F("ORP Init failed"));
}
#endif///////////////////////////////////////////////////////
// ORP section
///////////////////////////////////////////////////////
static float orpreading=0;
static boolean orpready = false;
boolean initORP() {
#ifdef _ORP
char orpchars[15];
orpchars[0]=0;
Serial2.begin(38400);
for (int i=0;i<255,strlen(orpchars)==0;i++) {
Serial2.print("e\rr\r");
delay(384);
getresponse1(orpchars);
}
if (strlen(orpchars)==0) {
orpinit=false;
return false;
}
orpreading=atof(orpchars);
if (orpreading>0) {
orpready=true;
orpinit=true;
updateORP();
orpready=false;
return true;
} else
#endif
return false;
}
void updateORP() {
if (!orpinit) return;
static float sum=0;
static float orpa = 0;
if (orpready) {
orpready=false;
if (orpreading>0) {
if (orpa) {
sum = (sum-orpa)+orpreading;
orpa = sum / numReadings;
cli();
orpavg=orpa;
sei();
} else {
sum = orpreading*numReadings;
orpa=orpreading;
orpavg=orpreading;
}
}
Serial2.print("r\r");
}
}
float getorp() {
if (!orpinit) return 0.0;
uint8_t saveSREG=SREG;
cli();
float op = orpavg;
SREG=saveSREG;
return op;
}
void getresponse1(char* orpchars) {
int i = 0;
while (Serial2.available()) {
char c = (char)Serial2.read();
if (c=='\r') {
orpchars=0;
i=0;
return;
} else {
orpchars[i++]=c;
if (i==14) {
i=0;
orpchars[0]=0;
return;
}
}
}
}
void serialEvent2() {
static char orpchars[15];
static int i = 0;
char c = (char)Serial2.read();
if (c=='\r') {
orpchars=0;
i=0;
orpreading=atof(orpchars);
orpready=true;
return;
} else {
orpchars[i++]=c;
if (i==14) {
i=0;
orpchars[0]=0;
orpreading=0;
orpready=true;
}
}
}
Where did you connect the orp circuit, which pins, or do you run it in serial with the ph circuit?
I used Serial2 for ORP and Serial1 for ph
Question:
I got around to looking into how I will be adding the Jebao pumps, and saw this how to on adding jebao to Apex controllers.
http://carolinareefers.com/showthread.php?8631-Wiring-amp-Controlling-a-Jebao-WP-Pump-to-an-Apex
Read through it, so now have a question. The cable they have there shown, from reef angel, is that the one I need? If so I am assuming that I will still connect power through it and putting on one of the outlets, as well as connecting the dimmer cables to PWM pins.
Is this assumption correct?
that is what you need and what doughboy built himself, doughboy did a much neater job though
the power connects directly to the pump, the PWM wire connects directly to the Arduino, both the pump power and the PWN signal share the common ground wire, there are 3 wires total to connect, it is very simple to DIY the cable without buying other pieces if you wanted to scrap the Jebao controller..
Thank you for the clarification. Although it is a simple diy, I dont think I want to scrap the controller, rather just sell it to get a few more dollars back in this build .
Would a American DJ SRP8 work just the same as the Chauvet?
There is no room inside DJ, due to all the wiring to the switches
Can you control this when you are away from home?