I2C test ADS115

Asturias
Posts: 3
Joined: Thu Dec 01, 2016 4:01 pm

I2C test ADS115

Postby Asturias » Mon Dec 12, 2016 7:23 pm

Just a test : ESP 32 .. ADS1115

Code: Select all


#include <Wire.h>
#include <Adafruit_ADS1015.h>
 
Adafruit_ADS1115 adc(0x48);

void setup(void) 
{
  
  Serial.begin(115200); 
  adc.begin();
}

void loop(void) 
{
  float Voltage = 0.0;
  int16_t adc0;  
  adc0 = adc.readADC_SingleEnded(0);
  Voltage = (adc0 * 0.1875)/1000;  
  Serial.print("AN0: "); 
  Serial.print(adc0);
  Serial.print("\tVolts: ");
  Serial.println(Voltage,2);   
  delay(1000);
}
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17645 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17645 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17645 Volts: 3.31
AN0: 17645 Volts: 3.31
AN0: 17645 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17645 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17645 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17645 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31
AN0: 17644 Volts: 3.31


It works, thank to developers.

Emmanuel Pil
Posts: 1
Joined: Sun Mar 25, 2018 11:08 am

Re: I2C test ADS115

Postby Emmanuel Pil » Sun Mar 25, 2018 11:11 am

Hi. What pins did you use? Thanks.

Who is online

Users browsing this forum: No registered users and 110 guests