#define SensorPin 0 //pH meter Analog output to Arduino Analog Input 0
unsigned long int avgValue; //Store the average value of the sensor feedback
float b;
int buf[10],temp;
void setup()
{
pinMode(13,OUTPUT);
Serial.begin(9600);
Serial.println("Ready"); //Test the serial monitor
}
void loop()
{
for(int i=0;i<10;i++) //Get 10 sample value from the sensor for smooth the value
{
buf[i]=analogRead(SensorPin);
delay(10);
}
for(int i=0;i<9;i++) //sort the analog from small to large
{
for(int j=i+1;j<10;j++)
{
if(buf[i]>buf[j])
{
temp=buf[i];
buf[i]=buf[j];
buf[j]=temp;
}
}
}
avgValue=0;
for(int i=2;i<8;i++) //take the average value of 6 center sample
avgValue+=buf[i];
float phValue=(float)avgValue*5.0/1024/6; //convert the analog into millivolt
phValue=3.5*phValue; //convert the millivolt into pH value
Serial.print(" pH:");
Serial.print(phValue,2);
Serial.println(" ");
digitalWrite(13, HIGH);
delay(800);
digitalWrite(13, LOW);
}
Is there a way to test the email? I dont see where it says to send a test email, only where to enable email alerts.
You can only use SMTP server that does not require SSL or TLS. This is an arduino hardware limitation.
you dont happened to know of one do you? Seems everyone I have looked into is ssl support only
Finally found one, but having problems with it. Seems it gets some mail, and sends some mail, but does not send and get everything, so not 100% sure if email notifications are working just yet.
thank you d0ughb0y
now it's work but i have one problem
i have Analog pH from dfrobot
how can i make work
this is sample code for PH
you dont happened to know of one do you? Seems everyone I have looked into is ssl support only
Finally found one, but having problems with it. Seems it gets some mail, and sends some mail, but does not send and get everything, so not 100% sure if email notifications are working just yet.
from Neptune Apex manual, they suggest to use your ISP's smtp server first. If somehow your ISP requires SSL, you can get an account from
www.gmx.com
the gmx smtp server does not require ssl.
Neptune Apex does not support SSL, being that is uses a 32-bit cpu, it cannot be a hardware limitation.
I use the email feature so I know it works.
d0ugb0y how do you check to see how much ram has been used
the instructions to setup email is right there on the config.h
just substitute with the proper value for BASICAUTH, SMTPUSER, SMTPPASSWORD, EMAILFROM and EMAILTO.
//go to http://base64-encoder-online.waraxe.us
//to create your encoded string
//BASICAUTH = usernameassword, sample below is adminassword
//SMTPUSER = your email login, sample below is admin
//SMTPPASSWORD = your email password, sample below is password
#define BASICAUTH "YWRtaW46cGFzc3dvcmQ="
#define SMTPSERVER "mail.gmx.com"
#define SMTPPORT 587
#define SMTPUSER "YWRtaW4="
#define SMTPPASSWORD "cGFzc3dvcmQ="
#define EMAILFROM "user@host.com"
#define EMAILTO "8005551212@txt.att.net"