On this page
article
peary::board::carboard::TemperatureSensor
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(std::string_view name)Set the name of the resource, usually corresponds to the name used in the schematic. |
| std::string | name() constGet the name of the resource. |
| void | setType(std::string_view type)Set the type string (e.g. VoltageRegulator) |
| std::string | type() constGet the type of the resource. |
Protected Attributes inherited from peary::hal::Resource
| Name | |
|---|---|
| std::string | _name |
| std::string | _type |
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 2026-01-30 at 22:01:05 +0100