ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
ads1115.h File Reference

TI ADS1115 16-bit ADC codec (PROTOCORE_ENABLE_ADS1115). More...

#include "protocore_config.h"

Go to the source code of this file.

Detailed Description

TI ADS1115 16-bit ADC codec (PROTOCORE_ENABLE_ADS1115).

The ADS1115 is a 4-channel 16-bit analog-to-digital converter on the I2C bus with a programmable-gain amplifier - far more resolution and range control than the ESP32's own ADC. A reading is a 16-bit config-register write (start, channel, gain, mode, data rate) followed by a 16-bit read of the conversion register; the signed result scales to a voltage by the selected gain's full-scale range.

This codec is pure and host-tested: ::protocore_ads1115_config_single builds the config word for a single-shot single-ended reading, and ::protocore_ads1115_raw_to_uv converts the signed sample to microvolts. On an ESP32 the binding writes the config, waits for the conversion, and reads it back over I2C (Wire); only that touches hardware.

A cheap solder-and-bench-test breakout: measure a battery, a potentiometer, or an analog sensor and bridge the reading onto the network.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file ads1115.h.