This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hey guys,
I have a problem about the ADS1115 connect to Arduino UNO board.
I follow the "Assembly and Wiring" on https://learn.adafruit.com/adafruit-4-channel-adc-breakouts/assembly-and-wiring
I went to read voltage from Arduino but I got output of "-1" always.
I've searched on several forums, however, I stiil don't know what happen?
I've tested 4 different ADS1115 which also given me "-1" value.
Code as follows.
Arduino's library of ADS1115 from Adafruit on https://github.com/adafruit/Adafruit_ADS1X15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include <Wire.h> #include <Adafruit_ADS1015.h> Adafruit_ADS1115 ads; void setup( void ) { Serial.begin(9600); Serial.println( "Hello!" ); Serial.println( "Getting single-ended readings from AIN0..3" ); Serial.println( "ADC Range: +/- 6.144V ((1 bit = 3mV/ADS1015, 0.1875mV/ADS1115)")" ); ads.begin(); } void loop( void ) { int16_t adc0; adc0 = ads.readADC_SingleEnded(0); Serial.print( "AIN0: " ); Serial.println( " " ); delay(1000); } |