pH sensor code

I'm looking for a program code that will work with the arduino uno to control an Atlas Scientific pH sensor. I don't need it to do anything but output a pH reading. I'm having problems getting the sample code the Atlas Scientific website has to work. I was wondering if anyone has suggestions to get their sample code to work or has a program of their own? Thanks!

I'm having problems getting the sample code the Atlas Scientific website has to work.

Who is better than the manufacturer of the probe to develop the code? If you are having problems with their code, you might consider contacting them, or post the code here and explain what problems you are having.

Please post example code:

The Atlas pH stamp will take a minimum 262 millis from receipt of command untill it will respond with the pH reading. If the debug led's are enabled the lag will double. By default the pH Stamp module uses the following serial settings: 38400, 8, N, 1.

Serial3.begin(38400);

// Send Single Read Command To Stamp
Serial3.print('R');
Serial3.print(13);

// Give stamp time to do it's thing
delay(300);

// Read the stamp data

float myPH = Serial3.parseFloat();

Hope this helps, if you need more info, just post question

Their example code works fine for me on the mega, uno, and pro mini. what issues are you having?

At this point it might be wiring. I've got the wire going from TX on the pH microchip to the TX pin on the Arduino and the same with the RX pin. I've also tried to upload it with the two switched. I can upload the program fine, but nothing will print on the serial monitor. The baud rate and carriage return settings are correct as well. This is going to be used in a biodiesel process so the only thing attached to the arduino is this sensor

Arduino TX Pin to pH Stamp RX pin
Arduino RX Pint to pH Stamp TX pin

Serial3 is for the mega not the UNO try using Serial.

Mark

//here's the sample code im using thee only modifications i did was add the delay's at the end just in case it needed it.

#include <SoftwareSerial.h>
#define rxpin 0
#define txpin 1
SoftwareSerial myserial(rxpin, txpin);
String inputstring = "";
String sensorstring = "";
boolean input_stringcomplete = false;
boolean sensor_stringcomplete = false;
void setup(){
Serial.begin(38400);
myserial.begin(38400);
inputstring.reserve(5);
sensorstring.reserve(30);
}
void serialEvent() {
char inchar = (char)Serial.read();
inputstring += inchar;
if(inchar == '\r') {input_stringcomplete = true;}
}
void loop(){
if (input_stringcomplete){
myserial.print(inputstring);
inputstring = "";
input_stringcomplete = false;
}
while (myserial.available()) {
char inchar = (char)myserial.read();
sensorstring += inchar;
if (inchar == '\r') {sensor_stringcomplete = true;}
}
if (sensor_stringcomplete){
Serial.print(sensorstring);
sensorstring = "";
sensor_stringcomplete = false;
delay(1000);
}
delay(1000);
}

#include <SoftwareSerial.h>
#define rxpin 0
#define txpin 1
SoftwareSerial myserial(rxpin, txpin);

Why are you doing software serial on the hardware serial pins? You can't do both.

paulS..... what u mean cannot do that? that is effect the value?

i done exactly with this project... but the value is display 8 output at one time... like i attach...

what u mean cannot do that?

There is nothing ambiguous about the statement "You can not do that". If you don't understand that pins 0 and 1 can be used by the HardwareSerial instance (Serial) OR by the SoftwareSerial instance (mySerial), but not by both, I can't help you.

I'm looking for a program code that will work with the arduino uno to control E-201-C pH sensor. I don't need it to do anything but output a pH reading. I was wondering if anyone has suggestions to get their sample code to work or has a program of their own? Thanks!