Loom_MAX31855 class

MAX31855 thermocouple temperature module.

Base classes

class LoomSPISensor
Abstract base class for SPI sensor modules.

Protected variables

Adafruit_MAX31855 inst_max
Underlying MAX31855 sensor manager instance.
float temperature
Measured temperature.
float internal_temp
Measured internal temperature.

CONSTRUCTORS / DESTRUCTOR

Loom_MAX31855(LoomManager* manager, const char* module_name = "MAX31855", const uint8_t num_samples = 4, const uint8_t CS_pin = 10)
MAX31856 module constructor.
Loom_MAX31855(LoomManager* manager, JsonArrayConst p)
Constructor that takes Json Array, extracts args and delegates to regular constructor.
~Loom_MAX31855() defaulted
Destructor.

OPERATION

void measure() override
Take any relevant measurements.
void package(JsonObject json) override
Package a modules measurements or state.

Function documentation

Loom_MAX31855::Loom_MAX31855(LoomManager* manager, const char* module_name = "MAX31855", const uint8_t num_samples = 4, const uint8_t CS_pin = 10)

MAX31856 module constructor.

Parameters
manager
module_name in String | <"MAX31856"> | null | MAX31856 module name
num_samples in Set(Int) | <4> | {1, 2, 4, 8, 16} | How many samples to take and average
CS_pin in Set(Int) | <10> | {5, 6, 9, 10, 11, 12, 13, 14("A0"), 15("A1"), 16("A2"), 17("A3"), 18("A4"), 19("A5")} | Which pin should be used for chip select

Loom_MAX31855::Loom_MAX31855(LoomManager* manager, JsonArrayConst p)

Constructor that takes Json Array, extracts args and delegates to regular constructor.

Parameters
manager
in The array of constuctor args to expand

void Loom_MAX31855::package(JsonObject json) override

Package a modules measurements or state.

Parameters
json out Object to put data into

void Loom_MAX31855::print_measurements() const override

Print the last set of measurements taken.

Does not package the data.