Skip to content

Releases: Protocentral/ProtoCentral_ads1262

v.2.0.0

20 Feb 08:58

Choose a tag to compare

What's New

Complete library rewrite with a modern, object-oriented architecture replacing the legacy static class design.

Breaking Changes

  • Class renamed: ads1262ADS1262
  • Instance-based API: Static class replaced with proper object instances
  • No more manual byte parsing: ads1262_Read_Data() (raw char*) replaced with readVoltage() and readRaw()
  • 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, STOPADS1262_CMD_RREG, ADS1262_CMD_WREG, etc.
  • Removed SoftwareSerial dependency from examples

New Features

  • Flexible pin configuration — Pass custom CS, DRDY, START, and PWDN pins to the constructor, or use defaults
  • ESP32 supportbegin(sck, miso, mosi) overload for custom SPI pin mapping on ESP32
  • Custom SPI instance — Pass &SPI1 or any SPIClass* for multi-SPI-bus boards
  • Built-in voltage conversionreadVoltage() returns volts directly with automatic gain compensation
  • Non-blocking readsreadRawAsync() and readVoltageAsync() return immediately if no data is ready
  • Continuous modesetContinuousMode(true) enables RDATAC for high-speed streaming
  • Runtime reconfigurationsetDataRate(), setGain(), setReference(), and setInputMux() can be called at any time after init
  • Typed enumerationsADS1262_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 structADS1262_Config for passing all settings at once to begin(config)
  • Calibration APIperformSelfCalibration(), performSystemCalibration(), setOffsetCalibration(), setGainCalibration()
  • Power managementpowerDown(), powerUp(), reset()
  • Direct register accessreadRegister() / writeRegister() for advanced users
  • Device inforeadDeviceID(), testConnection(), getLibraryVersion()
  • Conversion helperscountsToVoltage() and voltageToCounts()

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

30 Oct 16:20

Choose a tag to compare

  • First release