|
void | doAllSensing () |
|
void | readBME280 (float &T, float &P, float &H) |
|
void | readHDC1080 (float &T, float &H) |
|
void | readTSL2591 (double &lux) |
|
void | configureTSL2591Sensor () |
|
void | readGas (uint16_t &gas, uint16_t &co2) |
|
void | readAccelerometer (float &ax, float &ay, float &az) |
|
void | readMagnetometer (float &mx, float &my, float &mz, float &mH) |
|
void | readGyro (float &gx, float &gy, float &gz) |
|
void | readMagneticSensor (int &mag) |
|
void | readWindSpeed (float &windspeed) |
|
void | readGPS (gps_fix &fix) |
|
AloraSensorKit::AloraSensorKit |
( |
uint8_t |
enablePin = 16 , |
|
|
uint8_t |
activeLogic = HIGH |
|
) |
| |
Instantiate Alora board library object.
Originally written by Andri Yadi on 8/5/16 Maintained by Alwin Arrasyid
- Parameters
-
enablePin | GPIO pin to enable Alora, 16 on Alora v2 and 13 on Alora v2.2. Default to 16 |
activeLogic | Alora enable pin logic. Use LOW for Alora v2.2. Default to HIGH |
void AloraSensorKit::begin |
( |
void |
| ) |
|
Initialize Alora board and its sensors.
void AloraSensorKit::configureTSL2591Sensor |
( |
| ) |
|
|
private |
Configure the TSL2591 sensor
void AloraSensorKit::doAllSensing |
( |
| ) |
|
|
private |
Read all sensors data and store them to he lastSensorData property.
- See Also
- lastSensorData
DateTime AloraSensorKit::getDateTime |
( |
| ) |
|
Get current time from RTC.
- Returns
- DateTime object of current time.
NMEAGPS * AloraSensorKit::getGPSObject |
( |
| ) |
|
Get NMEAGPS object
- Returns
- NMEAGPS object of the GPS
Get IMU sensor adapter pointer.
- Returns
- ALORA_IMU_SENSOR* pointer to Alora IMU sensor adapter object
Get GPIO Expander pointer.
- Returns
- GpioExpander* pointer to GPIO Expander object
void AloraSensorKit::initGPS |
( |
Stream * |
gpsStream | ) |
|
void AloraSensorKit::printSensingTo |
( |
Print & |
print | ) |
|
Print the sensing data in a non-standarized format.
- Parameters
-
print | any object which class derived from Print including Serial and String. |
void AloraSensorKit::printSensingTo |
( |
String & |
str | ) |
|
Print the sensing data in a non-standarized format.
- Parameters
-
str | a string where the sensing data will be stored. |
void AloraSensorKit::readAccelerometer |
( |
float & |
ax, |
|
|
float & |
ay, |
|
|
float & |
az |
|
) |
| |
|
private |
Read accelerometer data from LSM9DS1.
- Parameters
-
ax | accelerometer X axis value will be stored in this variable. |
ay | accelerometer Y axis value will be stored in this variable. |
az | accelerometer Z axis value will be stored in this variable. |
uint16_t AloraSensorKit::readADC |
( |
uint8_t |
channel | ) |
|
Read analog data from MAX11609 (ADC)
- Returns
- read value
void AloraSensorKit::readBME280 |
( |
float & |
T, |
|
|
float & |
P, |
|
|
float & |
H |
|
) |
| |
|
private |
Read data from BME280 sensor.
- Parameters
-
T | temperature reading will be stored in this variable. |
P | pressure reading will be stored in this variable. |
H | humidity reading will be stored in this variable. |
void AloraSensorKit::readGas |
( |
uint16_t & |
gas, |
|
|
uint16_t & |
co2 |
|
) |
| |
|
private |
Read data from either CCS811 or analog gas sensor.
- Parameters
-
gas | the TVOC value will be stored in this variable. |
co2 | the CO2 reading from CCS811 will be stored in this variable. If CCS811 is not used, the value will be 0. |
void AloraSensorKit::readGPS |
( |
gps_fix & |
fix | ) |
|
|
private |
void AloraSensorKit::readGyro |
( |
float & |
gx, |
|
|
float & |
gy, |
|
|
float & |
gz |
|
) |
| |
|
private |
Read gyroscope data from LSM9DS1.
- Parameters
-
gx | gyroscope X axis value will be stored in this variable. |
gy | gyroscope Y axis value will be stored in this variable. |
gz | gyroscope Z axis value will be stored in this variable. |
void AloraSensorKit::readHDC1080 |
( |
float & |
T, |
|
|
float & |
H |
|
) |
| |
|
private |
Read data from HDC1080 sensor.
- Parameters
-
T | temperature reading will be stored in this variable |
H | humidity reading will be stored in this variable |
void AloraSensorKit::readMagneticSensor |
( |
int & |
mag | ) |
|
|
private |
Read magnetic sensor.
- Parameters
-
mag | magnetic sensor reading value will be stored in this variable. |
void AloraSensorKit::readMagnetometer |
( |
float & |
mx, |
|
|
float & |
my, |
|
|
float & |
mz, |
|
|
float & |
mH |
|
) |
| |
|
private |
Read magnetometer data from LSM9DS1.
- Parameters
-
mx | magnetometer X axis value will be stored in this variable. |
my | magnetometer Y axis value will be stored in this variable. |
mz | magnetometer Z axis value will be stored in this variable. |
mH | magnetometer heading value will be stored in this variable, |
void AloraSensorKit::readTSL2591 |
( |
double & |
lux | ) |
|
|
private |
Read luminance value from TSL2591.
- Parameters
-
lux | the luminance value will be stored in this variable. |
void AloraSensorKit::readWindSpeed |
( |
float & |
windspeed | ) |
|
|
private |
Read the windspeed in MPH unit.
- Parameters
-
windspeed | the speed of the wind value will be stored in this variable. |
void AloraSensorKit::run |
( |
| ) |
|
Read all sensors value and store the result to a private member. This function is usually called inside loop() function.
void AloraSensorKit::scanAndPrintI2C |
( |
Print & |
print | ) |
|
Scan for I2C devices and print the result.
- Parameters
-
print | any object which class derived from Print including Serial and String. |
void AloraSensorKit::setCCS811WakeLogic |
( |
uint8_t |
wakeLogic = LOW | ) |
|
Set CCS811 air quality sensor wake logic.
- Parameters
-
wakeLogic | either HIGH or LOW |
Adafruit_BME280* AloraSensorKit::bme280 = NULL |
|
private |
Object of Adafruit BME280 sensor
CCS811* AloraSensorKit::ccs811 = NULL |
|
private |
uint8_t AloraSensorKit::ccs811WakeLogic |
|
private |
CCS811 air quality sensor wake logic
uint8_t AloraSensorKit::enablePin |
|
private |
uint8_t AloraSensorKit::enablePinActiveLogic |
|
private |
Aloar board enable pin active logic
NMEAGPS* AloraSensorKit::gps = NULL |
|
private |
Stream* AloraSensorKit::gpsStream = NULL |
|
private |
ClosedCube_HDC1080* AloraSensorKit::hdc1080 = NULL |
|
private |
IMU sensor adapter object
Object of GPIO Expander (SX1509)
Object of SensorValues struct. All sensor data are stored in this property
uint32_t AloraSensorKit::lastSensorQuerryMs = 0 |
|
private |
Records the time when the sensor data is read in milliseconds
MAX11609* AloraSensorKit::max11609 = NULL |
|
private |
RTC_DS3231* AloraSensorKit::rtc = NULL |
|
private |
Object of Adafruit TSL2591 sensor
The documentation for this class was generated from the following files: