Loom_FXAS21002 class

FXAS21002 3-Axis Gyroscope sensor module.

Base classes

class LoomI2CSensor
Abstract root for I2C sensor modules.

Protected variables

Adafruit_FXAS21002C inst_FXAS21002
Underlying FXAS21002 sensor manager instance.
float gyro
Measured gyro values (x,y,z). Units: °/s.

CONSTRUCTORS / DESTRUCTOR

Loom_FXAS21002(LoomManager* manager, const byte i2c_address = 0x20, const uint8_t mux_port = 255)
Constructor.
Loom_FXAS21002(LoomManager* manager, JsonArrayConst p)
Constructor that takes Json Array, extracts args and delegates to regular constructor.
~Loom_FXAS21002() defaulted
Destructor.

OPERATION

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

Function documentation

Loom_FXAS21002::Loom_FXAS21002(LoomManager* manager, const byte i2c_address = 0x20, const uint8_t mux_port = 255)

Constructor.

Parameters
manager
i2c_address in Set(Int) | <0x20> | {0x20, 0x21} | I2C address
mux_port in Int | <255> | [0-16] | Port on multiplexer

Loom_FXAS21002::Loom_FXAS21002(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_FXAS21002::package(JsonObject json) override

Package a modules measurements or state.

Parameters
json out Object to put data into

void Loom_FXAS21002::print_measurements() const override

Print the last set of measurements taken.

Does not package the data.