Uses the lgpio library to read an analogue-to-digital chip.
The ADS1115 is widely used with sensors to read signals from pressure sensor, light sensors, and temperature sensors. Other uses include industrial automation , Data Acquisition Systems, medical devices, environmental monitoring such as humidity, embedded electronic systems that require high resolution input, robotics, and audio applications for signal processing and sound capture.
The lgpio library can be installed Raspberry Pi OS (Oct 2024) and instructions are available at http://abyz.me.uk/lg/download.html
Install instructions are:
- install Raspberry Pi OS (64-bit)
- Open a terminal and type the following commands:
- sudo apt install swig python3-dev
- sudo apt install python3-setuptools
- sudo apt install libunwind8
- wget https://github.com/joan2937/lg/archive/master.zip
- unzip master.zip
- cd lg-master
- make
- sudo make install
- create an ADS example program and copy the program and libraries to the RaspberryPi Desktop
- give the executable permission to run with something like: 'sudo chmod +x ADS'
- run the program with something like: 'sudo ./ADS'