Skip to content
/ ads1115 Public
forked from mmmries/ads1115

Elixir Circuit Library for Interacting with an ADS1115 Analog-to-Digital Chip

Notifications You must be signed in to change notification settings

FGMGIT/ads1115

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADS1115

An Elixir library for interacting with ADS1115 analog-to-digital chips. Please see the datasheet for details.

Usage

I'm using these chips to read moisture sensors. I wired the analog signal to AIN0 and I want to compare that to GND. For this use-case I can do the following:

{:ok, ref} = I2C.open("i2c-1")
addr = 72 # the default i2c address for my sensor
{:ok, reading} = ADS1115.single_shot_read(ref, addr, {:ain0, :gnd})
# reading will be between -32,768 and 32,767

Installation

If available in Hex, the package can be installed by adding ads1115 to your list of dependencies in mix.exs:

def deps do
  [
    {:ads1115, "~> 0.1"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ads1115.

About

Elixir Circuit Library for Interacting with an ADS1115 Analog-to-Digital Chip

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Elixir 100.0%