Releases: Protocentral/ProtoCentral_ads1262
Releases · Protocentral/ProtoCentral_ads1262
v.2.0.0
What's New
Complete library rewrite with a modern, object-oriented architecture replacing the legacy static class design.
Breaking Changes
- Class renamed:
ads1262→ADS1262 - Instance-based API: Static class replaced with proper object instances
- No more manual byte parsing:
ads1262_Read_Data()(rawchar*) replaced withreadVoltage()andreadRaw() - Pin constants: Old globals (
ADS1262_DRDY_PIN, etc.) replaced with configurable constructor parameters - Register defines namespaced: Bare names (
POWER,MODE0) now prefixed (ADS1262_REG_POWER,ADS1262_REG_MODE0) - SPI command defines namespaced:
RREG,WREG,START,STOP→ADS1262_CMD_RREG,ADS1262_CMD_WREG, etc. - Removed
SoftwareSerialdependency from examples
New Features
- Flexible pin configuration — Pass custom CS, DRDY, START, and PWDN pins to the constructor, or use defaults
- ESP32 support —
begin(sck, miso, mosi)overload for custom SPI pin mapping on ESP32 - Custom SPI instance — Pass
&SPI1or anySPIClass*for multi-SPI-bus boards - Built-in voltage conversion —
readVoltage()returns volts directly with automatic gain compensation - Non-blocking reads —
readRawAsync()andreadVoltageAsync()return immediately if no data is ready - Continuous mode —
setContinuousMode(true)enables RDATAC for high-speed streaming - Runtime reconfiguration —
setDataRate(),setGain(),setReference(), andsetInputMux()can be called at any time after init - Typed enumerations —
ADS1262_DataRate(16 rates, 2.5–38,400 SPS),ADS1262_Gain(1x–32x),ADS1262_InputChannel(AIN0–AIN9, AINCOM, temp sensor, voltage monitors),ADS1262_Reference(internal 2.5V, external, AVDD) - Configuration struct —
ADS1262_Configfor passing all settings at once tobegin(config) - Calibration API —
performSelfCalibration(),performSystemCalibration(),setOffsetCalibration(),setGainCalibration() - Power management —
powerDown(),powerUp(),reset() - Direct register access —
readRegister()/writeRegister()for advanced users - Device info —
readDeviceID(),testConnection(),getLibraryVersion() - Conversion helpers —
countsToVoltage()andvoltageToCounts()
Examples
Expanded from 1 example to 4:
| Example | Description |
|---|---|
| 01-Basic-Usage | Device init, timed readings, async reads, ESP32 SPI pin support |
| 02-Simple-Differential | Minimal code for quick prototyping |
| 03-Simple-Differential-Extended | Multi-channel cycling with min/max/average statistics |
| 04-Advanced-Usage | Custom config, multi-channel scanning, continuous mode, temperature sensor, gain sweep |
v1.0.0
- First release