esphome:
  name: esp8266_ads1115
  platform: ESP8266
  board: nodemcuv2

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: ""

ota:
  password: ""

wifi:
  ssid: "geosens"
  password: "5935148387394953"
  fast_connect: true
  manual_ip:
    static_ip: 192.168.4.145
    gateway: 192.168.3.1
    subnet: 255.255.0.0
    dns1: 192.168.3.1

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Linkymain Fallback Hotspot"
    password: "f1Nh0HPpmz3A"

# I2C goes on GPIO4=sda and GPIO5=scl
i2c:
  sda: 4
  scl: 5
  scan: true
  id: bus_a
  
ads1115:
  - address: 0x48
sensor:
  - platform: ads1115
    multiplexer: 'A2_A3'
    gain: 4.096
    update_interval: 15s
    name: "ADS1115 Channel A2_A3"



#The ADS1115 has a multiplexer that can be configured to measure voltage 
#between several pin configurations. These are:
#
#        A0_A1 (between Pin 0 and Pin 1)
#        A0_A3 (between Pin 0 and Pin 3)
#        A1_A3 (between Pin 1 and Pin 3)
#        A2_A3 (between Pin 2 and Pin 3)
#        A0_GND (between Pin 0 and GND)
#        A1_GND (between Pin 1 and GND)
#        A2_GND (between Pin 2 and GND)
#        A3_GND (between Pin 3 and GND)
#
#
# Additionally, the ADS1115 has a Programmable Gain Amplifier (PGA) 
# that can help you measure voltages in different ranges, these are:
#
#        6.144 (measures up to 6.144V)
#        4.096 (measures up to 4.096V)
#        2.048 (measures up to 2.048V)
#        1.024 (measures up to 1.024V)
#        0.512 (measures up to 0.512V)
#        0.256 (measures up to 0.256V)