peary::component::TMP101

TMP101 Temperature Sensor Component.

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

Inherits from peary::hal::Component

Public Types

Name
enum class Register { TEMPERATURE = 0x00, CONFIGURATION = 0x01, TLOW = 0x02, THIGH = 0x03}

Public Functions

Name
TMP101(const std::string & i2c_bus, uint8_t device_address)Constructor for TMP101 class.
double readTemperature()Read the temperature from the TMP101 sensor.

Additional inherited members

Public Functions inherited from peary::hal::Component

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

Public Types Documentation

enum Register

Enumerator Value Description
TEMPERATURE 0x00
CONFIGURATION 0x01
TLOW 0x02
THIGH 0x03

Public Functions Documentation

function TMP101

  TMP101(
    const std::string & i2c_bus,
    uint8_t device_address
)
  

Constructor for TMP101 class.

Parameters:

  • i2c_bus The I2C bus to which the TMP101 is connected
  • device_address The I2C address of the TMP101 device

function readTemperature

  double readTemperature()
  

Read the temperature from the TMP101 sensor.

Return: The temperature in degrees Celsius


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