need help with serial monitor

I am doing a project about optical sensor.

I was trying to read from an ADC, if I use the serial monitor, I can see the numbers jumping between -134 to -140. If I check the Serial Plotter ,I can only see a straight line on top of the window without any graduation on left side.

Can any one tell me how to fix it?

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

Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7,148850.0.html

Thanks… Tom… :slight_smile:

Read the input, wait, read the input again, keep the second reading. Add a 1uf cap across the input pin to GND.

Code is very simple,

#include <Wire.h>
#include <Adafruit_ADS1015.h>

Adafruit_ADS1015 ads1015;

void setup(void)
  //Serial.println("Getting differential reading from AIN0 (P) and AIN1 (N)");
  //Serial.println("ADC Range: +/- 6.144V (1 bit = 3mV)");

void loop(void)
  int16_t results;
  results = ads1015.readADC_Differential_0_1();
  //Serial.print("Differential: "); Serial.print(results); Serial.print("("); Serial.print(results * 3); Serial.println("mV)");


just simply read from a ADS1015 ADC. I basically used the sample code from their company.

I found that if the output contains negative value only, there will be this problem ; Positive value only, no problem ; negative and positive value mixed, the graduation will be adjusted by the positive values only.
Is this a bug or something?

Another problem is , when the data values changes greatly, the plotter will back to work again, and when the data start to switch between two negative stable values, everythins will gone.

Have you checked what readings you get with zero differential?

Tom… :slight_smile:

TomGeorge: Hi. Have you checked what readings you get with zero differential?

Tom... :)

you mean the differential_0_1 reading? jumping between -134 and -140