peary::component::ADS7828

ADS7828 8-Channel 12-Bit A/D Converter Component.

#include <peary/hardware/components/ADS7828.hpp>

Inherits from peary::hal::Component

Public Types

Name
enum class Channel { CHO = 0x00, CH1 = 0x40, CH2 = 0x10, CH3 = 0x50, CH4 = 0x20, CH5 = 0x60, CH6 = 0x30, CH7 = 0x70}

Public Functions

Name
ADS7828(const std::string & i2c_bus, uint8_t device_address, double vref)Constructor for ADS7828 class.
double readSingleEnded(Channel channel)Read the voltage from a specific channel on the ADS7828.

Additional inherited members

Public Functions inherited from peary::hal::Component

Name
Component() =defaultDefault constructor.
virtual ~Component() =defaultDefault destructor.

Public Types Documentation

enum Channel

Enumerator Value Description
CHO 0x00
CH1 0x40
CH2 0x10
CH3 0x50
CH4 0x20
CH5 0x60
CH6 0x30
CH7 0x70

Public Functions Documentation

function ADS7828

  ADS7828(
    const std::string & i2c_bus,
    uint8_t device_address,
    double vref
)
  

Constructor for ADS7828 class.

Parameters:

  • i2c_bus The I2C bus to which the ADS7828 is connected
  • device_address The I2C address of the ADS7828 device
  • vref The reference voltage for the ADS7828 (default is 3.3V)

function readSingleEnded

  double readSingleEnded(
    Channel channel
)
  

Read the voltage from a specific channel on the ADS7828.

Parameters:

  • channel The channel to read from (CHO to CH7)

Return: The voltage read from the specified channel


Updated on 2025-11-14 at 11:31:23 +0100