Serial monitor isn't displaying certain data

Hi there I'm working on a project that includes multiple sensors. The code can verify and upload to my arduino mega but one sensors data doesn't show in the serial monitor. That sensor is the Electrical conductivity sensor. For example, the EC sensor's data is supposed to read like:

Analog value: 0 Voltage:0mV Temp: 26.37^C EC: No solution!

but, unfortunately that doesn't even show up. Only the other sensors read. What do I do? I'm unable to post the code without having to use an attachment because the code exceeds the forum's length.

Light_Temp_humidity_pH_EC.ino (15.4 KB)

What shows up instead?
Just glancing through the code, get rid of all the junk (like the several Serial.begin(9600) statements).

ChandlerR:
Hi there I'm working on a project that includes multiple sensors. The code can verify and upload to my arduino mega but one sensors data doesn't show in the serial monitor. That sensor is the Electrical conductivity sensor. For example, the EC sensor's data is supposed to read like:

Analog value: 0 Voltage:0mV Temp: 26.37^C EC: No solution!

but, unfortunately that doesn't even show up. Only the other sensors read. What do I do? I'm unable to post the code without having to use an attachment because the code exceeds the forum's length.

Until you are able to figure out the answer to the problem, write a program that uses ONLY the conductivity sensor. Conductivity is the reciprocal of resistance, so that sensor is really an ohm meter. It has to have a standard voltage applied in order to measure the current through the sensor. Can you attach a drawing of only the sensor circuit?

Paul

You don't need the multiple serial.begins for the multiple sensors? I've done that already and have the EC sensor working by itself I just don't know how to get it working combined with the other three sensors. unfortunately im unable to upload a photo of the set up. The arduino forum wont let me upload saying the file is to big >:(

Hi,

The arduino forum wont let me upload saying the file is to big >:(

Re-scale it in Paint or a graphics editor.
You only need to Serial.begin(9600) once and that is in the void setup().

Tom.... :slight_smile:

ChandlerR:
You don't need the multiple serial.begins for the multiple sensors? I've done that already and have the EC sensor working by itself I just don't know how to get it working combined with the other three sensors. unfortunately im unable to upload a photo of the set up. The arduino forum wont let me upload saying the file is to big >:(

If you have it working in one program, then the problem is most likely software. The serial.begin sets up the link between your program and the PC. Has nothing to do with your sensors.

Paul

I don't think it's software... I think it's the structure of my code. I have the EC sensor code working by itself and then I have a combined sketch with the code for the pH, Light, and temp & humidity sensors working but when i try to combine the combined code with the EC code it doesn't work. I'm a complete noob at coding and haven't a clue how to properly structure. If I don't need the multiple serial.begins what do I do? If I delete the others will the sensors not read??

ChandlerR:
I don't think it's software... I think it's the structure of my code. I have the EC sensor code working by itself and then I have a combined sketch with the code for the pH, Light, and temp & humidity sensors working but when i try to combine the combined code with the EC code it doesn't work. I'm a complete noob at coding and haven't a clue how to properly structure. If I don't need the multiple serial.begins what do I do? If I delete the others will the sensors not read??

Do I detect that you are accessing the sensors through the serial port?

Paul

uhh i havent a clue :o haha if I delete all but one serial.begin will that tell us if i'm accessing serial ports?

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom..... :slight_smile:

Okay I finally was able to shrink the file size for the picture.. I'm running my sensors on an arduino mega with a grove base shield. Update on the code: I finally got the combined pH,Light, Temp&Humidity sensor code to combine and work with the EC code. It verifies and uploads to my arduino but the EC data doesn't show in the serial monitor. I checked to see if there was a serial.print I was missing but I'm not.

Light_Temp_humidity_pH_EC.ino (11.4 KB)

Screen Shot 2016-04-22 at 8.33.27 AM.png

Where in that code is the stuff that pertains to the EC?

It's hard to highlight and post screenshots of the EC code in the combined because the EC code is scattered throughout and I can only highlight a section at a time... that'd be way to many screenshots. Here's the EC code

EC_sample_code.ino (5.38 KB)