I wanted to measure voltage with ADS1115 module. It is working perfectly on arduino uno (clone), but when I connect it to arduino pro mini (clone) it is giving one value on all channels (-101). I assume the connection must be correct, beacuse the I2c communcation is working and adress finder find's module.
#include "ADS1X15.h"
ADS1115 ADS(0x48);
void setup() {
Serial.begin(9600);
ADS.begin();
}
void loop() {
ADS.setGain(0);
float f = ADS.toVoltage(1);
int16_t val1 = ADS.readADC(1);
Serial.print(val1);
float V = val1 * f;
Serial.print(" ");
Serial.println(V,2);
delay(10);
}
The pro mini clone photo
1 post - 1 participant