Corsair Lighting Protocol  0.15.0
Control LEDs connected to an Arduino with iCUE
ThermistorTemperatureController Class Reference

#include <ThermistorTemperatureController.h>

+ Inheritance diagram for ThermistorTemperatureController:
+ Collaboration diagram for ThermistorTemperatureController:

Public Member Functions

void addSensor (uint8_t index, uint8_t pin)
 
- Public Member Functions inherited from TemperatureController
virtual void handleTemperatureControl (const Command &command, const CorsairLightingProtocolResponse *response) override
 
virtual uint16_t getTemperature (uint8_t temperatureSensor)
 

Protected Member Functions

virtual uint16_t getTemperatureValue (uint8_t temperatureSensor) override
 
virtual bool isTemperatureSensorConnected (uint8_t temperatureSensor) override
 
virtual uint16_t getVoltageRail12V () override
 
virtual uint16_t getVoltageRail5V () override
 
virtual uint16_t getVoltageRail3V3 () override
 

Protected Attributes

uint8_t sensorPins [TEMPERATURE_NUM] = {0}
 

Detailed Description

This TemperatureController uses Thermistors and Resistors to messure the temperature. It does not implement the voltage rail measurements.

Thermistor Schematic:

    | ---- [10k - Resistor] ---- | ---- [Thermistor] ---- |
    |                            |                        |
 [Ground]                    Analog Pin                 [+5v]

Member Function Documentation

◆ addSensor()

void ThermistorTemperatureController::addSensor ( uint8_t  index,
uint8_t  pin 
)

Add a Sensor to the TemperatureController using an Arduino analog pin connected as shown in {}. index the index of the sensorPins pin the Arduino analog pin

◆ getTemperatureValue()

uint16_t ThermistorTemperatureController::getTemperatureValue ( uint8_t  temperatureSensor)
overrideprotectedvirtual

Get the temperature of a sensor.

Parameters
temperatureSensorthe index of the temperature sensor
Returns
the temperature in hundredths of a degree Celsius.

Implements TemperatureController.

◆ getVoltageRail12V()

uint16_t ThermistorTemperatureController::getVoltageRail12V ( )
overrideprotectedvirtual

Get the voltage of the 12V rail.

Returns
the voltage in mV

Implements TemperatureController.

◆ getVoltageRail3V3()

uint16_t ThermistorTemperatureController::getVoltageRail3V3 ( )
overrideprotectedvirtual

Get the voltage of the 3.3V rail.

Returns
the voltage in mV

Implements TemperatureController.

◆ getVoltageRail5V()

uint16_t ThermistorTemperatureController::getVoltageRail5V ( )
overrideprotectedvirtual

Get the voltage of the 5V rail.

Returns
the voltage in mV

Implements TemperatureController.

◆ isTemperatureSensorConnected()

bool ThermistorTemperatureController::isTemperatureSensorConnected ( uint8_t  temperatureSensor)
overrideprotectedvirtual

Check if a temperature sensor is connected.

Parameters
temperatureSensorthe index of the temperature sensor
Returns
true if a temperature sensor is connected

Implements TemperatureController.


The documentation for this class was generated from the following files: