peary::board::carboard::TemperatureSensor

Temperature sensor resource for CaR board.

#include <peary/hardware/boards/Carboard.hpp>

Inherits from peary::hal::TemperatureProvider, peary::hal::Resource

Public Functions

Name
TemperatureSensor(component::TMP101 & sensor)Constructor for TemperatureSensor class.
virtual double getTemperature() overrideGet the temperature from the sensor.

Additional inherited members

Public Functions inherited from peary::hal::Resource

Name
virtual ~Resource() =defaultDefault constructor.
void setName(const std::string & name)Set the name of the resource.
std::string name() constGet the name of the resource.

Protected Attributes inherited from peary::hal::Resource

Name
std::string _name

Public Functions Documentation

function TemperatureSensor

  inline TemperatureSensor(
    component::TMP101 & sensor
)
  

Constructor for TemperatureSensor class.

Parameters:

  • sensor Reference to the TMP101 component

function getTemperature

  inline virtual double getTemperature() override
  

Get the temperature from the sensor.

Return: The temperature in degrees Celsius

Reimplements: peary::hal::TemperatureProvider::getTemperature


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