diff --git a/html/_wipper_snapper___i2_c_8h.html b/html/_wipper_snapper___i2_c_8h.html index 046c71ff5..773433e79 100644 --- a/html/_wipper_snapper___i2_c_8h.html +++ b/html/_wipper_snapper___i2_c_8h.html @@ -93,10 +93,12 @@ #include "drivers/WipperSnapper_I2C_Driver_LTR329_LTR303.h"
#include "drivers/WipperSnapper_I2C_Driver_LTR390.h"
#include "drivers/WipperSnapper_I2C_Driver_MAX17048.h"
+#include "drivers/WipperSnapper_I2C_Driver_MCP3421.h"
#include "drivers/WipperSnapper_I2C_Driver_MCP9808.h"
#include "drivers/WipperSnapper_I2C_Driver_MPL115A2.h"
#include "drivers/WipperSnapper_I2C_Driver_MPRLS.h"
#include "drivers/WipperSnapper_I2C_Driver_MS8607.h"
+#include "drivers/WipperSnapper_I2C_Driver_NAU7802.h"
#include "drivers/WipperSnapper_I2C_Driver_PCT2075.h"
#include "drivers/WipperSnapper_I2C_Driver_PM25.h"
#include "drivers/WipperSnapper_I2C_Driver_SCD30.h"
@@ -115,6 +117,8 @@ #include "drivers/WipperSnapper_I2C_Driver_VCNL4040.h"
#include "drivers/WipperSnapper_I2C_Driver_VEML7700.h"
#include "drivers/WipperSnapper_I2C_Driver_VL53L0X.h"
+#include "drivers/WipperSnapper_I2C_Driver_VL53L1X.h"
+#include "drivers/WipperSnapper_I2C_Driver_VL53L4CD.h"
#include "drivers/WipperSnapper_I2C_Driver_VL6180X.h"

Go to the source code of this file.

diff --git a/html/_wipper_snapper___i2_c_8h_source.html b/html/_wipper_snapper___i2_c_8h_source.html index 45fa4828a..090b913b3 100644 --- a/html/_wipper_snapper___i2_c_8h_source.html +++ b/html/_wipper_snapper___i2_c_8h_source.html @@ -66,7 +66,7 @@
WipperSnapper_I2C.h
-Go to the documentation of this file.
1 
16 #ifndef WipperSnapper_Component_I2C_H
17 #define WipperSnapper_Component_I2C_H
18 
19 #include "Wippersnapper.h"
20 #include <Wire.h>
21 
25 #include "drivers/WipperSnapper_I2C_Driver_BH1750.h"
52 #include "drivers/WipperSnapper_I2C_Driver_SGP30.h"
66 
67 #define I2C_TIMEOUT_MS 50
68 
69 // forward decl.
70 class Wippersnapper;
71 
72 /**************************************************************************/
76 /**************************************************************************/
78 public:
80  wippersnapper_i2c_v1_I2CBusInitRequest *msgInitRequest);
82  bool isInitialized();
83  wippersnapper_i2c_v1_BusResponse getBusStatus();
84 
85  wippersnapper_i2c_v1_I2CBusScanResponse scanAddresses();
86  bool
87  initI2CDevice(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq);
88 
90  wippersnapper_i2c_v1_I2CDeviceUpdateRequest *msgDeviceUpdateReq);
91  void deinitI2CDevice(
92  wippersnapper_i2c_v1_I2CDeviceDeinitRequest *msgDeviceDeinitReq);
93 
94  void update();
95  void fillEventMessage(wippersnapper_signal_v1_I2CResponse *msgi2cResponse,
96  float value,
97  wippersnapper_i2c_v1_SensorType sensorType);
98 
99  void
100  displayDeviceEventMessage(wippersnapper_signal_v1_I2CResponse *msgi2cResponse,
101  uint32_t sensorAddress);
102 
104  wippersnapper_signal_v1_I2CResponse *msgi2cResponse,
105  uint32_t sensorAddress);
106 
107 private:
108  bool _isInit = false;
109  int32_t _portNum;
110  TwoWire *_i2c = nullptr;
111  wippersnapper_i2c_v1_BusResponse _busStatusResponse;
112  std::vector<WipperSnapper_I2C_Driver *> drivers;
113  // Sensor driver objects
114  WipperSnapper_I2C_Driver_AHTX0 *_ahtx0 = nullptr;
115  WipperSnapper_I2C_Driver_DPS310 *_dps310 = nullptr;
116  WipperSnapper_I2C_Driver_ENS160 *_ens160 = nullptr;
117  WipperSnapper_I2C_Driver_SCD30 *_scd30 = nullptr;
118  WipperSnapper_I2C_Driver_BH1750 *_bh1750 = nullptr;
119  WipperSnapper_I2C_Driver_BME280 *_bme280 = nullptr;
120  WipperSnapper_I2C_Driver_BMP280 *_bmp280 = nullptr;
121  WipperSnapper_I2C_Driver_BMP3XX *_bmp3xx = nullptr;
122  WipperSnapper_I2C_Driver_BME680 *_bme680 = nullptr;
123  WipperSnapper_I2C_Driver_HTS221 *_hts221 = nullptr;
124  WipperSnapper_I2C_Driver_HTU21D *_htu21d = nullptr;
125  WipperSnapper_I2C_Driver_HTU31D *_htu31d = nullptr;
126  WipperSnapper_I2C_Driver_INA219 *_ina219 = nullptr;
127  WipperSnapper_I2C_Driver_LTR329_LTR303 *_ltr329 = nullptr;
128  WipperSnapper_I2C_Driver_LTR390 *_ltr390 = nullptr;
129  WipperSnapper_I2C_Driver_MCP9808 *_mcp9808 = nullptr;
130  WipperSnapper_I2C_Driver_MPL115A2 *_mpl115a2 = nullptr;
131  WipperSnapper_I2C_Driver_MPRLS *_mprls = nullptr;
132  WipperSnapper_I2C_Driver_MS8607 *_ms8607 = nullptr;
133  WipperSnapper_I2C_Driver_TMP117 *_tmp117 = nullptr;
134  WipperSnapper_I2C_Driver_TSL2591 *_tsl2591 = nullptr;
135  WipperSnapper_I2C_Driver_VCNL4020 *_vcnl4020 = nullptr;
136  WipperSnapper_I2C_Driver_VCNL4040 *_vcnl4040 = nullptr;
137  WipperSnapper_I2C_Driver_VEML7700 *_veml7700 = nullptr;
138  WipperSnapper_I2C_Driver_SCD4X *_scd40 = nullptr;
139  WipperSnapper_I2C_Driver_SEN5X *_sen5x = nullptr;
140  WipperSnapper_I2C_Driver_SGP30 *_sgp30 = nullptr;
141  WipperSnapper_I2C_Driver_SGP40 *_sgp40 = nullptr;
142  WipperSnapper_I2C_Driver_PCT2075 *_pct2075 = nullptr;
143  WipperSnapper_I2C_Driver_PM25 *_pm25 = nullptr;
144  WipperSnapper_I2C_Driver_SI7021 *_si7021 = nullptr;
145  WipperSnapper_I2C_Driver_SHT4X *_sht4x = nullptr;
146  WipperSnapper_I2C_Driver_SHT3X *_sht3x = nullptr;
147  WipperSnapper_I2C_Driver_SHTC3 *_shtc3 = nullptr;
148  WipperSnapper_I2C_Driver_LC709203F *_lc = nullptr;
149  WipperSnapper_I2C_Driver_LPS22HB *_lps22hb = nullptr;
150  WipperSnapper_I2C_Driver_LPS25HB *_lps25hb = nullptr;
151  WipperSnapper_I2C_Driver_LPS3XHW *_lps3xhw = nullptr;
153  WipperSnapper_I2C_Driver_VL53L0X *_vl53l0x = nullptr;
154  WipperSnapper_I2C_Driver_VL6180X *_vl6180x = nullptr;
155  WipperSnapper_I2C_Driver_MAX17048 *_max17048 = nullptr;
156  WipperSnapper_I2C_Driver_ADT7410 *_adt7410 = nullptr;
157 };
158 extern Wippersnapper WS;
159 
160 #endif // WipperSnapper_Component_I2C_H
Class that provides an interface with the I2C bus.
Definition: WipperSnapper_I2C.h:77
+Go to the documentation of this file.
1 
16 #ifndef WipperSnapper_Component_I2C_H
17 #define WipperSnapper_Component_I2C_H
18 
19 #include "Wippersnapper.h"
20 #include <Wire.h>
21 
25 #include "drivers/WipperSnapper_I2C_Driver_BH1750.h"
54 #include "drivers/WipperSnapper_I2C_Driver_SGP30.h"
70 
71 #define I2C_TIMEOUT_MS 50
72 
73 // forward decl.
74 class Wippersnapper;
75 
76 /**************************************************************************/
80 /**************************************************************************/
82 public:
84  wippersnapper_i2c_v1_I2CBusInitRequest *msgInitRequest);
86  bool isInitialized();
87  wippersnapper_i2c_v1_BusResponse getBusStatus();
88 
89  wippersnapper_i2c_v1_I2CBusScanResponse scanAddresses();
90  bool
91  initI2CDevice(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq);
92 
94  wippersnapper_i2c_v1_I2CDeviceUpdateRequest *msgDeviceUpdateReq);
95  void deinitI2CDevice(
96  wippersnapper_i2c_v1_I2CDeviceDeinitRequest *msgDeviceDeinitReq);
97 
98  void update();
99  void fillEventMessage(wippersnapper_signal_v1_I2CResponse *msgi2cResponse,
100  float value,
101  wippersnapper_i2c_v1_SensorType sensorType);
102 
103  void
104  displayDeviceEventMessage(wippersnapper_signal_v1_I2CResponse *msgi2cResponse,
105  uint32_t sensorAddress);
106 
108  wippersnapper_signal_v1_I2CResponse *msgi2cResponse,
109  uint32_t sensorAddress);
110 
111 private:
112  bool _isInit = false;
113  int32_t _portNum;
114  TwoWire *_i2c = nullptr;
115  wippersnapper_i2c_v1_BusResponse _busStatusResponse;
116  std::vector<WipperSnapper_I2C_Driver *> drivers;
117  // Sensor driver objects
118  WipperSnapper_I2C_Driver_AHTX0 *_ahtx0 = nullptr;
119  WipperSnapper_I2C_Driver_DPS310 *_dps310 = nullptr;
120  WipperSnapper_I2C_Driver_ENS160 *_ens160 = nullptr;
121  WipperSnapper_I2C_Driver_SCD30 *_scd30 = nullptr;
122  WipperSnapper_I2C_Driver_BH1750 *_bh1750 = nullptr;
123  WipperSnapper_I2C_Driver_BME280 *_bme280 = nullptr;
124  WipperSnapper_I2C_Driver_BMP280 *_bmp280 = nullptr;
125  WipperSnapper_I2C_Driver_BMP3XX *_bmp3xx = nullptr;
126  WipperSnapper_I2C_Driver_BME680 *_bme680 = nullptr;
127  WipperSnapper_I2C_Driver_HTS221 *_hts221 = nullptr;
128  WipperSnapper_I2C_Driver_HTU21D *_htu21d = nullptr;
129  WipperSnapper_I2C_Driver_HTU31D *_htu31d = nullptr;
130  WipperSnapper_I2C_Driver_INA219 *_ina219 = nullptr;
131  WipperSnapper_I2C_Driver_LTR329_LTR303 *_ltr329 = nullptr;
132  WipperSnapper_I2C_Driver_LTR390 *_ltr390 = nullptr;
133  WipperSnapper_I2C_Driver_MCP3421 *_mcp3421 = nullptr;
134  WipperSnapper_I2C_Driver_MCP9808 *_mcp9808 = nullptr;
135  WipperSnapper_I2C_Driver_MPL115A2 *_mpl115a2 = nullptr;
136  WipperSnapper_I2C_Driver_MPRLS *_mprls = nullptr;
137  WipperSnapper_I2C_Driver_MS8607 *_ms8607 = nullptr;
138  WipperSnapper_I2C_Driver_NAU7802 *_nau7802 = nullptr;
139  WipperSnapper_I2C_Driver_TMP117 *_tmp117 = nullptr;
140  WipperSnapper_I2C_Driver_TSL2591 *_tsl2591 = nullptr;
141  WipperSnapper_I2C_Driver_VCNL4020 *_vcnl4020 = nullptr;
142  WipperSnapper_I2C_Driver_VCNL4040 *_vcnl4040 = nullptr;
143  WipperSnapper_I2C_Driver_VEML7700 *_veml7700 = nullptr;
144  WipperSnapper_I2C_Driver_SCD4X *_scd40 = nullptr;
145  WipperSnapper_I2C_Driver_SEN5X *_sen5x = nullptr;
146  WipperSnapper_I2C_Driver_SGP30 *_sgp30 = nullptr;
147  WipperSnapper_I2C_Driver_SGP40 *_sgp40 = nullptr;
148  WipperSnapper_I2C_Driver_PCT2075 *_pct2075 = nullptr;
149  WipperSnapper_I2C_Driver_PM25 *_pm25 = nullptr;
150  WipperSnapper_I2C_Driver_SI7021 *_si7021 = nullptr;
151  WipperSnapper_I2C_Driver_SHT4X *_sht4x = nullptr;
152  WipperSnapper_I2C_Driver_SHT3X *_sht3x = nullptr;
153  WipperSnapper_I2C_Driver_SHTC3 *_shtc3 = nullptr;
154  WipperSnapper_I2C_Driver_LC709203F *_lc = nullptr;
155  WipperSnapper_I2C_Driver_LPS22HB *_lps22hb = nullptr;
156  WipperSnapper_I2C_Driver_LPS25HB *_lps25hb = nullptr;
157  WipperSnapper_I2C_Driver_LPS3XHW *_lps3xhw = nullptr;
159  WipperSnapper_I2C_Driver_VL53L0X *_vl53l0x = nullptr;
160  WipperSnapper_I2C_Driver_VL53L1X *_vl53l1x = nullptr;
161  WipperSnapper_I2C_Driver_VL53L4CD *_vl53l4cd = nullptr;
162  WipperSnapper_I2C_Driver_VL6180X *_vl6180x = nullptr;
163  WipperSnapper_I2C_Driver_MAX17048 *_max17048 = nullptr;
164  WipperSnapper_I2C_Driver_ADT7410 *_adt7410 = nullptr;
165 };
166 extern Wippersnapper WS;
167 
168 #endif // WipperSnapper_Component_I2C_H
Class that provides an interface with the I2C bus.
Definition: WipperSnapper_I2C.h:81
Class that provides a driver interface for the SCD30 sensor.
Definition: WipperSnapper_I2C_Driver_SCD30.h:27
Class that provides a sensor driver for the MS8607 PHT sensor.
Definition: WipperSnapper_I2C_Driver_MS8607.h:27
@@ -79,7 +79,8 @@
Class that provides a driver interface for a ADT7410 sensor.
Definition: WipperSnapper_I2C_Driver_ADT7410.h:26
-
void fillEventMessage(wippersnapper_signal_v1_I2CResponse *msgi2cResponse, float value, wippersnapper_i2c_v1_SensorType sensorType)
Fills a sensor_event message with the sensor&#39;s value and type.
Definition: WipperSnapper_I2C.cpp:824
+
Class that provides a driver interface for a VL53L4CD sensor.
Definition: WipperSnapper_I2C_Driver_VL53L4CD.h:26
+
void fillEventMessage(wippersnapper_signal_v1_I2CResponse *msgi2cResponse, float value, wippersnapper_i2c_v1_SensorType sensorType)
Fills a sensor_event message with the sensor&#39;s value and type.
Definition: WipperSnapper_I2C.cpp:871
Class that provides a driver interface for a VL6180X sensor.
Definition: WipperSnapper_I2C_Driver_VL6180X.h:27
@@ -87,7 +88,7 @@
bool initI2CDevice(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)
Initializes I2C device driver.
Definition: WipperSnapper_I2C.cpp:213
-
void displayDeviceEventMessage(wippersnapper_signal_v1_I2CResponse *msgi2cResponse, uint32_t sensorAddress)
Displays a sensor event message on the TFT.
Definition: WipperSnapper_I2C.cpp:849
+
void displayDeviceEventMessage(wippersnapper_signal_v1_I2CResponse *msgi2cResponse, uint32_t sensorAddress)
Displays a sensor event message on the TFT.
Definition: WipperSnapper_I2C.cpp:896
Class that provides a sensor driver for the HTU31D humidity and temperature sensor.
Definition: WipperSnapper_I2C_Driver_HTU31D.h:19
Class that provides a driver interface for the PM25 sensor.
Definition: WipperSnapper_I2C_Driver_PM25.h:28
@@ -102,7 +103,7 @@
Class that provides a driver interface for a LC709203F sensor.
Definition: WipperSnapper_I2C_Driver_LC709203F.h:27
Class that provides a sensor driver for the BMP280 temperature and pressure sensor.
Definition: WipperSnapper_I2C_Driver_BMP280.h:30
-
bool encodePublishI2CDeviceEventMsg(wippersnapper_signal_v1_I2CResponse *msgi2cResponse, uint32_t sensorAddress)
Encodes an I2C sensor device&#39;s signal message.
Definition: WipperSnapper_I2C.cpp:785
+
bool encodePublishI2CDeviceEventMsg(wippersnapper_signal_v1_I2CResponse *msgi2cResponse, uint32_t sensorAddress)
Encodes an I2C sensor device&#39;s signal message.
Definition: WipperSnapper_I2C.cpp:832
@@ -114,14 +115,16 @@
WipperSnapper_Component_I2C(wippersnapper_i2c_v1_I2CBusInitRequest *msgInitRequest)
Creates a new WipperSnapper I2C component.
Definition: WipperSnapper_I2C.cpp:31
Class that provides a driver interface for the SHT4X sensor.
Definition: WipperSnapper_I2C_Driver_SHT4X.h:30
-
void deinitI2CDevice(wippersnapper_i2c_v1_I2CDeviceDeinitRequest *msgDeviceDeinitReq)
Deinitializes and deletes an I2C device driver object.
Definition: WipperSnapper_I2C.cpp:750
+
void deinitI2CDevice(wippersnapper_i2c_v1_I2CDeviceDeinitRequest *msgDeviceDeinitReq)
Deinitializes and deletes an I2C device driver object.
Definition: WipperSnapper_I2C.cpp:797
Class that provides a driver interface for the SHT3X sensor.
Definition: WipperSnapper_I2C_Driver_SHT3X.h:30
Class that provides a driver interface for a LTR390 sensor.
Definition: WipperSnapper_I2C_Driver_LTR390.h:26
+
Class that provides a driver interface for a TMP117 sensor.
Definition: WipperSnapper_I2C_Driver_TMP117.h:26
+
Class that provides a sensor driver for the MPL115A2 temperature and pressure sensor.
Definition: WipperSnapper_I2C_Driver_MPL115A2.h:28
@@ -132,11 +135,14 @@
Class that provides a sensor driver for the LPS25HB temperature and pressure sensor.
Definition: WipperSnapper_I2C_Driver_LPS25HB.h:28
+
Class that provides a driver interface for a MCP3421 sensor.
Definition: WipperSnapper_I2C_Driver_MCP3421.h:27
Class that provides a driver interface for the SI7021 sensor.
Definition: WipperSnapper_I2C_Driver_SI7021.h:29
Class that provides a driver interface for the STEMMA soil sensor.
Definition: WipperSnapper_I2C_Driver_STEMMA_Soil_Sensor.h:27
Class that provides a driver interface for a VL53L0X sensor.
Definition: WipperSnapper_I2C_Driver_VL53L0X.h:27
-
void updateI2CDeviceProperties(wippersnapper_i2c_v1_I2CDeviceUpdateRequest *msgDeviceUpdateReq)
Updates the properties of an I2C device driver.
Definition: WipperSnapper_I2C.cpp:722
+
Class that provides a driver interface for a VL53L1X sensor.
Definition: WipperSnapper_I2C_Driver_VL53L1X.h:27
+ +
void updateI2CDeviceProperties(wippersnapper_i2c_v1_I2CDeviceUpdateRequest *msgDeviceUpdateReq)
Updates the properties of an I2C device driver.
Definition: WipperSnapper_I2C.cpp:769
Wippersnapper WS
Definition: Wippersnapper.cpp:36
Class that provides a sensor driver for the MPRLS sensor.
Definition: WipperSnapper_I2C_Driver_MPRLS.h:27
@@ -153,10 +159,12 @@
Class that provides a driver interface for a VEML7700 sensor.
Definition: WipperSnapper_I2C_Driver_VEML7700.h:26
Class that provides a sensor driver for the AHTX0 temperature and humidity sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:28
+
Class that provides a driver interface for the SGP40 sensor.
Definition: WipperSnapper_I2C_Driver_SGP40.h:28
Class that provides a driver interface for a INA219 sensor.
Definition: WipperSnapper_I2C_Driver_INA219.h:26
Class that provides a driver interface for a MAX17048 sensor.
Definition: WipperSnapper_I2C_Driver_MAX17048.h:27
+
Class that provides a driver interface for the NAU7802.
Definition: WipperSnapper_I2C_Driver_NAU7802.h:29
Class that provides a sensor driver for the DPS310 barometric pressure sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:28
Class that provides a sensor driver for the LPS3XHW temperature and pressure sensor.
Definition: WipperSnapper_I2C_Driver_LPS3XHW.h:28
~WipperSnapper_Component_I2C()
Destructor for a WipperSnapper I2C component.
Definition: WipperSnapper_I2C.cpp:114
@@ -166,7 +174,7 @@
Class that provides a driver interface for a VCNL4020 sensor.
Definition: WipperSnapper_I2C_Driver_VCNL4020.h:26
-
void update()
Queries all I2C device drivers for new values. Fills and sends an I2CSensorEvent with the sensor even...
Definition: WipperSnapper_I2C.cpp:945
+
void update()
Queries all I2C device drivers for new values. Fills and sends an I2CSensorEvent with the sensor even...
Definition: WipperSnapper_I2C.cpp:992
-Go to the documentation of this file.
1 
18 #ifndef WIPPERSNAPPER_H
19 #define WIPPERSNAPPER_H
20 
21 // Cpp STD
22 #include <vector>
23 
24 // Nanopb dependencies
25 #include <nanopb/pb_common.h>
26 #include <nanopb/pb_decode.h>
27 #include <nanopb/pb_encode.h>
28 #include <pb.h>
29 
30 #include <wippersnapper/description/v1/description.pb.h> // description.proto
31 #include <wippersnapper/signal/v1/signal.pb.h> // signal.proto
32 
33 // External libraries
34 #include "Adafruit_MQTT.h" // MQTT Client
35 #include "Adafruit_SleepyDog.h" // Watchdog
36 #include "Arduino.h" // Wiring
37 #include <SPI.h> // SPI
38 
39 // Wippersnapper API Helpers
40 #include "Wippersnapper_Boards.h"
42 #include "provisioning/ConfigJson.h"
43 
44 #define WS_DEBUG
45 #define WS_PRINTER Serial
46 
47 // Define actual debug output functions when necessary.
48 #ifdef WS_DEBUG
49 #define WS_DEBUG_PRINT(...) \
50  { WS_PRINTER.print(__VA_ARGS__); }
51 #define WS_DEBUG_PRINTLN(...) \
52  { WS_PRINTER.println(__VA_ARGS__); }
53 #define WS_DEBUG_PRINTHEX(...) \
54  { WS_PRINTER.print(__VA_ARGS__, HEX); }
55 #else
56 #define WS_DEBUG_PRINT(...) \
57  {}
58 #define WS_DEBUG_PRINTLN(...) \
59  {}
60 #endif
61 
62 // Wippersnapper components
66 
67 // LEDC-Manager, ESP32-only
68 #ifdef ARDUINO_ARCH_ESP32
70 #endif
71 
72 // Display
73 #ifdef USE_DISPLAY
76 #endif
77 
80 #include "components/pwm/ws_pwm.h"
83 
84 #if defined(USE_TINYUSB)
85 #include "provisioning/tinyusb/Wippersnapper_FS.h"
86 #endif
87 
88 #if defined(USE_LITTLEFS)
89 #include "provisioning/littlefs/WipperSnapper_LittleFS.h"
90 #endif
91 
92 #define WS_VERSION \
93  "1.0.0-alpha.79"
94 
95 // Reserved Adafruit IO MQTT topics
96 #define TOPIC_IO_THROTTLE "/throttle"
97 #define TOPIC_IO_ERRORS "/errors"
98 
99 // Reserved Wippersnapper topics
100 #define TOPIC_WS "/wprsnpr/"
101 #define TOPIC_INFO "/info/"
102 #define TOPIC_SIGNALS "/signals/"
103 #define TOPIC_I2C "/i2c"
104 #define MQTT_TOPIC_PIXELS_DEVICE \
105  "/signals/device/pixel"
106 #define MQTT_TOPIC_PIXELS_BROKER \
107  "/signals/broker/pixel"
108 
110 typedef enum {
111  WS_IDLE = 0, // Waiting for connection establishement
112  WS_NET_DISCONNECTED = 1, // Network disconnected
113  WS_DISCONNECTED = 2, // Disconnected from Adafruit IO
114  WS_FINGERPRINT_UNKOWN = 3, // Unknown WS_SSL_FINGERPRINT
115 
116  WS_NET_CONNECT_FAILED = 10, // Failed to connect to network
117  WS_CONNECT_FAILED = 11, // Failed to connect to Adafruit IO
118  WS_FINGERPRINT_INVALID = 12, // Unknown WS_SSL_FINGERPRINT
119  WS_AUTH_FAILED = 13, // Invalid Adafruit IO login credentials provided.
120  WS_SSID_INVALID =
121  14, // SSID is "" or otherwise invalid, connection not attempted
122 
123  WS_NET_CONNECTED = 20, // Connected to Adafruit IO
124  WS_CONNECTED = 21, // Connected to network
125  WS_CONNECTED_INSECURE = 22, // Insecurely (non-SSL) connected to network
126  WS_FINGERPRINT_UNSUPPORTED = 23, // Unsupported WS_SSL_FINGERPRINT
127  WS_FINGERPRINT_VALID = 24, // Valid WS_SSL_FINGERPRINT
128  WS_BOARD_DESC_INVALID = 25, // Unable to send board description
129  WS_BOARD_RESYNC_FAILED = 26 // Board sync failure
130 } ws_status_t;
131 
133 typedef enum {
134  WS_MQTT_CONNECTED = 0, // Connected
135  WS_MQTT_INVALID_PROTOCOL = 1, // Invalid mqtt protocol
136  WS_MQTT_INVALID_CID = 2, // Client id rejected
137  WS_MQTT_SERVICE_UNAVALIABLE = 3, // Malformed user/pass
138  WS_MQTT_INVALID_USER_PASS = 4, // Unauthorized access to resource
139  WS_MQTT_UNAUTHORIZED = 5, // MQTT service unavailable
140  WS_MQTT_THROTTLED = 6, // Account throttled
141  WS_MQTT_BANNED = 7 // Account banned
143 
145 typedef enum {
146  WS_BOARD_DEF_IDLE,
147  WS_BOARD_DEF_SEND_FAILED,
148  WS_BOARD_DEF_SENT,
149  WS_BOARD_DEF_OK,
150  WS_BOARD_DEF_INVALID,
151  WS_BOARD_DEF_UNSPECIFIED
153 
155 typedef enum {
156  FSM_NET_IDLE,
157  FSM_NET_CONNECTED,
158  FSM_MQTT_CONNECTED,
159  FSM_NET_CHECK_MQTT,
160  FSM_NET_CHECK_NETWORK,
161  FSM_NET_ESTABLISH_NETWORK,
162  FSM_NET_ESTABLISH_MQTT,
163 } fsm_net_t;
164 
165 #define WS_WDT_TIMEOUT 60000
166 /* MQTT Configuration */
167 #define WS_KEEPALIVE_INTERVAL_MS \
168  5000
169 
170 #define WS_MQTT_MAX_PAYLOAD_SIZE \
171  512
172 
175 class Wippersnapper_FS;
176 class WipperSnapper_LittleFS;
177 #ifdef USE_DISPLAY
178 class ws_display_driver;
180 #endif
181 #ifdef ARDUINO_ARCH_ESP32
182 class ws_ledc;
183 #endif
185 class ws_servo;
186 class ws_pwm;
187 class ws_ds18x20;
188 class ws_pixels;
189 class ws_uart;
190 
191 /**************************************************************************/
196 /**************************************************************************/
197 class Wippersnapper {
198 public:
199  Wippersnapper();
200  virtual ~Wippersnapper();
201 
202  void provision();
203 
204  bool lockStatusNeoPixel;
205  bool lockStatusDotStar;
206  bool lockStatusLED;
211  virtual void set_user_key();
212  virtual void set_ssid_pass(const char *ssid, const char *ssidPassword);
213  virtual void set_ssid_pass();
214  virtual bool check_valid_ssid();
215 
216  virtual void _connect();
217  virtual void _disconnect();
218  void connect();
219  void disconnect();
220 
221  virtual void getMacAddr();
222  virtual void setupMQTTClient(const char *clientID);
223 
224  virtual ws_status_t networkStatus();
226 
227  bool generateDeviceUID();
228  bool generateWSTopics();
229  bool generateWSErrorTopics();
230 
231  // Registration API
232  bool registerBoard();
234  void decodeRegistrationResp(char *data, uint16_t len);
235  void pollRegistrationResp();
236  // Configuration API
238 
239  // run() loop
240  ws_status_t run();
241  void processPackets();
242  void publish(const char *topic, uint8_t *payload, uint16_t bLen,
243  uint8_t qos = 0);
244 
245  // Networking helpers
246  void pingBroker();
247  void runNetFSM();
248 
249  // WDT helpers
250  void enableWDT(int timeoutMS = 0);
251  void feedWDT();
252 
253  // Error handling helpers
254  void haltError(String error,
255  ws_led_status_t ledStatusColor = WS_LED_STATUS_ERROR_RUNTIME);
256  void errorWriteHang(String error);
257 
258  // MQTT topic callbacks //
259  // Decodes a signal message
260  bool decodeSignalMsg(
261  wippersnapper_signal_v1_CreateSignalRequest *encodedSignalMsg);
262 
263  // Encodes a pin event message
264  bool
265  encodePinEvent(wippersnapper_signal_v1_CreateSignalRequest *outgoingSignalMsg,
266  uint8_t pinName, int pinVal);
267 
268  // Pin configure message
269  bool configureDigitalPinReq(wippersnapper_pin_v1_ConfigurePinRequest *pinMsg);
270  bool configAnalogInPinReq(wippersnapper_pin_v1_ConfigurePinRequest *pinMsg);
271 
272  // I2C
273  std::vector<WipperSnapper_Component_I2C *>
274  i2cComponents;
276  NULL;
278  NULL;
279  bool _isI2CPort0Init =
280  false;
281  bool _isI2CPort1Init =
282  false;
283 
286  uint8_t
289  uint16_t bufSize;
292  WS_BOARD_DEF_IDLE;
293 
294  // TODO: We really should look at making these static definitions, not dynamic
295  // to free up space on the heap
298  Wippersnapper_FS *_fileSystem;
299  WipperSnapper_LittleFS
301 #ifdef USE_DISPLAY
302  ws_display_driver *_display = nullptr;
304  nullptr;
305 #endif
312  // TODO: does this really need to be global?
313  uint8_t _macAddr[6];
314  char sUID[13];
315  const char *_boardId;
316  Adafruit_MQTT *_mqtt;
318  secretsConfig _config;
320  // TODO: Does this need to be within this class?
323  char *_topic_description = NULL;
324  char *_topic_signal_device = NULL;
325  char *_topic_signal_i2c_brkr = NULL;
329  char *_topic_signal_servo_brkr = NULL;
331  char *_topic_signal_servo_device = NULL;
333  char *_topic_signal_pwm_brkr =
334  NULL;
336  NULL;
337  char *_topic_signal_ds18_brkr = NULL;
339  char *_topic_signal_ds18_device = NULL;
341  char *_topic_signal_pixels_brkr = NULL;
343  char *_topic_signal_uart_brkr = NULL;
346  wippersnapper_signal_v1_CreateSignalRequest
348  wippersnapper_signal_v1_I2CRequest msgSignalI2C =
349  wippersnapper_signal_v1_I2CRequest_init_zero;
352  // ds signal msg
353  wippersnapper_signal_v1_Ds18x20Request msgSignalDS =
354  wippersnapper_signal_v1_Ds18x20Request_init_zero;
355 
357  // servo message
358  wippersnapper_signal_v1_ServoRequest
359  msgServo;
360  wippersnapper_signal_v1_PWMRequest msgPWM =
361  wippersnapper_signal_v1_PWMRequest_init_zero;
364  // pixels signal message
365  wippersnapper_signal_v1_PixelsRequest
366  msgPixels;
367 
368  wippersnapper_signal_v1_UARTRequest
370 
371  char *throttleMessage;
375  bool pinCfgCompleted = false;
377 // enable LEDC if esp32
378 #ifdef ARDUINO_ARCH_ESP32
379  ws_ledc *_ledc = nullptr;
380 #endif
381 
382 private:
383  void _init();
384 
385 protected:
386  ws_status_t _status = WS_IDLE;
387  uint32_t _last_mqtt_connect = 0;
389  uint32_t _prv_ping = 0;
391  uint32_t _prvKATBlink = 0;
394  // Device information
395  const char *_deviceId;
396  char *_device_uid;
398  // MQTT topics
400  NULL;
406  NULL;
409  char *_topic_signal_brkr = NULL;
410  char *_err_topic = NULL;
411  char *_throttle_topic = NULL;
413  Adafruit_MQTT_Subscribe *_topic_description_sub;
415  Adafruit_MQTT_Publish *_topic_signal_device_pub;
417  Adafruit_MQTT_Subscribe *_topic_signal_brkr_sub;
419  Adafruit_MQTT_Subscribe
421  Adafruit_MQTT_Subscribe
423  Adafruit_MQTT_Subscribe
425  Adafruit_MQTT_Subscribe
427  Adafruit_MQTT_Subscribe
429  Adafruit_MQTT_Subscribe
432  Adafruit_MQTT_Subscribe
434  Adafruit_MQTT_Subscribe
435  *_throttle_sub;
437  wippersnapper_signal_v1_CreateSignalRequest
439 };
440 extern Wippersnapper WS;
442 #endif // ADAFRUIT_WIPPERSNAPPER_H
-
Class that provides an interface with the I2C bus.
Definition: WipperSnapper_I2C.h:77
+Go to the documentation of this file.
1 
18 #ifndef WIPPERSNAPPER_H
19 #define WIPPERSNAPPER_H
20 
21 // Cpp STD
22 #include <vector>
23 
24 // Nanopb dependencies
25 #include <nanopb/pb_common.h>
26 #include <nanopb/pb_decode.h>
27 #include <nanopb/pb_encode.h>
28 #include <pb.h>
29 
30 #include <wippersnapper/description/v1/description.pb.h> // description.proto
31 #include <wippersnapper/signal/v1/signal.pb.h> // signal.proto
32 
33 // External libraries
34 #include "Adafruit_MQTT.h" // MQTT Client
35 #include "Adafruit_SleepyDog.h" // Watchdog
36 #include "Arduino.h" // Wiring
37 #include <SPI.h> // SPI
38 
39 // Wippersnapper API Helpers
40 #include "Wippersnapper_Boards.h"
42 #include "provisioning/ConfigJson.h"
43 
44 #define WS_DEBUG
45 #define WS_PRINTER Serial
46 
47 // Define actual debug output functions when necessary.
48 #ifdef WS_DEBUG
49 #define WS_DEBUG_PRINT(...) \
50  { WS_PRINTER.print(__VA_ARGS__); }
51 #define WS_DEBUG_PRINTLN(...) \
52  { WS_PRINTER.println(__VA_ARGS__); }
53 #define WS_DEBUG_PRINTHEX(...) \
54  { WS_PRINTER.print(__VA_ARGS__, HEX); }
55 #else
56 #define WS_DEBUG_PRINT(...) \
57  {}
58 #define WS_DEBUG_PRINTLN(...) \
59  {}
60 #endif
61 
62 // Wippersnapper components
66 
67 // LEDC-Manager, ESP32-only
68 #ifdef ARDUINO_ARCH_ESP32
70 #endif
71 
72 // Display
73 #ifdef USE_DISPLAY
76 #endif
77 
80 #include "components/pwm/ws_pwm.h"
83 
84 #if defined(USE_TINYUSB)
85 #include "provisioning/tinyusb/Wippersnapper_FS.h"
86 #endif
87 
88 #if defined(USE_LITTLEFS)
89 #include "provisioning/littlefs/WipperSnapper_LittleFS.h"
90 #endif
91 
92 #define WS_VERSION \
93  "1.0.0-beta.83"
94 
95 // Reserved Adafruit IO MQTT topics
96 #define TOPIC_IO_THROTTLE "/throttle"
97 #define TOPIC_IO_ERRORS "/errors"
98 
99 // Reserved Wippersnapper topics
100 #define TOPIC_WS "/wprsnpr/"
101 #define TOPIC_INFO "/info/"
102 #define TOPIC_SIGNALS "/signals/"
103 #define TOPIC_I2C "/i2c"
104 #define MQTT_TOPIC_PIXELS_DEVICE \
105  "/signals/device/pixel"
106 #define MQTT_TOPIC_PIXELS_BROKER \
107  "/signals/broker/pixel"
108 
110 typedef enum {
111  WS_IDLE = 0, // Waiting for connection establishement
112  WS_NET_DISCONNECTED = 1, // Network disconnected
113  WS_DISCONNECTED = 2, // Disconnected from Adafruit IO
114  WS_FINGERPRINT_UNKOWN = 3, // Unknown WS_SSL_FINGERPRINT
115 
116  WS_NET_CONNECT_FAILED = 10, // Failed to connect to network
117  WS_CONNECT_FAILED = 11, // Failed to connect to Adafruit IO
118  WS_FINGERPRINT_INVALID = 12, // Unknown WS_SSL_FINGERPRINT
119  WS_AUTH_FAILED = 13, // Invalid Adafruit IO login credentials provided.
120  WS_SSID_INVALID =
121  14, // SSID is "" or otherwise invalid, connection not attempted
122 
123  WS_NET_CONNECTED = 20, // Connected to Adafruit IO
124  WS_CONNECTED = 21, // Connected to network
125  WS_CONNECTED_INSECURE = 22, // Insecurely (non-SSL) connected to network
126  WS_FINGERPRINT_UNSUPPORTED = 23, // Unsupported WS_SSL_FINGERPRINT
127  WS_FINGERPRINT_VALID = 24, // Valid WS_SSL_FINGERPRINT
128  WS_BOARD_DESC_INVALID = 25, // Unable to send board description
129  WS_BOARD_RESYNC_FAILED = 26 // Board sync failure
130 } ws_status_t;
131 
133 typedef enum {
134  WS_MQTT_CONNECTED = 0, // Connected
135  WS_MQTT_INVALID_PROTOCOL = 1, // Invalid mqtt protocol
136  WS_MQTT_INVALID_CID = 2, // Client id rejected
137  WS_MQTT_SERVICE_UNAVALIABLE = 3, // Malformed user/pass
138  WS_MQTT_INVALID_USER_PASS = 4, // Unauthorized access to resource
139  WS_MQTT_UNAUTHORIZED = 5, // MQTT service unavailable
140  WS_MQTT_THROTTLED = 6, // Account throttled
141  WS_MQTT_BANNED = 7 // Account banned
143 
145 typedef enum {
146  WS_BOARD_DEF_IDLE,
147  WS_BOARD_DEF_SEND_FAILED,
148  WS_BOARD_DEF_SENT,
149  WS_BOARD_DEF_OK,
150  WS_BOARD_DEF_INVALID,
151  WS_BOARD_DEF_UNSPECIFIED
153 
155 typedef enum {
156  FSM_NET_IDLE,
157  FSM_NET_CONNECTED,
158  FSM_MQTT_CONNECTED,
159  FSM_NET_CHECK_MQTT,
160  FSM_NET_CHECK_NETWORK,
161  FSM_NET_ESTABLISH_NETWORK,
162  FSM_NET_ESTABLISH_MQTT,
163 } fsm_net_t;
164 
165 #define WS_WDT_TIMEOUT 60000
166 /* MQTT Configuration */
167 #define WS_KEEPALIVE_INTERVAL_MS \
168  5000
169 
170 #define WS_MQTT_MAX_PAYLOAD_SIZE \
171  512
172 
175 class Wippersnapper_FS;
176 class WipperSnapper_LittleFS;
177 #ifdef USE_DISPLAY
178 class ws_display_driver;
180 #endif
181 #ifdef ARDUINO_ARCH_ESP32
182 class ws_ledc;
183 #endif
185 class ws_servo;
186 class ws_pwm;
187 class ws_ds18x20;
188 class ws_pixels;
189 class ws_uart;
190 
191 /**************************************************************************/
196 /**************************************************************************/
197 class Wippersnapper {
198 public:
199  Wippersnapper();
200  virtual ~Wippersnapper();
201 
202  void provision();
203 
204  bool lockStatusNeoPixel;
205  bool lockStatusDotStar;
206  bool lockStatusLED;
211  virtual void set_user_key();
212  virtual void set_ssid_pass(const char *ssid, const char *ssidPassword);
213  virtual void set_ssid_pass();
214  virtual bool check_valid_ssid();
215 
216  virtual void _connect();
217  virtual void _disconnect();
218  void connect();
219  void disconnect();
220 
221  virtual void getMacAddr();
222  virtual void setupMQTTClient(const char *clientID);
223 
224  virtual ws_status_t networkStatus();
226 
227  bool generateDeviceUID();
228  bool generateWSTopics();
229  bool generateWSErrorTopics();
230 
231  // Registration API
232  bool registerBoard();
234  void decodeRegistrationResp(char *data, uint16_t len);
235  void pollRegistrationResp();
236  // Configuration API
238 
239  // run() loop
240  ws_status_t run();
241  void processPackets();
242  void publish(const char *topic, uint8_t *payload, uint16_t bLen,
243  uint8_t qos = 0);
244 
245  // Networking helpers
246  void pingBroker();
247  void runNetFSM();
248 
249  // WDT helpers
250  void enableWDT(int timeoutMS = 0);
251  void feedWDT();
252 
253  // Error handling helpers
254  void haltError(String error,
255  ws_led_status_t ledStatusColor = WS_LED_STATUS_ERROR_RUNTIME);
256  void errorWriteHang(String error);
257 
258  // MQTT topic callbacks //
259  // Decodes a signal message
260  bool decodeSignalMsg(
261  wippersnapper_signal_v1_CreateSignalRequest *encodedSignalMsg);
262 
263  // Encodes a pin event message
264  bool
265  encodePinEvent(wippersnapper_signal_v1_CreateSignalRequest *outgoingSignalMsg,
266  uint8_t pinName, int pinVal);
267 
268  // Pin configure message
269  bool configureDigitalPinReq(wippersnapper_pin_v1_ConfigurePinRequest *pinMsg);
270  bool configAnalogInPinReq(wippersnapper_pin_v1_ConfigurePinRequest *pinMsg);
271 
272  // I2C
273  std::vector<WipperSnapper_Component_I2C *>
274  i2cComponents;
276  NULL;
278  NULL;
279  bool _isI2CPort0Init =
280  false;
281  bool _isI2CPort1Init =
282  false;
283 
286  uint8_t
289  uint16_t bufSize;
292  WS_BOARD_DEF_IDLE;
293 
294  // TODO: We really should look at making these static definitions, not dynamic
295  // to free up space on the heap
298  Wippersnapper_FS *_fileSystem;
299  WipperSnapper_LittleFS
301 #ifdef USE_DISPLAY
302  ws_display_driver *_display = nullptr;
304  nullptr;
305 #endif
312  // TODO: does this really need to be global?
313  uint8_t _macAddr[6];
314  char sUID[13];
315  const char *_boardId;
316  Adafruit_MQTT *_mqtt;
318  secretsConfig _config;
320  // TODO: Does this need to be within this class?
323  char *_topic_description = NULL;
324  char *_topic_signal_device = NULL;
325  char *_topic_signal_i2c_brkr = NULL;
329  char *_topic_signal_servo_brkr = NULL;
331  char *_topic_signal_servo_device = NULL;
333  char *_topic_signal_pwm_brkr =
334  NULL;
336  NULL;
337  char *_topic_signal_ds18_brkr = NULL;
339  char *_topic_signal_ds18_device = NULL;
341  char *_topic_signal_pixels_brkr = NULL;
343  char *_topic_signal_uart_brkr = NULL;
346  wippersnapper_signal_v1_CreateSignalRequest
348  wippersnapper_signal_v1_I2CRequest msgSignalI2C =
349  wippersnapper_signal_v1_I2CRequest_init_zero;
352  // ds signal msg
353  wippersnapper_signal_v1_Ds18x20Request msgSignalDS =
354  wippersnapper_signal_v1_Ds18x20Request_init_zero;
355 
357  // servo message
358  wippersnapper_signal_v1_ServoRequest
359  msgServo;
360  wippersnapper_signal_v1_PWMRequest msgPWM =
361  wippersnapper_signal_v1_PWMRequest_init_zero;
364  // pixels signal message
365  wippersnapper_signal_v1_PixelsRequest
366  msgPixels;
367 
368  wippersnapper_signal_v1_UARTRequest
370 
371  char *throttleMessage;
375  bool pinCfgCompleted = false;
377 // enable LEDC if esp32
378 #ifdef ARDUINO_ARCH_ESP32
379  ws_ledc *_ledc = nullptr;
380 #endif
381 
382 private:
383  void _init();
384 
385 protected:
386  ws_status_t _status = WS_IDLE;
387  uint32_t _last_mqtt_connect = 0;
389  uint32_t _prv_ping = 0;
391  uint32_t _prvKATBlink = 0;
394  // Device information
395  const char *_deviceId;
396  char *_device_uid;
398  // MQTT topics
400  NULL;
406  NULL;
409  char *_topic_signal_brkr = NULL;
410  char *_err_topic = NULL;
411  char *_throttle_topic = NULL;
413  Adafruit_MQTT_Subscribe *_topic_description_sub;
415  Adafruit_MQTT_Publish *_topic_signal_device_pub;
417  Adafruit_MQTT_Subscribe *_topic_signal_brkr_sub;
419  Adafruit_MQTT_Subscribe
421  Adafruit_MQTT_Subscribe
423  Adafruit_MQTT_Subscribe
425  Adafruit_MQTT_Subscribe
427  Adafruit_MQTT_Subscribe
429  Adafruit_MQTT_Subscribe
432  Adafruit_MQTT_Subscribe
434  Adafruit_MQTT_Subscribe
435  *_throttle_sub;
437  wippersnapper_signal_v1_CreateSignalRequest
439 };
440 extern Wippersnapper WS;
442 #endif // ADAFRUIT_WIPPERSNAPPER_H
+
Class that provides an interface with the I2C bus.
Definition: WipperSnapper_I2C.h:81
char * _topic_signal_pixels_brkr
Definition: Wippersnapper.h:344
wippersnapper_signal_v1_PWMRequest msgPWM
Definition: Wippersnapper.h:363
void disconnect()
Disconnects from Adafruit IO+ Wippersnapper.
Definition: Wippersnapper.cpp:153
@@ -81,27 +81,27 @@
High-level interface for the ESP32/ESP32-Sx/ESP32-Cx LED Control (LEDC) peripheral. Instead of specifying a timer or channel, this class automatically allocates a channel and associates it with a pin. Underlying esp32-hal-ledc performs timer management and handles the low-level LEDC peripheral API calls.
Definition: ws_ledc.h:37
bool _isI2CPort1Init
True if I2C port 1 has been initialized, False otherwise.
Definition: Wippersnapper.h:284
ws_ledc * _ledc
Pointer to LEDC object.
Definition: Wippersnapper.h:382
-
bool generateWSErrorTopics()
Builds MQTT topics for handling errors returned from the Adafruit IO broker and subscribes to them...
Definition: Wippersnapper.cpp:1746
+
bool generateWSErrorTopics()
Builds MQTT topics for handling errors returned from the Adafruit IO broker and subscribes to them...
Definition: Wippersnapper.cpp:1744
ws_pixels * _ws_pixelsComponent
ptr to instance of ws_pixels class
Definition: Wippersnapper.h:309
Class that provides functions for reading and interacting with digital inputs and outputs...
Definition: Wippersnapper_DigitalGPIO.h:38
-
void publish(const char *topic, uint8_t *payload, uint16_t bLen, uint8_t qos=0)
Publishes a message to the Adafruit IO MQTT broker. Handles network connectivity. ...
Definition: Wippersnapper.cpp:2602
+
void publish(const char *topic, uint8_t *payload, uint16_t bLen, uint8_t qos=0)
Publishes a message to the Adafruit IO MQTT broker. Handles network connectivity. ...
Definition: Wippersnapper.cpp:2599
char * _topic_signal_pwm_brkr
Definition: Wippersnapper.h:336
-
void processPackets()
Process all incoming packets from the Adafruit IO MQTT broker. Handles network connectivity.
Definition: Wippersnapper.cpp:2580
+
void processPackets()
Process all incoming packets from the Adafruit IO MQTT broker. Handles network connectivity.
Definition: Wippersnapper.cpp:2577
const char * _deviceId
Definition: Wippersnapper.h:398
char * _device_uid
Definition: Wippersnapper.h:399
virtual ~Wippersnapper()
Wippersnapper destructor.
Definition: Wippersnapper.cpp:79
ws_led_status_t
Definition: Wippersnapper_StatusLED.h:34
#define WS_MQTT_MAX_PAYLOAD_SIZE
MAXIMUM expected payload size, in bytes.
Definition: Wippersnapper.h:173
-
void connect()
Connects to Adafruit IO+ Wippersnapper broker.
Definition: Wippersnapper.cpp:2708
+
void connect()
Connects to Adafruit IO+ Wippersnapper broker.
Definition: Wippersnapper.cpp:2705
bool encodePinEvent(wippersnapper_signal_v1_CreateSignalRequest *outgoingSignalMsg, uint8_t pinName, int pinVal)
Handles MQTT messages on signal topic until timeout.
Definition: Wippersnapper.cpp:1614
char * _topic_description_status
Definition: Wippersnapper.h:402
-
bool generateWSTopics()
Generates device-specific Wippersnapper control topics and subscribes to them.
Definition: Wippersnapper.cpp:1845
+
bool generateWSTopics()
Generates device-specific Wippersnapper control topics and subscribes to them.
Definition: Wippersnapper.cpp:1843
Class that provides an interface for reading and controlling analog pins. Stores information about an...
Definition: Wippersnapper_AnalogIO.h:43
WipperSnapper_LittleFS * _littleFS
Instance of LittleFS Filesystem (non-native USB)
Definition: Wippersnapper.h:303
float status_pixel_brightness
Definition: Wippersnapper.h:210
uint8_t _buffer_outgoing[WS_MQTT_MAX_PAYLOAD_SIZE]
Definition: Wippersnapper.h:290
-
void errorWriteHang(String error)
Writes an error message to the serial and the filesystem, blinks WS_LED_STATUS_ERROR_RUNTIME pattern ...
Definition: Wippersnapper.cpp:2304
+
void errorWriteHang(String error)
Writes an error message to the serial and the filesystem, blinks WS_LED_STATUS_ERROR_RUNTIME pattern ...
Definition: Wippersnapper.cpp:2302
Adafruit_MQTT_Subscribe * _topic_signal_ds18_sub
Definition: Wippersnapper.h:429
bool decodeSignalMsg(wippersnapper_signal_v1_CreateSignalRequest *encodedSignalMsg)
Decodes a signal buffer protobuf message. NOTE: Should be executed in-order after a new _buffer is re...
Definition: Wippersnapper.cpp:488
void provision()
Provisions a WipperSnapper device with its network configuration and Adafruit IO credentials.
Definition: Wippersnapper.cpp:94
@@ -124,7 +124,7 @@
Interface for WipperSnapper servo control.
Definition: ws_servo.h:61
bool configureDigitalPinReq(wippersnapper_pin_v1_ConfigurePinRequest *pinMsg)
Configures a pin according to a wippersnapper_pin_v1_ConfigurePinRequest message. ...
Definition: Wippersnapper.cpp:315
friend class
Definition: ws_pixels.h:49
-
ws_status_t run()
Processes incoming commands and handles network connection.
Definition: Wippersnapper.cpp:2819
+
ws_status_t run()
Processes incoming commands and handles network connection.
Definition: Wippersnapper.cpp:2816
virtual void _connect()
Connects to wireless network.
Definition: Wippersnapper.cpp:162
wippersnapper_signal_v1_CreateSignalRequest _outgoingSignalMsg
Definition: Wippersnapper.h:441
char * _topic_signal_pwm_device
Definition: Wippersnapper.h:338
@@ -133,13 +133,13 @@
uint32_t _prv_ping
Definition: Wippersnapper.h:392
virtual void getMacAddr()
Sets the network interface&#39;s unique identifer, typically the MAC address.
Definition: Wippersnapper.cpp:181
-
bool generateDeviceUID()
Attempts to generate unique device identifier.
Definition: Wippersnapper.cpp:1804
+
bool generateDeviceUID()
Attempts to generate unique device identifier.
Definition: Wippersnapper.cpp:1802
Adafruit_MQTT_Subscribe * _topic_description_sub
Definition: Wippersnapper.h:416
char sUID[13]
Definition: Wippersnapper.h:317
Wippersnapper WS
Global member variable for callbacks.
Definition: Wippersnapper.cpp:36
virtual void set_ssid_pass()
Sets the device&#39;s wireless network credentials from the secrets.json configuration file...
Definition: Wippersnapper.cpp:227
char * _err_topic
Definition: Wippersnapper.h:413
-
void feedWDT()
Feeds the WDT to prevent hardware reset.
Definition: Wippersnapper.cpp:2550
+
void feedWDT()
Feeds the WDT to prevent hardware reset.
Definition: Wippersnapper.cpp:2551
uint32_t _prvKATBlink
Definition: Wippersnapper.h:394
char * _topic_signal_servo_device
Definition: Wippersnapper.h:334
Display driver for LVGL and LVGL_Glue in WipperSnapper.
Definition: ws_display_driver.h:33
@@ -149,19 +149,19 @@
ws_board_status_t _boardStatus
Hardware&#39;s registration status.
Definition: Wippersnapper.h:294
wippersnapper_signal_v1_UARTRequest msgSignalUART
UARTReq wrapper message.
Definition: Wippersnapper.h:372
-
void runNetFSM()
Checks network and MQTT connectivity. Handles network re-connection and mqtt re-establishment.
Definition: Wippersnapper.cpp:2328
+
void runNetFSM()
Checks network and MQTT connectivity. Handles network re-connection and mqtt re-establishment.
Definition: Wippersnapper.cpp:2326
bool pinCfgCompleted
Definition: Wippersnapper.h:378
char * _topic_signal_uart_device
Definition: Wippersnapper.h:347
-
void pingBroker()
Pings the MQTT broker within the keepalive interval to keep the connection alive. Blinks the keepaliv...
Definition: Wippersnapper.cpp:2525
+
void pingBroker()
Pings the MQTT broker within the keepalive interval to keep the connection alive. Blinks the keepaliv...
Definition: Wippersnapper.cpp:2526
wippersnapper_signal_v1_Ds18x20Request msgSignalDS
Definition: Wippersnapper.h:356
ws_display_driver * _display
Instance of display driver class.
Definition: Wippersnapper.h:305
wippersnapper_signal_v1_PixelsRequest msgPixels
PixelsRequest wrapper message.
Definition: Wippersnapper.h:369
-
void enableWDT(int timeoutMS=0)
Enables the watchdog timer.
Definition: Wippersnapper.cpp:2560
+
void enableWDT(int timeoutMS=0)
Enables the watchdog timer.
Definition: Wippersnapper.cpp:2561
Adafruit_MQTT_Subscribe * _topic_signal_pwm_sub
Definition: Wippersnapper.h:427
Class that provides an interface with DS18X20-compatible sensors.
Definition: ws_ds18x20.h:48
char * _topic_signal_ds18_brkr
Definition: Wippersnapper.h:340
-
void publishPinConfigComplete()
Publishes an ACK to the broker that the device has completed its hardware configuration.
Definition: Wippersnapper.cpp:2785
+
void publishPinConfigComplete()
Publishes an ACK to the broker that the device has completed its hardware configuration.
Definition: Wippersnapper.cpp:2782
std::vector< WipperSnapper_Component_I2C * > i2cComponents
Vector containing all I2C components.
Definition: Wippersnapper.h:277
Helps build and manage the LVGL objects and screens for the application code.
Definition: ws_display_ui_helper.h:63
uint16_t bufSize
Definition: Wippersnapper.h:292
@@ -186,7 +186,7 @@
Wippersnapper_AnalogIO * _analogIO
Instance of analog io class.
Definition: Wippersnapper.h:300
char * _topic_description_status_complete
Definition: Wippersnapper.h:405
void pollRegistrationResp()
Polls the broker for the hardware registration response message.
Definition: Wippersnapper_Register.cpp:78
-
ws_board_status_t getBoardStatus()
Returns the board definition status.
Definition: Wippersnapper.cpp:2516
+
ws_board_status_t getBoardStatus()
Returns the board definition status.
Definition: Wippersnapper.cpp:2517
bool configAnalogInPinReq(wippersnapper_pin_v1_ConfigurePinRequest *pinMsg)
Configures an analog input pin according to a wippersnapper_pin_v1_ConfigurePinRequest message...
Definition: Wippersnapper.cpp:264
bool lockStatusDotStar
True if status LED is using the status dotstar.
Definition: Wippersnapper.h:208
wippersnapper_signal_v1_ServoRequest msgServo
ServoRequest wrapper message.
Definition: Wippersnapper.h:362
@@ -195,10 +195,10 @@
bool lockStatusNeoPixel
True if status LED is using the status neopixel.
Definition: Wippersnapper.h:207
Adafruit_MQTT_Subscribe * _topic_signal_servo_sub
Definition: Wippersnapper.h:425
WipperSnapper_Component_I2C * _i2cPort0
WipperSnapper I2C Component for I2C port #0.
Definition: Wippersnapper.h:278
-
bool registerBoard()
Attempts to register hardware with Adafruit.io WipperSnapper.
Definition: Wippersnapper.cpp:2492
+
bool registerBoard()
Attempts to register hardware with Adafruit.io WipperSnapper.
Definition: Wippersnapper.cpp:2493
int throttleTime
Definition: Wippersnapper.h:375
Adafruit_MQTT_Subscribe * _err_sub
Definition: Wippersnapper.h:436
-
void haltError(String error, ws_led_status_t ledStatusColor=WS_LED_STATUS_ERROR_RUNTIME)
Prints an error to the serial and halts the hardware until the WDT bites.
Definition: Wippersnapper.cpp:2470
+
void haltError(String error, ws_led_status_t ledStatusColor=WS_LED_STATUS_ERROR_RUNTIME)
Prints an error to the serial and halts the hardware until the WDT bites.
Definition: Wippersnapper.cpp:2471
char * _topic_signal_ds18_device
Definition: Wippersnapper.h:342
bool _isI2CPort0Init
True if I2C port 0 has been initialized, False otherwise.
Definition: Wippersnapper.h:282
diff --git a/html/_wippersnapper___e_s_p32_8h.html b/html/_wippersnapper___e_s_p32_8h.html index e403babca..40fe944bf 100644 --- a/html/_wippersnapper___e_s_p32_8h.html +++ b/html/_wippersnapper___e_s_p32_8h.html @@ -73,6 +73,7 @@ #include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
#include "Arduino.h"
+#include "WiFi.h"
#include <WiFiClientSecure.h>

Go to the source code of this file.

diff --git a/html/_wippersnapper___e_s_p32_8h_source.html b/html/_wippersnapper___e_s_p32_8h_source.html index d4aeafebe..92c186a8e 100644 --- a/html/_wippersnapper___e_s_p32_8h_source.html +++ b/html/_wippersnapper___e_s_p32_8h_source.html @@ -66,33 +66,33 @@
Wippersnapper_ESP32.h
-Go to the documentation of this file.
1 
17 #ifndef Wippersnapper_ESP32_H
18 #define Wippersnapper_ESP32_H
19 
20 #ifdef ARDUINO_ARCH_ESP32
21 #include "Wippersnapper.h"
22 
23 #include "Adafruit_MQTT.h"
24 #include "Adafruit_MQTT_Client.h"
25 #include "Arduino.h"
26 #include <WiFiClientSecure.h>
27 extern Wippersnapper WS;
28 
29 /****************************************************************************/
33 /****************************************************************************/
35 
36 public:
37  /**************************************************************************/
41  /**************************************************************************/
43  _ssid = 0;
44  _pass = 0;
45  _mqtt_client = new WiFiClientSecure;
46  }
47 
48  /**************************************************************************/
52  /**************************************************************************/
54  if (_mqtt_client)
55  delete _mqtt_client;
56  }
57 
58  /********************************************************/
66  /********************************************************/
67  void set_ssid_pass(const char *ssid, const char *ssidPassword) {
68  _ssid = ssid;
69 
70  // set the AP password
71  // check if ssidPassword was "" in secrets.json
72  if ((ssidPassword != NULL) && (strlen(ssidPassword) == 0)) {
73  _pass = NULL; // Set as NULL for open networks
74  } else {
75  _pass = ssidPassword;
76  }
77  }
78 
79  /**********************************************************/
83  /**********************************************************/
84  void set_ssid_pass() {
85  _ssid = WS._config.network.ssid;
86  _pass = WS._config.network.pass;
87  }
88 
89  /***********************************************************/
94  /***********************************************************/
96  // Set WiFi to station mode and disconnect from an AP if it was previously
97  // connected
98  WiFi.mode(WIFI_STA);
99  WiFi.disconnect();
100  delay(100);
101 
102  // Perform a network scan
103  int n = WiFi.scanNetworks();
104  if (n == 0) {
105  WS_DEBUG_PRINTLN("ERROR: No WiFi networks found!");
106  return false;
107  }
108 
109  // Was the network within secrets.json found?
110  for (int i = 0; i < n; ++i) {
111  if (strcmp(_ssid, WiFi.SSID(i).c_str()) == 0)
112  return true;
113  }
114 
115  // User-set network not found, print scan results to serial console
116  WS_DEBUG_PRINTLN("ERROR: Your requested WiFi network was not found!");
117  WS_DEBUG_PRINTLN("WipperSnapper found these WiFi networks: ");
118  for (int i = 0; i < n; ++i) {
119  WS_DEBUG_PRINT(WiFi.SSID(i));
120  WS_DEBUG_PRINT(" ");
121  WS_DEBUG_PRINT(WiFi.RSSI(i));
122  WS_DEBUG_PRINTLN("dB");
123  }
124 
125  return false;
126  }
127 
128  /********************************************************/
133  /********************************************************/
134  void getMacAddr() {
135  uint8_t mac[6] = {0};
136  WiFi.macAddress(mac);
137  memcpy(WS._macAddr, mac, sizeof(mac));
138  }
139 
140  /********************************************************/
146  /********************************************************/
147  void setupMQTTClient(const char *clientID) {
148  if (strcmp(WS._config.aio_url, "io.adafruit.com") == 0) {
149  _mqtt_client->setCACert(_aio_root_ca_prod);
150  } else {
152  }
153 
154  // Construct MQTT client
155  WS._mqtt = new Adafruit_MQTT_Client(_mqtt_client, WS._config.aio_url, 8883,
156  clientID, WS._config.aio_user,
157  WS._config.aio_key);
158  }
159 
160  /********************************************************/
165  /********************************************************/
167  switch (WiFi.status()) {
168  case WL_CONNECTED:
169  return WS_NET_CONNECTED;
170  case WL_CONNECT_FAILED:
171  return WS_NET_CONNECT_FAILED;
172  case WL_IDLE_STATUS:
173  return WS_IDLE;
174  default:
175  return WS_NET_DISCONNECTED;
176  }
177  }
178 
179  /*******************************************************************/
184  /*******************************************************************/
185  const char *connectionType() { return "ESP32"; }
186 
187 protected:
188  const char *_ssid;
189  const char *_pass;
190  WiFiClientSecure *_mqtt_client;
191 
192  const char *_aio_root_ca_staging =
193  "-----BEGIN CERTIFICATE-----\n"
194  "MIIEZTCCA02gAwIBAgIQQAF1BIMUpMghjISpDBbN3zANBgkqhkiG9w0BAQsFADA/\n"
195  "MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\n"
196  "DkRTVCBSb290IENBIFgzMB4XDTIwMTAwNzE5MjE0MFoXDTIxMDkyOTE5MjE0MFow\n"
197  "MjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxCzAJBgNVBAMT\n"
198  "AlIzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuwIVKMz2oJTTDxLs\n"
199  "jVWSw/iC8ZmmekKIp10mqrUrucVMsa+Oa/l1yKPXD0eUFFU1V4yeqKI5GfWCPEKp\n"
200  "Tm71O8Mu243AsFzzWTjn7c9p8FoLG77AlCQlh/o3cbMT5xys4Zvv2+Q7RVJFlqnB\n"
201  "U840yFLuta7tj95gcOKlVKu2bQ6XpUA0ayvTvGbrZjR8+muLj1cpmfgwF126cm/7\n"
202  "gcWt0oZYPRfH5wm78Sv3htzB2nFd1EbjzK0lwYi8YGd1ZrPxGPeiXOZT/zqItkel\n"
203  "/xMY6pgJdz+dU/nPAeX1pnAXFK9jpP+Zs5Od3FOnBv5IhR2haa4ldbsTzFID9e1R\n"
204  "oYvbFQIDAQABo4IBaDCCAWQwEgYDVR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8E\n"
205  "BAMCAYYwSwYIKwYBBQUHAQEEPzA9MDsGCCsGAQUFBzAChi9odHRwOi8vYXBwcy5p\n"
206  "ZGVudHJ1c3QuY29tL3Jvb3RzL2RzdHJvb3RjYXgzLnA3YzAfBgNVHSMEGDAWgBTE\n"
207  "p7Gkeyxx+tvhS5B1/8QVYIWJEDBUBgNVHSAETTBLMAgGBmeBDAECATA/BgsrBgEE\n"
208  "AYLfEwEBATAwMC4GCCsGAQUFBwIBFiJodHRwOi8vY3BzLnJvb3QteDEubGV0c2Vu\n"
209  "Y3J5cHQub3JnMDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuaWRlbnRydXN0\n"
210  "LmNvbS9EU1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFBQusxe3WFbLrlAJQOYf\n"
211  "r52LFMLGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0B\n"
212  "AQsFAAOCAQEA2UzgyfWEiDcx27sT4rP8i2tiEmxYt0l+PAK3qB8oYevO4C5z70kH\n"
213  "ejWEHx2taPDY/laBL21/WKZuNTYQHHPD5b1tXgHXbnL7KqC401dk5VvCadTQsvd8\n"
214  "S8MXjohyc9z9/G2948kLjmE6Flh9dDYrVYA9x2O+hEPGOaEOa1eePynBgPayvUfL\n"
215  "qjBstzLhWVQLGAkXXmNs+5ZnPBxzDJOLxhF2JIbeQAcH5H0tZrUlo5ZYyOqA7s9p\n"
216  "O5b85o3AM/OJ+CktFBQtfvBhcJVd9wvlwPsk+uyOy2HI7mNxKKgsBTt375teA2Tw\n"
217  "UdHkhVNcsAKX1H7GNNLOEADksd86wuoXvg==\n"
218  "-----END CERTIFICATE-----\n";
219 
220  const char *_aio_root_ca_prod =
221  "-----BEGIN CERTIFICATE-----\n"
222  "MIIEjTCCA3WgAwIBAgIQDQd4KhM/xvmlcpbhMf/ReTANBgkqhkiG9w0BAQsFADBh\n"
223  "MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n"
224  "d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH\n"
225  "MjAeFw0xNzExMDIxMjIzMzdaFw0yNzExMDIxMjIzMzdaMGAxCzAJBgNVBAYTAlVT\n"
226  "MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\n"
227  "b20xHzAdBgNVBAMTFkdlb1RydXN0IFRMUyBSU0EgQ0EgRzEwggEiMA0GCSqGSIb3\n"
228  "DQEBAQUAA4IBDwAwggEKAoIBAQC+F+jsvikKy/65LWEx/TMkCDIuWegh1Ngwvm4Q\n"
229  "yISgP7oU5d79eoySG3vOhC3w/3jEMuipoH1fBtp7m0tTpsYbAhch4XA7rfuD6whU\n"
230  "gajeErLVxoiWMPkC/DnUvbgi74BJmdBiuGHQSd7LwsuXpTEGG9fYXcbTVN5SATYq\n"
231  "DfbexbYxTMwVJWoVb6lrBEgM3gBBqiiAiy800xu1Nq07JdCIQkBsNpFtZbIZhsDS\n"
232  "fzlGWP4wEmBQ3O67c+ZXkFr2DcrXBEtHam80Gp2SNhou2U5U7UesDL/xgLK6/0d7\n"
233  "6TnEVMSUVJkZ8VeZr+IUIlvoLrtjLbqugb0T3OYXW+CQU0kBAgMBAAGjggFAMIIB\n"
234  "PDAdBgNVHQ4EFgQUlE/UXYvkpOKmgP792PkA76O+AlcwHwYDVR0jBBgwFoAUTiJU\n"
235  "IBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsG\n"
236  "AQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMDQGCCsGAQUFBwEB\n"
237  "BCgwJjAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEIGA1Ud\n"
238  "HwQ7MDkwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEds\n"
239  "b2JhbFJvb3RHMi5jcmwwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEW\n"
240  "HGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwDQYJKoZIhvcNAQELBQADggEB\n"
241  "AIIcBDqC6cWpyGUSXAjjAcYwsK4iiGF7KweG97i1RJz1kwZhRoo6orU1JtBYnjzB\n"
242  "c4+/sXmnHJk3mlPyL1xuIAt9sMeC7+vreRIF5wFBC0MCN5sbHwhNN1JzKbifNeP5\n"
243  "ozpZdQFmkCo+neBiKR6HqIA+LMTMCMMuv2khGGuPHmtDze4GmEGZtYLyF8EQpa5Y\n"
244  "jPuV6k2Cr/N3XxFpT3hRpt/3usU/Zb9wfKPtWpoznZ4/44c1p9rzFcZYrWkj3A+7\n"
245  "TNBJE0GmP2fhXhP1D/XVfIW/h0yCJGEiV9Glm/uGOa3DXHlmbAcxSyCRraG+ZBkA\n"
246  "7h4SeM6Y8l/7MBRpPCz6l8Y=\n"
247  "-----END CERTIFICATE-----\n";
248 
249  /**************************************************************************/
253  /**************************************************************************/
254  void _connect() {
255 
256  if (WiFi.status() == WL_CONNECTED)
257  return;
258 
259  if (strlen(_ssid) == 0) {
260  _status = WS_SSID_INVALID;
261  } else {
262  _disconnect();
263  delay(100);
264  WiFi.begin(_ssid, _pass);
265  _status = WS_NET_DISCONNECTED;
266  delay(5000);
267  }
268  }
269 
270  /**************************************************************************/
274  /**************************************************************************/
275  void _disconnect() {
276  WiFi.disconnect();
277  delay(500);
278  }
279 };
280 
281 #endif // ARDUINO_ARCH_ESP32_H
282 #endif // Wippersnapper_ESP32_H
void set_ssid_pass()
Sets the WiFi client&#39;s ssid and password.
Definition: Wippersnapper_ESP32.h:84
+Go to the documentation of this file.
1 
17 #ifndef Wippersnapper_ESP32_H
18 #define Wippersnapper_ESP32_H
19 
20 #ifdef ARDUINO_ARCH_ESP32
21 #include "Wippersnapper.h"
22 
23 #include "Adafruit_MQTT.h"
24 #include "Adafruit_MQTT_Client.h"
25 #include "Arduino.h"
26 #include "WiFi.h"
27 #include <WiFiClientSecure.h>
28 extern Wippersnapper WS;
29 
30 /****************************************************************************/
34 /****************************************************************************/
36 
37 public:
38  /**************************************************************************/
42  /**************************************************************************/
44  _ssid = 0;
45  _pass = 0;
46  _mqtt_client = new WiFiClientSecure;
47  }
48 
49  /**************************************************************************/
53  /**************************************************************************/
55  if (_mqtt_client)
56  delete _mqtt_client;
57  }
58 
59  /********************************************************/
67  /********************************************************/
68  void set_ssid_pass(const char *ssid, const char *ssidPassword) {
69  _ssid = ssid;
70 
71  // set the AP password
72  // check if ssidPassword was "" in secrets.json
73  if ((ssidPassword != NULL) && (strlen(ssidPassword) == 0)) {
74  _pass = NULL; // Set as NULL for open networks
75  } else {
76  _pass = ssidPassword;
77  }
78  }
79 
80  /**********************************************************/
84  /**********************************************************/
85  void set_ssid_pass() {
86  _ssid = WS._config.network.ssid;
87  _pass = WS._config.network.pass;
88  }
89 
90  /***********************************************************/
95  /***********************************************************/
97  // Set WiFi to station mode and disconnect from an AP if it was previously
98  // connected
99  WiFi.mode(WIFI_STA);
100  WiFi.disconnect();
101  delay(100);
102 
103  // Perform a network scan
104  int n = WiFi.scanNetworks();
105  if (n == 0) {
106  WS_DEBUG_PRINTLN("ERROR: No WiFi networks found!");
107  return false;
108  }
109 
110  // Was the network within secrets.json found?
111  for (int i = 0; i < n; ++i) {
112  if (strcmp(_ssid, WiFi.SSID(i).c_str()) == 0)
113  return true;
114  }
115 
116  // User-set network not found, print scan results to serial console
117  WS_DEBUG_PRINTLN("ERROR: Your requested WiFi network was not found!");
118  WS_DEBUG_PRINTLN("WipperSnapper found these WiFi networks: ");
119  for (int i = 0; i < n; ++i) {
120  WS_DEBUG_PRINT(WiFi.SSID(i));
121  WS_DEBUG_PRINT(" ");
122  WS_DEBUG_PRINT(WiFi.RSSI(i));
123  WS_DEBUG_PRINTLN("dB");
124  }
125 
126  return false;
127  }
128 
129  /********************************************************/
134  /********************************************************/
135  void getMacAddr() {
136  uint8_t mac[6] = {0};
137  Network.macAddress(mac);
138  memcpy(WS._macAddr, mac, sizeof(mac));
139  }
140 
141  /********************************************************/
147  /********************************************************/
148  void setupMQTTClient(const char *clientID) {
149  if (strcmp(WS._config.aio_url, "io.adafruit.com") == 0) {
150  _mqtt_client->setCACert(_aio_root_ca_prod);
151  } else if (strcmp(WS._config.aio_url, "io.adafruit.us") == 0) {
153  } else {
154  _mqtt_client->setInsecure();
155  }
156 
157  // Construct MQTT client
158  WS._mqtt = new Adafruit_MQTT_Client(
159  _mqtt_client, WS._config.aio_url, WS._config.io_port, clientID,
160  WS._config.aio_user, WS._config.aio_key);
161  }
162 
163  /********************************************************/
168  /********************************************************/
170  switch (WiFi.status()) {
171  case WL_CONNECTED:
172  return WS_NET_CONNECTED;
173  case WL_CONNECT_FAILED:
174  return WS_NET_CONNECT_FAILED;
175  case WL_IDLE_STATUS:
176  return WS_IDLE;
177  default:
178  return WS_NET_DISCONNECTED;
179  }
180  }
181 
182  /*******************************************************************/
187  /*******************************************************************/
188  const char *connectionType() { return "ESP32"; }
189 
190 protected:
191  const char *_ssid;
192  const char *_pass;
193  WiFiClientSecure *_mqtt_client;
194 
195  const char *_aio_root_ca_staging =
196  "-----BEGIN CERTIFICATE-----\n"
197  "MIIEZTCCA02gAwIBAgIQQAF1BIMUpMghjISpDBbN3zANBgkqhkiG9w0BAQsFADA/\n"
198  "MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT\n"
199  "DkRTVCBSb290IENBIFgzMB4XDTIwMTAwNzE5MjE0MFoXDTIxMDkyOTE5MjE0MFow\n"
200  "MjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUxldCdzIEVuY3J5cHQxCzAJBgNVBAMT\n"
201  "AlIzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuwIVKMz2oJTTDxLs\n"
202  "jVWSw/iC8ZmmekKIp10mqrUrucVMsa+Oa/l1yKPXD0eUFFU1V4yeqKI5GfWCPEKp\n"
203  "Tm71O8Mu243AsFzzWTjn7c9p8FoLG77AlCQlh/o3cbMT5xys4Zvv2+Q7RVJFlqnB\n"
204  "U840yFLuta7tj95gcOKlVKu2bQ6XpUA0ayvTvGbrZjR8+muLj1cpmfgwF126cm/7\n"
205  "gcWt0oZYPRfH5wm78Sv3htzB2nFd1EbjzK0lwYi8YGd1ZrPxGPeiXOZT/zqItkel\n"
206  "/xMY6pgJdz+dU/nPAeX1pnAXFK9jpP+Zs5Od3FOnBv5IhR2haa4ldbsTzFID9e1R\n"
207  "oYvbFQIDAQABo4IBaDCCAWQwEgYDVR0TAQH/BAgwBgEB/wIBADAOBgNVHQ8BAf8E\n"
208  "BAMCAYYwSwYIKwYBBQUHAQEEPzA9MDsGCCsGAQUFBzAChi9odHRwOi8vYXBwcy5p\n"
209  "ZGVudHJ1c3QuY29tL3Jvb3RzL2RzdHJvb3RjYXgzLnA3YzAfBgNVHSMEGDAWgBTE\n"
210  "p7Gkeyxx+tvhS5B1/8QVYIWJEDBUBgNVHSAETTBLMAgGBmeBDAECATA/BgsrBgEE\n"
211  "AYLfEwEBATAwMC4GCCsGAQUFBwIBFiJodHRwOi8vY3BzLnJvb3QteDEubGV0c2Vu\n"
212  "Y3J5cHQub3JnMDwGA1UdHwQ1MDMwMaAvoC2GK2h0dHA6Ly9jcmwuaWRlbnRydXN0\n"
213  "LmNvbS9EU1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFBQusxe3WFbLrlAJQOYf\n"
214  "r52LFMLGMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjANBgkqhkiG9w0B\n"
215  "AQsFAAOCAQEA2UzgyfWEiDcx27sT4rP8i2tiEmxYt0l+PAK3qB8oYevO4C5z70kH\n"
216  "ejWEHx2taPDY/laBL21/WKZuNTYQHHPD5b1tXgHXbnL7KqC401dk5VvCadTQsvd8\n"
217  "S8MXjohyc9z9/G2948kLjmE6Flh9dDYrVYA9x2O+hEPGOaEOa1eePynBgPayvUfL\n"
218  "qjBstzLhWVQLGAkXXmNs+5ZnPBxzDJOLxhF2JIbeQAcH5H0tZrUlo5ZYyOqA7s9p\n"
219  "O5b85o3AM/OJ+CktFBQtfvBhcJVd9wvlwPsk+uyOy2HI7mNxKKgsBTt375teA2Tw\n"
220  "UdHkhVNcsAKX1H7GNNLOEADksd86wuoXvg==\n"
221  "-----END CERTIFICATE-----\n";
222 
223  const char *_aio_root_ca_prod =
224  "-----BEGIN CERTIFICATE-----\n"
225  "MIIEjTCCA3WgAwIBAgIQDQd4KhM/xvmlcpbhMf/ReTANBgkqhkiG9w0BAQsFADBh\n"
226  "MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\n"
227  "d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBH\n"
228  "MjAeFw0xNzExMDIxMjIzMzdaFw0yNzExMDIxMjIzMzdaMGAxCzAJBgNVBAYTAlVT\n"
229  "MRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\n"
230  "b20xHzAdBgNVBAMTFkdlb1RydXN0IFRMUyBSU0EgQ0EgRzEwggEiMA0GCSqGSIb3\n"
231  "DQEBAQUAA4IBDwAwggEKAoIBAQC+F+jsvikKy/65LWEx/TMkCDIuWegh1Ngwvm4Q\n"
232  "yISgP7oU5d79eoySG3vOhC3w/3jEMuipoH1fBtp7m0tTpsYbAhch4XA7rfuD6whU\n"
233  "gajeErLVxoiWMPkC/DnUvbgi74BJmdBiuGHQSd7LwsuXpTEGG9fYXcbTVN5SATYq\n"
234  "DfbexbYxTMwVJWoVb6lrBEgM3gBBqiiAiy800xu1Nq07JdCIQkBsNpFtZbIZhsDS\n"
235  "fzlGWP4wEmBQ3O67c+ZXkFr2DcrXBEtHam80Gp2SNhou2U5U7UesDL/xgLK6/0d7\n"
236  "6TnEVMSUVJkZ8VeZr+IUIlvoLrtjLbqugb0T3OYXW+CQU0kBAgMBAAGjggFAMIIB\n"
237  "PDAdBgNVHQ4EFgQUlE/UXYvkpOKmgP792PkA76O+AlcwHwYDVR0jBBgwFoAUTiJU\n"
238  "IBiV5uNu5g/6+rkS7QYXjzkwDgYDVR0PAQH/BAQDAgGGMB0GA1UdJQQWMBQGCCsG\n"
239  "AQUFBwMBBggrBgEFBQcDAjASBgNVHRMBAf8ECDAGAQH/AgEAMDQGCCsGAQUFBwEB\n"
240  "BCgwJjAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEIGA1Ud\n"
241  "HwQ7MDkwN6A1oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEds\n"
242  "b2JhbFJvb3RHMi5jcmwwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEW\n"
243  "HGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwDQYJKoZIhvcNAQELBQADggEB\n"
244  "AIIcBDqC6cWpyGUSXAjjAcYwsK4iiGF7KweG97i1RJz1kwZhRoo6orU1JtBYnjzB\n"
245  "c4+/sXmnHJk3mlPyL1xuIAt9sMeC7+vreRIF5wFBC0MCN5sbHwhNN1JzKbifNeP5\n"
246  "ozpZdQFmkCo+neBiKR6HqIA+LMTMCMMuv2khGGuPHmtDze4GmEGZtYLyF8EQpa5Y\n"
247  "jPuV6k2Cr/N3XxFpT3hRpt/3usU/Zb9wfKPtWpoznZ4/44c1p9rzFcZYrWkj3A+7\n"
248  "TNBJE0GmP2fhXhP1D/XVfIW/h0yCJGEiV9Glm/uGOa3DXHlmbAcxSyCRraG+ZBkA\n"
249  "7h4SeM6Y8l/7MBRpPCz6l8Y=\n"
250  "-----END CERTIFICATE-----\n";
251 
252  /**************************************************************************/
256  /**************************************************************************/
257  void _connect() {
258 
259  if (WiFi.status() == WL_CONNECTED)
260  return;
261 
262  if (strlen(_ssid) == 0) {
263  _status = WS_SSID_INVALID;
264  } else {
265  _disconnect();
266  delay(100);
267  WiFi.begin(_ssid, _pass);
268  _status = WS_NET_DISCONNECTED;
269  delay(5000);
270  }
271  }
272 
273  /**************************************************************************/
277  /**************************************************************************/
278  void _disconnect() {
279  WiFi.disconnect();
280  delay(500);
281  }
282 };
283 
284 #endif // ARDUINO_ARCH_ESP32_H
285 #endif // Wippersnapper_ESP32_H
void set_ssid_pass()
Sets the WiFi client&#39;s ssid and password.
Definition: Wippersnapper_ESP32.h:85
#define WS_DEBUG_PRINT(...)
Prints debug output.
Definition: Wippersnapper.h:49
-
Class for using the ESP32 network interface.
Definition: Wippersnapper_ESP32.h:34
-
void set_ssid_pass(const char *ssid, const char *ssidPassword)
Sets the WiFi client&#39;s ssid and password.
Definition: Wippersnapper_ESP32.h:67
-
void _connect()
Establishes a connection with the wireless network.
Definition: Wippersnapper_ESP32.h:254
-
Wippersnapper_ESP32()
Initializes the Adafruit IO class for ESP32 devices.
Definition: Wippersnapper_ESP32.h:42
-
bool check_valid_ssid()
Performs a scan of local WiFi networks.
Definition: Wippersnapper_ESP32.h:95
-
void getMacAddr()
Sets the ESP32&#39;s unique client identifier.
Definition: Wippersnapper_ESP32.h:134
-
const char * _ssid
WiFi SSID.
Definition: Wippersnapper_ESP32.h:188
+
Class for using the ESP32 network interface.
Definition: Wippersnapper_ESP32.h:35
+
void set_ssid_pass(const char *ssid, const char *ssidPassword)
Sets the WiFi client&#39;s ssid and password.
Definition: Wippersnapper_ESP32.h:68
+
void _connect()
Establishes a connection with the wireless network.
Definition: Wippersnapper_ESP32.h:257
+
Wippersnapper_ESP32()
Initializes the Adafruit IO class for ESP32 devices.
Definition: Wippersnapper_ESP32.h:43
+
bool check_valid_ssid()
Performs a scan of local WiFi networks.
Definition: Wippersnapper_ESP32.h:96
+
void getMacAddr()
Sets the ESP32&#39;s unique client identifier.
Definition: Wippersnapper_ESP32.h:135
+
const char * _ssid
WiFi SSID.
Definition: Wippersnapper_ESP32.h:191
secretsConfig _config
Definition: Wippersnapper.h:321
ws_status_t
Definition: Wippersnapper.h:113
Class that provides storage and functions for the Adafruit IO Wippersnapper interface.
Definition: Wippersnapper.h:200
-
ws_status_t networkStatus()
Returns the network status of an ESP32 module.
Definition: Wippersnapper_ESP32.h:166
+
ws_status_t networkStatus()
Returns the network status of an ESP32 module.
Definition: Wippersnapper_ESP32.h:169
-
WiFiClientSecure * _mqtt_client
Pointer to a WiFi client object (TLS/SSL)
Definition: Wippersnapper_ESP32.h:190
-
const char * _pass
WiFi password.
Definition: Wippersnapper_ESP32.h:189
-
void _disconnect()
Disconnects from the wireless network.
Definition: Wippersnapper_ESP32.h:275
-
const char * _aio_root_ca_prod
Root certificate for io.adafruit.com.
Definition: Wippersnapper_ESP32.h:220
+
WiFiClientSecure * _mqtt_client
Pointer to a WiFi client object (TLS/SSL)
Definition: Wippersnapper_ESP32.h:193
+
const char * _pass
WiFi password.
Definition: Wippersnapper_ESP32.h:192
+
void _disconnect()
Disconnects from the wireless network.
Definition: Wippersnapper_ESP32.h:278
+
const char * _aio_root_ca_prod
Root certificate for io.adafruit.com.
Definition: Wippersnapper_ESP32.h:223
Wippersnapper WS
Definition: Wippersnapper.cpp:36
-
const char * _aio_root_ca_staging
Root certificate for io.adafruit.us.
Definition: Wippersnapper_ESP32.h:192
+
const char * _aio_root_ca_staging
Root certificate for io.adafruit.us.
Definition: Wippersnapper_ESP32.h:195
#define WS_DEBUG_PRINTLN(...)
Prints line from debug output.
Definition: Wippersnapper.h:52
-
void setupMQTTClient(const char *clientID)
Initializes the MQTT client.
Definition: Wippersnapper_ESP32.h:147
-
~Wippersnapper_ESP32()
Destructor for the Adafruit IO AirLift class.
Definition: Wippersnapper_ESP32.h:53
+
void setupMQTTClient(const char *clientID)
Initializes the MQTT client.
Definition: Wippersnapper_ESP32.h:148
+
~Wippersnapper_ESP32()
Destructor for the Adafruit IO AirLift class.
Definition: Wippersnapper_ESP32.h:54
ws_status_t _status
Definition: Wippersnapper.h:389
uint8_t _macAddr[6]
Definition: Wippersnapper.h:316
Adafruit_MQTT * _mqtt
Definition: Wippersnapper.h:319
-
const char * connectionType()
Returns the type of network connection used by Wippersnapper.
Definition: Wippersnapper_ESP32.h:185
+
const char * connectionType()
Returns the type of network connection used by Wippersnapper.
Definition: Wippersnapper_ESP32.h:188
-Go to the documentation of this file.
1 
17 #ifndef WIPPERSNAPPER_ESP8266_H
18 #define WIPPERSNAPPER_ESP8266_H
19 
20 #ifdef ARDUINO_ARCH_ESP8266
21 #include "Adafruit_MQTT.h"
22 #include "Adafruit_MQTT_Client.h"
23 #include "ESP8266WiFi.h"
24 #include "Wippersnapper.h"
25 
26 /* NOTE - Projects that require "Secure MQTT" (TLS/SSL) also require a new
27  * SSL certificate every year. If adding Secure MQTT to your ESP8266 project is
28  * important - please switch to using the modern ESP32 (and related models)
29  * instead of the ESP8266 to avoid updating the SSL fingerprint every year.
30  *
31  * If you've read through this and still want to use "Secure MQTT" with your
32  * ESP8266 project, we've left the "WiFiClientSecure" lines commented out. To
33  * use them, uncomment the commented out lines within this file and re-compile
34  * the library.
35  */
36 // static const char *fingerprint PROGMEM = "4E C1 52 73 24 A8 36 D6 7A 4C 67
37 // C7 91 0C 0A 22 B9 2D 5B CA";
38 
39 extern Wippersnapper WS;
40 
41 /******************************************************************************/
46 /******************************************************************************/
47 class Wippersnapper_ESP8266 : public Wippersnapper {
48 
49 public:
50  /**************************************************************************/
62  /**************************************************************************/
63  Wippersnapper_ESP8266() : Wippersnapper() {
64  _ssid = 0;
65  _pass = 0;
66  _wifi_client = new WiFiClient;
67  }
68 
69  /**************************************************************************/
73  /**************************************************************************/
74  ~Wippersnapper_ESP8266() {
75  if (_wifi_client)
76  delete _wifi_client;
77  if (_mqtt)
78  delete _mqtt;
79  }
80 
81  /**********************************************************/
89  /**********************************************************/
90  void set_ssid_pass(const char *ssid, const char *ssidPassword) {
91  _ssid = ssid;
92 
93  // set the AP password
94  // check if ssidPassword was "" in secrets.json
95  if ((ssidPassword != NULL) && (strlen(ssidPassword) == 0)) {
96  _pass = NULL; // Set as NULL for open networks
97  } else {
98  _pass = ssidPassword;
99  }
100  }
101 
102  /**********************************************************/
107  /**********************************************************/
108  void set_ssid_pass() {
109  _ssid = WS._config.network.ssid;
110  _pass = WS._config.network.pass;
111  }
112 
113  /***********************************************************/
118  /***********************************************************/
119  bool check_valid_ssid() {
120  // Set WiFi to station mode and disconnect from an AP if it was previously
121  // connected
122  WiFi.mode(WIFI_STA);
123  WiFi.disconnect();
124  delay(100);
125 
126  // Perform a network scan
127  int n = WiFi.scanNetworks();
128  if (n == 0) {
129  WS_DEBUG_PRINTLN("ERROR: No WiFi networks found!");
130  return false;
131  }
132 
133  // Was the network within secrets.json found?
134  for (int i = 0; i < n; ++i) {
135  if (strcmp(_ssid, WiFi.SSID(i).c_str()) == 0)
136  return true;
137  }
138 
139  // User-set network not found, print scan results to serial console
140  WS_DEBUG_PRINTLN("ERROR: Your requested WiFi network was not found!");
141  WS_DEBUG_PRINTLN("WipperSnapper found these WiFi networks: ");
142  for (int i = 0; i < n; ++i) {
143  WS_DEBUG_PRINT(WiFi.SSID(i));
144  WS_DEBUG_PRINT(" ");
145  WS_DEBUG_PRINT(WiFi.RSSI(i));
146  WS_DEBUG_PRINTLN("dB");
147  }
148 
149  return false;
150  }
151 
152  /********************************************************/
157  /********************************************************/
158  void getMacAddr() {
159  uint8_t mac[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
160  WiFi.macAddress(mac);
161  memcpy(WS._macAddr, mac, sizeof(mac));
162  }
163 
164  /*******************************************************************/
170  /*******************************************************************/
171  void setupMQTTClient(const char *clientID) {
172  // Uncomment the following lines to use MQTT/SSL. You will need to
173  // re-compile after. _wifi_client->setFingerprint(fingerprint); WS._mqtt =
174  // new Adafruit_MQTT_Client(_wifi_client, WS._config.aio_url,
175  // WS._config.io_port, clientID, WS._config.aio_user, WS._config.aio_key);
176 
177  WS._mqtt = new Adafruit_MQTT_Client(_wifi_client, WS._config.aio_url, 1883,
178  clientID, WS._config.aio_user,
179  WS._config.aio_key);
180  }
181 
182  /********************************************************/
187  /********************************************************/
189  switch (WiFi.status()) {
190  case WL_CONNECTED:
191  return WS_NET_CONNECTED;
192  case WL_CONNECT_FAILED:
193  return WS_NET_CONNECT_FAILED;
194  case WL_IDLE_STATUS:
195  return WS_IDLE;
196  default:
197  return WS_NET_DISCONNECTED;
198  }
199  }
200 
201  /*******************************************************************/
206  /*******************************************************************/
207  const char *connectionType() { return "ESP8266"; }
208 
209 protected:
210  const char *_ssid = NULL;
211  const char *_pass = NULL;
212  WiFiClient *_wifi_client;
213 
214  /**************************************************************************/
218  /**************************************************************************/
219  void _connect() {
220 
221  if (WiFi.status() == WL_CONNECTED)
222  return;
223 
224  // Attempt connection
225  _disconnect();
226  delay(100);
227  // ESP8266 MUST be in STA mode to avoid device acting as client/server
228  WiFi.mode(WIFI_STA);
229  WiFi.begin(_ssid, _pass);
230  _status = WS_NET_DISCONNECTED;
231  delay(100);
232 
233  // wait for a connection to be established
234  long startRetry = millis();
235  WS_DEBUG_PRINTLN("CONNECTING");
236  while (WiFi.status() != WL_CONNECTED && millis() - startRetry < 10000) {
237  // ESP8266 WDT requires yield() during a busy-loop so it doesn't bite
238  yield();
239  }
240  }
241 
242  /**************************************************************************/
246  /**************************************************************************/
247  void _disconnect() {
248  WiFi.disconnect();
249  delay(500);
250  }
251 };
252 
253 #endif // ARDUINO_ARCH_ESP8266
254 #endif // WIPPERSNAPPER_ESP8266_H
virtual void setupMQTTClient(const char *clientID)
Sets up the MQTT client session.
Definition: Wippersnapper.cpp:192
+Go to the documentation of this file.
1 
17 #ifndef WIPPERSNAPPER_ESP8266_H
18 #define WIPPERSNAPPER_ESP8266_H
19 
20 #ifdef ARDUINO_ARCH_ESP8266
21 #include "Adafruit_MQTT.h"
22 #include "Adafruit_MQTT_Client.h"
23 #include "ESP8266WiFi.h"
24 #include "Wippersnapper.h"
25 
26 /* NOTE - Projects that require "Secure MQTT" (TLS/SSL) also require a new
27  * SSL certificate every year. If adding Secure MQTT to your ESP8266 project is
28  * important - please switch to using the modern ESP32 (and related models)
29  * instead of the ESP8266 to avoid updating the SSL fingerprint every year.
30  *
31  * If you've read through this and still want to use "Secure MQTT" with your
32  * ESP8266 project, we've left the "WiFiClientSecure" lines commented out. To
33  * use them, uncomment the commented out lines within this file and re-compile
34  * the library.
35  */
36 // static const char *fingerprint PROGMEM = "4E C1 52 73 24 A8 36 D6 7A 4C 67
37 // C7 91 0C 0A 22 B9 2D 5B CA";
38 
39 extern Wippersnapper WS;
40 
41 /******************************************************************************/
46 /******************************************************************************/
47 class Wippersnapper_ESP8266 : public Wippersnapper {
48 
49 public:
50  /**************************************************************************/
62  /**************************************************************************/
63  Wippersnapper_ESP8266() : Wippersnapper() {
64  _ssid = 0;
65  _pass = 0;
66  _wifi_client = new WiFiClient;
67  }
68 
69  /**************************************************************************/
73  /**************************************************************************/
74  ~Wippersnapper_ESP8266() {
75  if (_wifi_client)
76  delete _wifi_client;
77  if (_mqtt)
78  delete _mqtt;
79  }
80 
81  /**********************************************************/
89  /**********************************************************/
90  void set_ssid_pass(const char *ssid, const char *ssidPassword) {
91  _ssid = ssid;
92 
93  // set the AP password
94  // check if ssidPassword was "" in secrets.json
95  if ((ssidPassword != NULL) && (strlen(ssidPassword) == 0)) {
96  _pass = NULL; // Set as NULL for open networks
97  } else {
98  _pass = ssidPassword;
99  }
100  }
101 
102  /**********************************************************/
107  /**********************************************************/
108  void set_ssid_pass() {
109  _ssid = WS._config.network.ssid;
110  _pass = WS._config.network.pass;
111  }
112 
113  /***********************************************************/
118  /***********************************************************/
119  bool check_valid_ssid() {
120  // Set WiFi to station mode and disconnect from an AP if it was previously
121  // connected
122  WiFi.mode(WIFI_STA);
123  WiFi.disconnect();
124  delay(100);
125 
126  // Perform a network scan
127  int n = WiFi.scanNetworks();
128  if (n == 0) {
129  WS_DEBUG_PRINTLN("ERROR: No WiFi networks found!");
130  return false;
131  }
132 
133  // Was the network within secrets.json found?
134  for (int i = 0; i < n; ++i) {
135  if (strcmp(_ssid, WiFi.SSID(i).c_str()) == 0)
136  return true;
137  }
138 
139  // User-set network not found, print scan results to serial console
140  WS_DEBUG_PRINTLN("ERROR: Your requested WiFi network was not found!");
141  WS_DEBUG_PRINTLN("WipperSnapper found these WiFi networks: ");
142  for (int i = 0; i < n; ++i) {
143  WS_DEBUG_PRINT(WiFi.SSID(i));
144  WS_DEBUG_PRINT(" ");
145  WS_DEBUG_PRINT(WiFi.RSSI(i));
146  WS_DEBUG_PRINTLN("dB");
147  }
148 
149  return false;
150  }
151 
152  /********************************************************/
157  /********************************************************/
158  void getMacAddr() {
159  uint8_t mac[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
160  WiFi.macAddress(mac);
161  memcpy(WS._macAddr, mac, sizeof(mac));
162  }
163 
164  /*******************************************************************/
170  /*******************************************************************/
171  void setupMQTTClient(const char *clientID) {
172  // Uncomment the following lines to use MQTT/SSL. You will need to
173  // re-compile after. _wifi_client->setFingerprint(fingerprint); WS._mqtt =
174  // new Adafruit_MQTT_Client(_wifi_client, WS._config.aio_url,
175  // WS._config.io_port, clientID, WS._config.aio_user, WS._config.aio_key);
176  if (WS._config.io_port == 8883)
177  WS._config.io_port = 1883;
178  WS._mqtt = new Adafruit_MQTT_Client(
179  _wifi_client, WS._config.aio_url, WS._config.io_port, clientID,
180  WS._config.aio_user, WS._config.aio_key);
181  }
182 
183  /********************************************************/
188  /********************************************************/
190  switch (WiFi.status()) {
191  case WL_CONNECTED:
192  return WS_NET_CONNECTED;
193  case WL_CONNECT_FAILED:
194  return WS_NET_CONNECT_FAILED;
195  case WL_IDLE_STATUS:
196  return WS_IDLE;
197  default:
198  return WS_NET_DISCONNECTED;
199  }
200  }
201 
202  /*******************************************************************/
207  /*******************************************************************/
208  const char *connectionType() { return "ESP8266"; }
209 
210 protected:
211  const char *_ssid = NULL;
212  const char *_pass = NULL;
213  WiFiClient *_wifi_client;
214 
215  /**************************************************************************/
219  /**************************************************************************/
220  void _connect() {
221 
222  if (WiFi.status() == WL_CONNECTED)
223  return;
224 
225  // Attempt connection
226  _disconnect();
227  delay(100);
228  // ESP8266 MUST be in STA mode to avoid device acting as client/server
229  WiFi.mode(WIFI_STA);
230  WiFi.begin(_ssid, _pass);
231  _status = WS_NET_DISCONNECTED;
232  delay(100);
233 
234  // wait for a connection to be established
235  long startRetry = millis();
236  WS_DEBUG_PRINTLN("CONNECTING");
237  while (WiFi.status() != WL_CONNECTED && millis() - startRetry < 10000) {
238  // ESP8266 WDT requires yield() during a busy-loop so it doesn't bite
239  yield();
240  }
241  }
242 
243  /**************************************************************************/
247  /**************************************************************************/
248  void _disconnect() {
249  WiFi.disconnect();
250  delay(500);
251  }
252 };
253 
254 #endif // ARDUINO_ARCH_ESP8266
255 #endif // WIPPERSNAPPER_ESP8266_H
virtual void setupMQTTClient(const char *clientID)
Sets up the MQTT client session.
Definition: Wippersnapper.cpp:192
#define WS_DEBUG_PRINT(...)
Prints debug output.
Definition: Wippersnapper.h:49
secretsConfig _config
Definition: Wippersnapper.h:321
ws_status_t
Definition: Wippersnapper.h:113
diff --git a/html/_wippersnapper___networking_8h_source.html b/html/_wippersnapper___networking_8h_source.html index 4a155b3a4..9ff6b6e02 100644 --- a/html/_wippersnapper___networking_8h_source.html +++ b/html/_wippersnapper___networking_8h_source.html @@ -67,7 +67,7 @@
Go to the documentation of this file.
1 
16 #ifndef WIPPERSNAPPER_NETWORKING_H
17 #define WIPPERSNAPPER_NETWORKING_H
18 
19 #if defined(ADAFRUIT_METRO_M4_EXPRESS) || \
20  defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) || defined(ADAFRUIT_PYPORTAL) || \
21  defined(ADAFRUIT_PYPORTAL_M4_TITANO) || defined(USE_AIRLIFT)
25 #elif defined(ARDUINO_ARCH_ESP8266)
28 typedef Wippersnapper_ESP8266 Wippersnapper_WiFi;
29 #elif defined(ARDUINO_ARCH_ESP32)
33 #elif defined(ARDUINO_ARCH_RP2040)
35 typedef ws_networking_pico Wippersnapper_WiFi;
36 #elif defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_SAMD_MKRWIFI1010)
37 
40 #else
41 #warning "Must define network interface in config.h!"
42 #endif
43 
44 #endif // WIPPERSNAPPER_NETWORKING_H
-
Class for using the ESP32 network interface.
Definition: Wippersnapper_ESP32.h:34
+
Class for using the ESP32 network interface.
Definition: Wippersnapper_ESP32.h:35
Class for using the AirLift Co-Processor network iface.
Definition: Wippersnapper_AIRLIFT.h:41
diff --git a/html/_wippersnapper___w_i_f_i_n_i_n_a_8h_source.html b/html/_wippersnapper___w_i_f_i_n_i_n_a_8h_source.html index 97e658a45..dd353af23 100644 --- a/html/_wippersnapper___w_i_f_i_n_i_n_a_8h_source.html +++ b/html/_wippersnapper___w_i_f_i_n_i_n_a_8h_source.html @@ -73,7 +73,7 @@
void set_wifi(SPIClass *wifi)
Sets the WiFi client.
Definition: Wippersnapper_WIFININA.h:157
SPIClass * _wifi
Definition: Wippersnapper_WIFININA.h:235
const char * _ssid
Definition: Wippersnapper_WIFININA.h:229
-
void errorWriteHang(String error)
Writes an error message to the serial and the filesystem, blinks WS_LED_STATUS_ERROR_RUNTIME pattern ...
Definition: Wippersnapper.cpp:2304
+
void errorWriteHang(String error)
Writes an error message to the serial and the filesystem, blinks WS_LED_STATUS_ERROR_RUNTIME pattern ...
Definition: Wippersnapper.cpp:2302
bool firmwareCheck()
Checks the nina-fw version on the module.
Definition: Wippersnapper_WIFININA.h:169
WiFiSSLClient * _mqtt_client
Definition: Wippersnapper_WIFININA.h:234
secretsConfig _config
Definition: Wippersnapper.h:321
diff --git a/html/annotated.html b/html/annotated.html index fccb803e4..2c4b98a46 100644 --- a/html/annotated.html +++ b/html/annotated.html @@ -98,41 +98,45 @@  CWipperSnapper_I2C_Driver_LTR329_LTR303Class that provides a driver interface for a LTR329/303 sensor  CWipperSnapper_I2C_Driver_LTR390Class that provides a driver interface for a LTR390 sensor  CWipperSnapper_I2C_Driver_MAX17048Class that provides a driver interface for a MAX17048 sensor - CWipperSnapper_I2C_Driver_MCP9808Class that provides a driver interface for a MCP9808 sensor - CWipperSnapper_I2C_Driver_MPL115A2Class that provides a sensor driver for the MPL115A2 temperature and pressure sensor - CWipperSnapper_I2C_Driver_MPRLSClass that provides a sensor driver for the MPRLS sensor - CWipperSnapper_I2C_Driver_MS8607Class that provides a sensor driver for the MS8607 PHT sensor - CWipperSnapper_I2C_Driver_PCT2075Class that provides a driver interface for a PCT2075 sensor - CWipperSnapper_I2C_Driver_PM25Class that provides a driver interface for the PM25 sensor - CWipperSnapper_I2C_Driver_SCD30Class that provides a driver interface for the SCD30 sensor - CWipperSnapper_I2C_Driver_SCD4XClass that provides a driver interface for the SCD40 sensor - CWipperSnapper_I2C_Driver_SEN5XClass that provides a driver interface for the SEN5X sensor - CWipperSnapper_I2C_Driver_SGP30Class that provides a driver interface for a SGP30 sensor - CWipperSnapper_I2C_Driver_SGP40Class that provides a driver interface for the SGP40 sensor - CWipperSnapper_I2C_Driver_SHT3XClass that provides a driver interface for the SHT3X sensor - CWipperSnapper_I2C_Driver_SHT4XClass that provides a driver interface for the SHT4X sensor - CWipperSnapper_I2C_Driver_SHTC3Class that provides a driver interface for the SHTC3 sensor - CWipperSnapper_I2C_Driver_SI7021Class that provides a driver interface for the SI7021 sensor - CWipperSnapper_I2C_Driver_STEMMA_Soil_SensorClass that provides a driver interface for the STEMMA soil sensor - CWipperSnapper_I2C_Driver_TMP117Class that provides a driver interface for a TMP117 sensor - CWipperSnapper_I2C_Driver_TSL2591Class that provides a driver interface for a TSL2591 sensor - CWipperSnapper_I2C_Driver_VCNL4020Class that provides a driver interface for a VCNL4020 sensor - CWipperSnapper_I2C_Driver_VCNL4040Class that provides a driver interface for a VCNL4040 sensor - CWipperSnapper_I2C_Driver_VEML7700Class that provides a driver interface for a VEML7700 sensor - CWipperSnapper_I2C_Driver_VL53L0XClass that provides a driver interface for a VL53L0X sensor - CWipperSnapper_I2C_Driver_VL6180XClass that provides a driver interface for a VL6180X sensor - CWippersnapper_WIFININAClass for using the AirLift Co-Processor network iface - Cws_display_driverDisplay driver for LVGL and LVGL_Glue in WipperSnapper - Cws_display_ui_helperHelps build and manage the LVGL objects and screens for the application code - Cws_ds18x20Class that provides an interface with DS18X20-compatible sensors - Cws_ledcHigh-level interface for the ESP32/ESP32-Sx/ESP32-Cx LED Control (LEDC) peripheral. Instead of specifying a timer or channel, this class automatically allocates a channel and associates it with a pin. Underlying esp32-hal-ledc performs timer management and handles the low-level LEDC peripheral API calls - Cws_ledc_servoHigh-level driver for servos for ESP32/ESP32-Sx/ESP32-Cx. This driver implements a subset of the functions within the Arduino servo library, (https://github.com/arduino-libraries/Servo/blob/master/src/Servo.h) - Cws_pixelsFriend class - Cws_pwmInterface for WipperSnapper PWM - Cws_servoInterface for WipperSnapper servo control - Cws_uartClass that provides an interface between WipperSnapper's app and the device's UART bus - Cws_uart_drvBase class for UART Device Drivers - Cws_uart_drv_pm25aqiClass that provides an interface for a PM25 AQI UART sensor + CWipperSnapper_I2C_Driver_MCP3421Class that provides a driver interface for a MCP3421 sensor + CWipperSnapper_I2C_Driver_MCP9808Class that provides a driver interface for a MCP9808 sensor + CWipperSnapper_I2C_Driver_MPL115A2Class that provides a sensor driver for the MPL115A2 temperature and pressure sensor + CWipperSnapper_I2C_Driver_MPRLSClass that provides a sensor driver for the MPRLS sensor + CWipperSnapper_I2C_Driver_MS8607Class that provides a sensor driver for the MS8607 PHT sensor + CWipperSnapper_I2C_Driver_NAU7802Class that provides a driver interface for the NAU7802 + CWipperSnapper_I2C_Driver_PCT2075Class that provides a driver interface for a PCT2075 sensor + CWipperSnapper_I2C_Driver_PM25Class that provides a driver interface for the PM25 sensor + CWipperSnapper_I2C_Driver_SCD30Class that provides a driver interface for the SCD30 sensor + CWipperSnapper_I2C_Driver_SCD4XClass that provides a driver interface for the SCD40 sensor + CWipperSnapper_I2C_Driver_SEN5XClass that provides a driver interface for the SEN5X sensor + CWipperSnapper_I2C_Driver_SGP30Class that provides a driver interface for a SGP30 sensor + CWipperSnapper_I2C_Driver_SGP40Class that provides a driver interface for the SGP40 sensor + CWipperSnapper_I2C_Driver_SHT3XClass that provides a driver interface for the SHT3X sensor + CWipperSnapper_I2C_Driver_SHT4XClass that provides a driver interface for the SHT4X sensor + CWipperSnapper_I2C_Driver_SHTC3Class that provides a driver interface for the SHTC3 sensor + CWipperSnapper_I2C_Driver_SI7021Class that provides a driver interface for the SI7021 sensor + CWipperSnapper_I2C_Driver_STEMMA_Soil_SensorClass that provides a driver interface for the STEMMA soil sensor + CWipperSnapper_I2C_Driver_TMP117Class that provides a driver interface for a TMP117 sensor + CWipperSnapper_I2C_Driver_TSL2591Class that provides a driver interface for a TSL2591 sensor + CWipperSnapper_I2C_Driver_VCNL4020Class that provides a driver interface for a VCNL4020 sensor + CWipperSnapper_I2C_Driver_VCNL4040Class that provides a driver interface for a VCNL4040 sensor + CWipperSnapper_I2C_Driver_VEML7700Class that provides a driver interface for a VEML7700 sensor + CWipperSnapper_I2C_Driver_VL53L0XClass that provides a driver interface for a VL53L0X sensor + CWipperSnapper_I2C_Driver_VL53L1XClass that provides a driver interface for a VL53L1X sensor + CWipperSnapper_I2C_Driver_VL53L4CDClass that provides a driver interface for a VL53L4CD sensor + CWipperSnapper_I2C_Driver_VL6180XClass that provides a driver interface for a VL6180X sensor + CWippersnapper_WIFININAClass for using the AirLift Co-Processor network iface + Cws_display_driverDisplay driver for LVGL and LVGL_Glue in WipperSnapper + Cws_display_ui_helperHelps build and manage the LVGL objects and screens for the application code + Cws_ds18x20Class that provides an interface with DS18X20-compatible sensors + Cws_ledcHigh-level interface for the ESP32/ESP32-Sx/ESP32-Cx LED Control (LEDC) peripheral. Instead of specifying a timer or channel, this class automatically allocates a channel and associates it with a pin. Underlying esp32-hal-ledc performs timer management and handles the low-level LEDC peripheral API calls + Cws_ledc_servoHigh-level driver for servos for ESP32/ESP32-Sx/ESP32-Cx. This driver implements a subset of the functions within the Arduino servo library, (https://github.com/arduino-libraries/Servo/blob/master/src/Servo.h) + Cws_pixelsFriend class + Cws_pwmInterface for WipperSnapper PWM + Cws_servoInterface for WipperSnapper servo control + Cws_uartClass that provides an interface between WipperSnapper's app and the device's UART bus + Cws_uart_drvBase class for UART Device Drivers + Cws_uart_drv_pm25aqiClass that provides an interface for a PM25 AQI UART sensor
diff --git a/html/class_wipper_snapper___i2_c___driver.html b/html/class_wipper_snapper___i2_c___driver.html index 19892cefc..7c30f41cd 100644 --- a/html/class_wipper_snapper___i2_c___driver.html +++ b/html/class_wipper_snapper___i2_c___driver.html @@ -97,29 +97,33 @@ WipperSnapper_I2C_Driver_LTR329_LTR303 WipperSnapper_I2C_Driver_LTR390 WipperSnapper_I2C_Driver_MAX17048 -WipperSnapper_I2C_Driver_MCP9808 -WipperSnapper_I2C_Driver_MPL115A2 -WipperSnapper_I2C_Driver_MPRLS -WipperSnapper_I2C_Driver_MS8607 -WipperSnapper_I2C_Driver_PCT2075 -WipperSnapper_I2C_Driver_PM25 -WipperSnapper_I2C_Driver_SCD30 -WipperSnapper_I2C_Driver_SCD4X -WipperSnapper_I2C_Driver_SEN5X -WipperSnapper_I2C_Driver_SGP30 -WipperSnapper_I2C_Driver_SGP40 -WipperSnapper_I2C_Driver_SHT3X -WipperSnapper_I2C_Driver_SHT4X -WipperSnapper_I2C_Driver_SHTC3 -WipperSnapper_I2C_Driver_SI7021 -WipperSnapper_I2C_Driver_STEMMA_Soil_Sensor -WipperSnapper_I2C_Driver_TMP117 -WipperSnapper_I2C_Driver_TSL2591 -WipperSnapper_I2C_Driver_VCNL4020 -WipperSnapper_I2C_Driver_VCNL4040 -WipperSnapper_I2C_Driver_VEML7700 -WipperSnapper_I2C_Driver_VL53L0X -WipperSnapper_I2C_Driver_VL6180X +WipperSnapper_I2C_Driver_MCP3421 +WipperSnapper_I2C_Driver_MCP9808 +WipperSnapper_I2C_Driver_MPL115A2 +WipperSnapper_I2C_Driver_MPRLS +WipperSnapper_I2C_Driver_MS8607 +WipperSnapper_I2C_Driver_NAU7802 +WipperSnapper_I2C_Driver_PCT2075 +WipperSnapper_I2C_Driver_PM25 +WipperSnapper_I2C_Driver_SCD30 +WipperSnapper_I2C_Driver_SCD4X +WipperSnapper_I2C_Driver_SEN5X +WipperSnapper_I2C_Driver_SGP30 +WipperSnapper_I2C_Driver_SGP40 +WipperSnapper_I2C_Driver_SHT3X +WipperSnapper_I2C_Driver_SHT4X +WipperSnapper_I2C_Driver_SHTC3 +WipperSnapper_I2C_Driver_SI7021 +WipperSnapper_I2C_Driver_STEMMA_Soil_Sensor +WipperSnapper_I2C_Driver_TMP117 +WipperSnapper_I2C_Driver_TSL2591 +WipperSnapper_I2C_Driver_VCNL4020 +WipperSnapper_I2C_Driver_VCNL4040 +WipperSnapper_I2C_Driver_VEML7700 +WipperSnapper_I2C_Driver_VL53L0X +WipperSnapper_I2C_Driver_VL53L1X +WipperSnapper_I2C_Driver_VL53L4CD +WipperSnapper_I2C_Driver_VL6180X
@@ -2760,7 +2764,7 @@

Returns
True if the sensor value was obtained successfully, False otherwise.
-

Reimplemented in WipperSnapper_I2C_Driver_ENS160, WipperSnapper_I2C_Driver_LTR390, WipperSnapper_I2C_Driver_LTR329_LTR303, WipperSnapper_I2C_Driver_STEMMA_Soil_Sensor, and WipperSnapper_I2C_Driver_SGP40.

+

Reimplemented in WipperSnapper_I2C_Driver_ENS160, WipperSnapper_I2C_Driver_NAU7802, WipperSnapper_I2C_Driver_MCP3421, WipperSnapper_I2C_Driver_LTR390, WipperSnapper_I2C_Driver_LTR329_LTR303, WipperSnapper_I2C_Driver_STEMMA_Soil_Sensor, and WipperSnapper_I2C_Driver_SGP40.

@@ -3552,7 +3556,7 @@

Returns
True if the sensor event was obtained successfully, False otherwise.
-

Reimplemented in WipperSnapper_I2C_Driver_VCNL4040, WipperSnapper_I2C_Driver_VCNL4020, WipperSnapper_I2C_Driver_VL53L0X, and WipperSnapper_I2C_Driver_VL6180X.

+

Reimplemented in WipperSnapper_I2C_Driver_VL53L4CD, WipperSnapper_I2C_Driver_VCNL4040, WipperSnapper_I2C_Driver_VCNL4020, WipperSnapper_I2C_Driver_VL53L1X, WipperSnapper_I2C_Driver_VL53L0X, and WipperSnapper_I2C_Driver_VL6180X.

diff --git a/html/class_wipper_snapper___i2_c___driver.png b/html/class_wipper_snapper___i2_c___driver.png index 2e94693bd..0a133a5ae 100644 Binary files a/html/class_wipper_snapper___i2_c___driver.png and b/html/class_wipper_snapper___i2_c___driver.png differ diff --git a/html/class_wipper_snapper___i2_c___driver___m_c_p3421-members.html b/html/class_wipper_snapper___i2_c___driver___m_c_p3421-members.html new file mode 100644 index 000000000..c9da1a0bb --- /dev/null +++ b/html/class_wipper_snapper___i2_c___driver___m_c_p3421-members.html @@ -0,0 +1,225 @@ + + + + + + + +Adafruit Library: Member List + + + + + + + + + +
+
+

+ + + + + +
+
Adafruit Library +
+
+ + + + + + + + + +
+
+ + +
+ +
+ + +
+
+
WipperSnapper_I2C_Driver_MCP3421 Member List
+
+
+ +

This is the complete list of members for WipperSnapper_I2C_Driver_MCP3421, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_altitudeSensorPeriodWipperSnapper_I2C_Driverprotected
_altitudeSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_ambientTempFPeriodWipperSnapper_I2C_Driverprotected
_ambientTempFPeriodPrvWipperSnapper_I2C_Driverprotected
_CO2SensorPeriodWipperSnapper_I2C_Driverprotected
_CO2SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_currentPeriodWipperSnapper_I2C_Driverprotected
_currentPeriodPrvWipperSnapper_I2C_Driverprotected
_ECO2SensorPeriodWipperSnapper_I2C_Driverprotected
_ECO2SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_gasResistancePeriodWipperSnapper_I2C_Driverprotected
_gasResistancePeriodPrvWipperSnapper_I2C_Driverprotected
_humidSensorPeriodWipperSnapper_I2C_Driverprotected
_humidSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_i2cWipperSnapper_I2C_Driverprotected
_lightSensorPeriodWipperSnapper_I2C_Driverprotected
_lightSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_mcp3421WipperSnapper_I2C_Driver_MCP3421protected
_NOxIndexPeriodWipperSnapper_I2C_Driverprotected
_NOxIndexPeriodPrvWipperSnapper_I2C_Driverprotected
_objectTempFPeriodWipperSnapper_I2C_Driverprotected
_objectTempFPeriodPrvWipperSnapper_I2C_Driverprotected
_objectTempSensorPeriodWipperSnapper_I2C_Driverprotected
_objectTempSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM100SensorPeriodWipperSnapper_I2C_Driverprotected
_PM100SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM10SensorPeriodWipperSnapper_I2C_Driverprotected
_PM10SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM25SensorPeriodWipperSnapper_I2C_Driverprotected
_PM25SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_pressureSensorPeriodWipperSnapper_I2C_Driverprotected
_pressureSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_proximitySensorPeriodWipperSnapper_I2C_Driverprotected
_proximitySensorPeriodPrvWipperSnapper_I2C_Driverprotected
_rawSensorPeriodWipperSnapper_I2C_Driverprotected
_rawSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_sensorAddressWipperSnapper_I2C_Driverprotected
_tempSensorPeriodWipperSnapper_I2C_Driverprotected
_tempSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_TVOCSensorPeriodWipperSnapper_I2C_Driverprotected
_TVOCSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_unitlessPercentPeriodWipperSnapper_I2C_Driverprotected
_unitlessPercentPeriodPrvWipperSnapper_I2C_Driverprotected
_VOCIndexPeriodWipperSnapper_I2C_Driverprotected
_VOCIndexPeriodPrvWipperSnapper_I2C_Driverprotected
_voltagePeriodWipperSnapper_I2C_Driverprotected
_voltagePeriodPrvWipperSnapper_I2C_Driverprotected
begin()WipperSnapper_I2C_Driver_MCP3421inline
configureDriver(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)WipperSnapper_I2C_Driverinline
configureSensor()WipperSnapper_I2C_Driver_MCP3421inline
disableAmbientTempF()WipperSnapper_I2C_Driverinlinevirtual
disableSensorProximity()WipperSnapper_I2C_Driverinlinevirtual
enableSensorProximity()WipperSnapper_I2C_Driverinlinevirtual
getEventAltitude(sensors_event_t *altitudeEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventAmbientTemp(sensors_event_t *tempEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventAmbientTempF(sensors_event_t *AmbientTempFEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventCO2(sensors_event_t *co2Event)WipperSnapper_I2C_Driverinlinevirtual
getEventCurrent(sensors_event_t *currentEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventECO2(sensors_event_t *eco2Event)WipperSnapper_I2C_Driverinlinevirtual
getEventGasResistance(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventLight(sensors_event_t *lightEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventNOxIndex(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventObjectTemp(sensors_event_t *objectTempEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventObjectTempF(sensors_event_t *objectTempFEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM100_STD(sensors_event_t *pm100StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM10_STD(sensors_event_t *pm10StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM25_STD(sensors_event_t *pm25StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPressure(sensors_event_t *pressureEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventProximity(sensors_event_t *proximityEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventRaw(sensors_event_t *rawEvent)WipperSnapper_I2C_Driver_MCP3421inlinevirtual
getEventRelativeHumidity(sensors_event_t *humidEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventTVOC(sensors_event_t *tvocEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventUnitlessPercent(sensors_event_t *unitlessPercentEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventVOCIndex(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventVoltage(sensors_event_t *voltageEvent)WipperSnapper_I2C_Driverinlinevirtual
getI2CAddress()WipperSnapper_I2C_Driverinline
getSensorAltitudePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAltitudePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempFPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempFPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorCO2Period()WipperSnapper_I2C_Driverinlinevirtual
getSensorCO2PeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorCurrentPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorCurrentPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorECO2Period()WipperSnapper_I2C_Driverinlinevirtual
getSensorECO2PeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorGasResistancePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorGasResistancePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorLightPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorLightPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorNOxIndexPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorNOxIndexPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempFPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempFPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM100_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM100_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM10_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM10_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM25_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM25_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPressurePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPressurePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorRawPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorRawPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorRelativeHumidityPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorRelativeHumidityPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorTVOCPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorTVOCPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorUnitlessPercentPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorUnitlessPercentPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorVOCIndexPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorVOCIndexPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorVoltagePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorVoltagePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
sensorProximityPeriod()WipperSnapper_I2C_Driverinlinevirtual
SensorProximityPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
setSensorAltitudePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorAmbientTempFPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorAmbientTempPeriodPrv(long periodPrv)WipperSnapper_I2C_Driverinlinevirtual
setSensorCO2PeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorCurrentPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorECO2PeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorGasResistancePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorLightPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorNOxIndexPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorObjectTempFPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorObjectTempPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPeriod(float period, wippersnapper_i2c_v1_SensorType sensorType)WipperSnapper_I2C_Driverinline
setSensorPM100_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPM10_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPM25_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPressurePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorProximityPeriod(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorProximityPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorRawPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorRelativeHumidityPeriodPrv(long periodPrv)WipperSnapper_I2C_Driverinlinevirtual
setSensorTVOCPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorUnitlessPercentPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorVOCIndexPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorVoltagePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
updateSensorProximity(float period)WipperSnapper_I2C_Driverinlinevirtual
WipperSnapper_I2C_Driver(TwoWire *i2c, uint16_t sensorAddress)WipperSnapper_I2C_Driverinline
WipperSnapper_I2C_Driver_MCP3421(TwoWire *i2c, uint16_t sensorAddress)WipperSnapper_I2C_Driver_MCP3421inline
~WipperSnapper_I2C_Driver()WipperSnapper_I2C_Driverinlinevirtual
~WipperSnapper_I2C_Driver_MCP3421()WipperSnapper_I2C_Driver_MCP3421inline
+ + + + diff --git a/html/class_wipper_snapper___i2_c___driver___m_c_p3421.html b/html/class_wipper_snapper___i2_c___driver___m_c_p3421.html new file mode 100644 index 000000000..32695766e --- /dev/null +++ b/html/class_wipper_snapper___i2_c___driver___m_c_p3421.html @@ -0,0 +1,683 @@ + + + + + + + +Adafruit Library: WipperSnapper_I2C_Driver_MCP3421 Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Adafruit Library +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
WipperSnapper_I2C_Driver_MCP3421 Class Reference
+
+
+ +

Class that provides a driver interface for a MCP3421 sensor. + More...

+ +

#include <WipperSnapper_I2C_Driver_MCP3421.h>

+
+Inheritance diagram for WipperSnapper_I2C_Driver_MCP3421:
+
+
+ + +WipperSnapper_I2C_Driver + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WipperSnapper_I2C_Driver_MCP3421 (TwoWire *i2c, uint16_t sensorAddress)
 Constructor for the MCP3421 sensor. More...
 
~WipperSnapper_I2C_Driver_MCP3421 ()
 Destructor for an MCP3421 sensor.
 
bool begin ()
 Initializes the MCP3421 sensor and begins I2C. More...
 
bool configureSensor ()
 Configures the MCP3421 sensor. More...
 
bool getEventRaw (sensors_event_t *rawEvent)
 Reads the ADC sensor with short wait for data. More...
 
- Public Member Functions inherited from WipperSnapper_I2C_Driver
 WipperSnapper_I2C_Driver (TwoWire *i2c, uint16_t sensorAddress)
 Instanciates an I2C sensor. More...
 
+virtual ~WipperSnapper_I2C_Driver ()
 Destructor for an I2C sensor.
 
bool begin ()
 Initializes the I2C sensor and begins I2C. More...
 
void setSensorPeriod (float period, wippersnapper_i2c_v1_SensorType sensorType)
 Sets the sensor's period, provided a wippersnapper_i2c_v1_SensorType. More...
 
void configureDriver (wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)
 Uses an I2CDeviceInitRequest message to configure the sensors belonging to the driver. More...
 
uint16_t getI2CAddress ()
 Gets the I2C device's address. More...
 
virtual long getSensorCO2Period ()
 Base implementation - Returns the co2 sensor's period, if set. More...
 
virtual long getSensorCO2PeriodPrv ()
 Base implementation - Returns the previous time interval at which the co2 sensor was queried last. More...
 
virtual void setSensorCO2PeriodPrv (long period)
 Sets a timestamp for when the co2 sensor was queried. More...
 
virtual bool getEventCO2 (sensors_event_t *co2Event)
 Gets a sensor's CO2 value. More...
 
virtual long getSensorECO2Period ()
 Base implementation - Returns the eCO2 sensor's period, if set. More...
 
virtual long getSensorECO2PeriodPrv ()
 Base implementation - Returns the previous time interval at which the eCO2 sensor was queried last. More...
 
virtual void setSensorECO2PeriodPrv (long period)
 Sets a timestamp for when the eCO2 sensor was queried. More...
 
virtual bool getEventECO2 (sensors_event_t *eco2Event)
 Gets a sensor's eCO2 value. More...
 
virtual long getSensorTVOCPeriod ()
 Base implementation - Returns the TVOC sensor's period, if set. More...
 
virtual long getSensorTVOCPeriodPrv ()
 Base implementation - Returns the previous time interval at which the TVOC sensor was queried last. More...
 
virtual void setSensorTVOCPeriodPrv (long period)
 Sets a timestamp for when the TVOC sensor was queried. More...
 
virtual bool getEventTVOC (sensors_event_t *tvocEvent)
 Gets a sensor's TVOC value. More...
 
virtual long getSensorAmbientTempPeriod ()
 Base implementation - Returns the ambient temperature (°C) sensor's period, if set. More...
 
virtual long getSensorAmbientTempPeriodPrv ()
 Base implementation - Returns the previous time interval at which the ambient temperature sensor (°C) was queried last. More...
 
virtual void setSensorAmbientTempPeriodPrv (long periodPrv)
 Sets a timestamp for when the ambient temperature sensor (°C) was queried. More...
 
virtual bool getEventAmbientTemp (sensors_event_t *tempEvent)
 Base implementation - Reads an ambient temperature sensor (°C). Expects value to return in the proper SI unit. More...
 
virtual long getSensorRelativeHumidityPeriod ()
 Base implementation - Returns the humidity sensor's period, if set. More...
 
virtual long getSensorRelativeHumidityPeriodPrv ()
 Base implementation - Returns the previous time interval at which the humidity sensor was queried last. More...
 
virtual void setSensorRelativeHumidityPeriodPrv (long periodPrv)
 Sets a timestamp for when the temperature sensor was queried. More...
 
virtual bool getEventRelativeHumidity (sensors_event_t *humidEvent)
 Base implementation - Reads a humidity sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPressurePeriod ()
 Base implementation - Returns the pressure sensor's period, if set. More...
 
virtual long getSensorPressurePeriodPrv ()
 Base implementation - Returns the previous time interval at which the pressure sensor was queried last. More...
 
virtual void setSensorPressurePeriodPrv (long period)
 Sets a timestamp for when the pressure sensor was queried. More...
 
virtual bool getEventPressure (sensors_event_t *pressureEvent)
 Base implementation - Reads a pressure sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorAltitudePeriod ()
 Base implementation - Returns the Altitude sensor's period, if set. More...
 
virtual long getSensorAltitudePeriodPrv ()
 Base implementation - Returns the previous time interval at which the Altitude sensor was queried last. More...
 
virtual void setSensorAltitudePeriodPrv (long period)
 Sets a timestamp for when the Altitude sensor was queried. More...
 
virtual bool getEventAltitude (sensors_event_t *altitudeEvent)
 Base implementation - Reads a Altitude sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorObjectTempPeriod ()
 Base implementation - Returns the object temperature sensor's period, if set. More...
 
virtual long getSensorObjectTempPeriodPrv ()
 Base implementation - Returns the previous time interval at which the object temperature sensor was queried last. More...
 
virtual void setSensorObjectTempPeriodPrv (long period)
 Sets a timestamp for when the object temperature sensor was queried. More...
 
virtual bool getEventObjectTemp (sensors_event_t *objectTempEvent)
 Base implementation - Reads a object temperature sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorLightPeriod ()
 Base implementation - Returns the object light sensor's period, if set. More...
 
virtual long getSensorLightPeriodPrv ()
 Base implementation - Returns the previous time interval at which the light sensor was queried last. More...
 
virtual void setSensorLightPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventLight (sensors_event_t *lightEvent)
 Base implementation - Reads a object light sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM10_STDPeriod ()
 Base implementation - Returns the object pm10 standard sensors' period, if set. More...
 
virtual long getSensorPM10_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm10 std. sensor was queried last. More...
 
virtual void setSensorPM10_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM10_STD (sensors_event_t *pm10StdEvent)
 Base implementation - Reads a object pm10 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM25_STDPeriod ()
 Base implementation - Returns the object pm25 standard sensors' period, if set. More...
 
virtual long getSensorPM25_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm25 std. sensor was queried last. More...
 
virtual void setSensorPM25_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM25_STD (sensors_event_t *pm25StdEvent)
 Base implementation - Reads a object pm25 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM100_STDPeriod ()
 Base implementation - Returns the object pm100 standard sensors' period, if set. More...
 
virtual long getSensorPM100_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm100 std. sensor was queried last. More...
 
virtual void setSensorPM100_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM100_STD (sensors_event_t *pm100StdEvent)
 Base implementation - Reads a object pm100 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorUnitlessPercentPeriod ()
 Base implementation - Returns the object unitless % sensor period, if set. More...
 
virtual long getSensorUnitlessPercentPeriodPrv ()
 Base implementation - Returns the previous time interval at which the unitless % sensor was queried last. More...
 
virtual void setSensorUnitlessPercentPeriodPrv (long period)
 Sets a timestamp for when the unitless % sensor was queried. More...
 
virtual bool getEventUnitlessPercent (sensors_event_t *unitlessPercentEvent)
 Base implementation - Reads a object unitless % std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorVoltagePeriod ()
 Base implementation - Returns the voltage sensor's period. More...
 
virtual long getSensorVoltagePeriodPrv ()
 Base implementation - Returns the previous time interval at which the voltage sensor was queried last. More...
 
virtual void setSensorVoltagePeriodPrv (long period)
 Sets a timestamp for when the voltage sensor was queried. More...
 
virtual bool getEventVoltage (sensors_event_t *voltageEvent)
 Base implementation - Reads a voltage sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorCurrentPeriod ()
 Base implementation - Returns the current sensor's period. More...
 
virtual long getSensorCurrentPeriodPrv ()
 Base implementation - Returns the previous time interval at which the current sensor was queried last. More...
 
virtual void setSensorCurrentPeriodPrv (long period)
 Sets a timestamp for when the current sensor was queried. More...
 
virtual bool getEventCurrent (sensors_event_t *currentEvent)
 Base implementation - Reads a current sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorRawPeriod ()
 Base implementation - Returns the raw sensor's period, if set. More...
 
virtual long getSensorRawPeriodPrv ()
 Base implementation - Returns the previous time interval at which the raw sensor was queried last. More...
 
virtual void setSensorRawPeriodPrv (long period)
 Sets a timestamp for when the raw sensor was queried. More...
 
+virtual void disableAmbientTempF ()
 Disables the device's ambient temperature (°F) sensor, if it exists.
 
virtual long getSensorAmbientTempFPeriod ()
 Base implementation - Returns the ambient temperature (°F) sensor's period, if set. More...
 
virtual long getSensorAmbientTempFPeriodPrv ()
 Base implementation - Returns the previous time interval at which the ambient temperature sensor (°F) was queried last. More...
 
virtual void setSensorAmbientTempFPeriodPrv (long period)
 Sets a timestamp for when the ambient temperature sensor (°F) was queried. More...
 
virtual bool getEventAmbientTempF (sensors_event_t *AmbientTempFEvent)
 Helper function to obtain a sensor's ambient temperature value in °F. Requires getEventAmbientTemp() to be fully implemented by a driver. More...
 
virtual long getSensorObjectTempFPeriod ()
 Base implementation - Returns the object temperature (°F) sensor's period, if set. More...
 
virtual long getSensorObjectTempFPeriodPrv ()
 Base implementation - Returns the previous time interval at which the object temperature sensor (°F) was queried last. More...
 
virtual void setSensorObjectTempFPeriodPrv (long period)
 Sets a timestamp for when the object temperature sensor (°F) was queried. More...
 
virtual bool getEventObjectTempF (sensors_event_t *objectTempFEvent)
 Helper function to obtain a sensor's object temperature value in °F. Requires getEventObjectTemp() to be fully implemented by a driver. More...
 
virtual long getSensorGasResistancePeriod ()
 Base implementation - Returns the gas resistance (ohms) sensor's period, if set. More...
 
virtual long getSensorGasResistancePeriodPrv ()
 Base implementation - Returns the previous time interval at which the gas resistance sensor (ohms) was queried last. More...
 
virtual void setSensorGasResistancePeriodPrv (long period)
 Sets a timestamp for when the object gas resistance sensor was queried. More...
 
virtual bool getEventGasResistance (sensors_event_t *gasEvent)
 Base implementation - Reads a gas resistance sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorNOxIndexPeriod ()
 Base implementation - Returns the NOx Index sensor's period, if set. More...
 
virtual long getSensorNOxIndexPeriodPrv ()
 Base implementation - Returns the previous time interval at which the NOx Index sensor was queried last. More...
 
virtual void setSensorNOxIndexPeriodPrv (long period)
 Sets a timestamp for when the object NOx Index sensor was queried. More...
 
virtual bool getEventNOxIndex (sensors_event_t *gasEvent)
 Base implementation - Reads a NOx Index sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorVOCIndexPeriod ()
 Base implementation - Returns the VOC Index sensor's period, if set. More...
 
virtual long getSensorVOCIndexPeriodPrv ()
 Base implementation - Returns the previous time interval at which the VOC Index sensor was queried last. More...
 
virtual void setSensorVOCIndexPeriodPrv (long period)
 Sets a timestamp for when the object VOC Index sensor was queried. More...
 
virtual bool getEventVOCIndex (sensors_event_t *gasEvent)
 Base implementation - Reads a VOC Index sensor and converts the reading into the expected SI unit. More...
 
+virtual void enableSensorProximity ()
 Enables the device's proximity sensor, if it exists.
 
+virtual void disableSensorProximity ()
 Disables the device's object proximity sensor, if it exists.
 
virtual long sensorProximityPeriod ()
 Base implementation - Returns the proximity sensor's period, if set. More...
 
virtual void setSensorProximityPeriod (long period)
 Set the proximity sensor's return frequency. More...
 
virtual long SensorProximityPeriodPrv ()
 Base implementation - Returns the previous time interval at which the proximity sensor was queried last. More...
 
virtual void setSensorProximityPeriodPrv (long period)
 Sets a timestamp for when the proximity sensor was queried. More...
 
virtual bool getEventProximity (sensors_event_t *proximityEvent)
 Base implementation - Reads a proximity sensor and converts the reading into the expected SI unit. More...
 
virtual void updateSensorProximity (float period)
 Updates the properties of a proximity sensor. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Attributes

+Adafruit_MCP3421 * _mcp3421
 Pointer to MCP3421 sensor object.
 
- Protected Attributes inherited from WipperSnapper_I2C_Driver
+TwoWire * _i2c
 Pointer to the I2C driver's Wire object.
 
+uint16_t _sensorAddress
 The I2C driver's unique I2C address.
 
long _tempSensorPeriod
 The time period between reading the temperature sensor's value. More...
 
long _tempSensorPeriodPrv
 
long _humidSensorPeriod
 The time period between reading the humidity sensor's value. More...
 
long _humidSensorPeriodPrv
 
long _pressureSensorPeriod
 The time period between reading the pressure sensor's value. More...
 
long _pressureSensorPeriodPrv
 
long _CO2SensorPeriod
 The time period between reading the CO2 sensor's value. More...
 
long _CO2SensorPeriodPrv
 The time when the CO2 sensor was last read. More...
 
long _ECO2SensorPeriod
 The time period between reading the eCO2 sensor's value. More...
 
long _ECO2SensorPeriodPrv
 The time when the eCO2 sensor was last read. More...
 
long _TVOCSensorPeriod
 The time period between reading the TVOC sensor's value. More...
 
long _TVOCSensorPeriodPrv
 The time when the TVOC sensor was last read. More...
 
long _altitudeSensorPeriod
 The time period between reading the altitude sensor's value. More...
 
long _altitudeSensorPeriodPrv
 
long _objectTempSensorPeriod = 0L
 
long _objectTempSensorPeriodPrv
 
long _lightSensorPeriod
 The time period between reading the light sensor's value. More...
 
long _lightSensorPeriodPrv
 
long _PM10SensorPeriod
 The time period between reading the pm25 sensor's value. More...
 
long _PM10SensorPeriodPrv
 The time when the pm25 sensor was last read. More...
 
long _PM25SensorPeriod
 The time period between reading the pm25 sensor's value. More...
 
long _PM25SensorPeriodPrv
 The time when the pm25 sensor was last read. More...
 
long _PM100SensorPeriod
 The time period between reading the pm100_std sensor's value. More...
 
long _PM100SensorPeriodPrv
 
long _unitlessPercentPeriod
 The time period between reading the unitless % sensor's value. More...
 
long _unitlessPercentPeriodPrv
 
long _voltagePeriod
 The time period between reading the voltage sensor's value. More...
 
long _voltagePeriodPrv
 
long _currentPeriod
 The time period between reading the current sensor's value. More...
 
long _currentPeriodPrv
 
long _rawSensorPeriod
 The time period between reading the Raw sensor's value. More...
 
long _rawSensorPeriodPrv
 The time when the Raw sensor was last read. More...
 
long _ambientTempFPeriod = 0L
 
long _ambientTempFPeriodPrv
 
long _objectTempFPeriod = 0L
 
long _objectTempFPeriodPrv
 
long _gasResistancePeriod = 0L
 
long _gasResistancePeriodPrv
 
long _NOxIndexPeriod
 The time period between reading the NOx Index sensor's value. More...
 
long _NOxIndexPeriodPrv
 
long _VOCIndexPeriod
 The time period between reading the VOC Index sensor's value. More...
 
long _VOCIndexPeriodPrv
 
long _proximitySensorPeriod
 The time period between reading the proximity sensor's value. More...
 
long _proximitySensorPeriodPrv
 
+

Detailed Description

+

Class that provides a driver interface for a MCP3421 sensor.

+

Constructor & Destructor Documentation

+ +

◆ WipperSnapper_I2C_Driver_MCP3421()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
WipperSnapper_I2C_Driver_MCP3421::WipperSnapper_I2C_Driver_MCP3421 (TwoWire * i2c,
uint16_t sensorAddress 
)
+
+inline
+
+ +

Constructor for the MCP3421 sensor.

+
Parameters
+ + + +
i2cThe I2C interface.
sensorAddress7-bit device address.
+
+
+ +
+
+

Member Function Documentation

+ +

◆ begin()

+ +
+
+ + + + + +
+ + + + + + + +
bool WipperSnapper_I2C_Driver_MCP3421::begin ()
+
+inline
+
+ +

Initializes the MCP3421 sensor and begins I2C.

+
Returns
True if initialized successfully, False otherwise.
+ +
+
+ +

◆ configureSensor()

+ +
+
+ + + + + +
+ + + + + + + +
bool WipperSnapper_I2C_Driver_MCP3421::configureSensor ()
+
+inline
+
+ +

Configures the MCP3421 sensor.

+
Returns
True if the sensor was configured successfully, False otherwise.
+ +
+
+ +

◆ getEventRaw()

+ +
+
+ + + + + +
+ + + + + + + + +
bool WipperSnapper_I2C_Driver_MCP3421::getEventRaw (sensors_event_t * rawEvent)
+
+inlinevirtual
+
+ +

Reads the ADC sensor with short wait for data.

+
Parameters
+ + +
rawEventADC sensor reading
+
+
+
Returns
True if the sensor event was obtained successfully, False otherwise.
+ +

Reimplemented from WipperSnapper_I2C_Driver.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/html/class_wipper_snapper___i2_c___driver___m_c_p3421.png b/html/class_wipper_snapper___i2_c___driver___m_c_p3421.png new file mode 100644 index 000000000..07a98b364 Binary files /dev/null and b/html/class_wipper_snapper___i2_c___driver___m_c_p3421.png differ diff --git a/html/class_wipper_snapper___i2_c___driver___n_a_u7802-members.html b/html/class_wipper_snapper___i2_c___driver___n_a_u7802-members.html new file mode 100644 index 000000000..427c63492 --- /dev/null +++ b/html/class_wipper_snapper___i2_c___driver___n_a_u7802-members.html @@ -0,0 +1,226 @@ + + + + + + + +Adafruit Library: Member List + + + + + + + + + +
+
+ + + + + + +
+
Adafruit Library +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
WipperSnapper_I2C_Driver_NAU7802 Member List
+
+
+ +

This is the complete list of members for WipperSnapper_I2C_Driver_NAU7802, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_altitudeSensorPeriodWipperSnapper_I2C_Driverprotected
_altitudeSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_ambientTempFPeriodWipperSnapper_I2C_Driverprotected
_ambientTempFPeriodPrvWipperSnapper_I2C_Driverprotected
_CO2SensorPeriodWipperSnapper_I2C_Driverprotected
_CO2SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_currentPeriodWipperSnapper_I2C_Driverprotected
_currentPeriodPrvWipperSnapper_I2C_Driverprotected
_ECO2SensorPeriodWipperSnapper_I2C_Driverprotected
_ECO2SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_gasResistancePeriodWipperSnapper_I2C_Driverprotected
_gasResistancePeriodPrvWipperSnapper_I2C_Driverprotected
_humidSensorPeriodWipperSnapper_I2C_Driverprotected
_humidSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_i2cWipperSnapper_I2C_Driverprotected
_lightSensorPeriodWipperSnapper_I2C_Driverprotected
_lightSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_nau7802WipperSnapper_I2C_Driver_NAU7802protected
_NOxIndexPeriodWipperSnapper_I2C_Driverprotected
_NOxIndexPeriodPrvWipperSnapper_I2C_Driverprotected
_objectTempFPeriodWipperSnapper_I2C_Driverprotected
_objectTempFPeriodPrvWipperSnapper_I2C_Driverprotected
_objectTempSensorPeriodWipperSnapper_I2C_Driverprotected
_objectTempSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM100SensorPeriodWipperSnapper_I2C_Driverprotected
_PM100SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM10SensorPeriodWipperSnapper_I2C_Driverprotected
_PM10SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM25SensorPeriodWipperSnapper_I2C_Driverprotected
_PM25SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_pressureSensorPeriodWipperSnapper_I2C_Driverprotected
_pressureSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_proximitySensorPeriodWipperSnapper_I2C_Driverprotected
_proximitySensorPeriodPrvWipperSnapper_I2C_Driverprotected
_rawSensorPeriodWipperSnapper_I2C_Driverprotected
_rawSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_sensorAddressWipperSnapper_I2C_Driverprotected
_tempSensorPeriodWipperSnapper_I2C_Driverprotected
_tempSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_TVOCSensorPeriodWipperSnapper_I2C_Driverprotected
_TVOCSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_unitlessPercentPeriodWipperSnapper_I2C_Driverprotected
_unitlessPercentPeriodPrvWipperSnapper_I2C_Driverprotected
_VOCIndexPeriodWipperSnapper_I2C_Driverprotected
_VOCIndexPeriodPrvWipperSnapper_I2C_Driverprotected
_voltagePeriodWipperSnapper_I2C_Driverprotected
_voltagePeriodPrvWipperSnapper_I2C_Driverprotected
begin()WipperSnapper_I2C_Driver_NAU7802inline
configure_nau7802()WipperSnapper_I2C_Driver_NAU7802inline
configureDriver(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)WipperSnapper_I2C_Driverinline
disableAmbientTempF()WipperSnapper_I2C_Driverinlinevirtual
disableSensorProximity()WipperSnapper_I2C_Driverinlinevirtual
enableSensorProximity()WipperSnapper_I2C_Driverinlinevirtual
flushNAU7802(uint8_t count)WipperSnapper_I2C_Driver_NAU7802inline
getEventAltitude(sensors_event_t *altitudeEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventAmbientTemp(sensors_event_t *tempEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventAmbientTempF(sensors_event_t *AmbientTempFEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventCO2(sensors_event_t *co2Event)WipperSnapper_I2C_Driverinlinevirtual
getEventCurrent(sensors_event_t *currentEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventECO2(sensors_event_t *eco2Event)WipperSnapper_I2C_Driverinlinevirtual
getEventGasResistance(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventLight(sensors_event_t *lightEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventNOxIndex(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventObjectTemp(sensors_event_t *objectTempEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventObjectTempF(sensors_event_t *objectTempFEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM100_STD(sensors_event_t *pm100StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM10_STD(sensors_event_t *pm10StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM25_STD(sensors_event_t *pm25StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPressure(sensors_event_t *pressureEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventProximity(sensors_event_t *proximityEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventRaw(sensors_event_t *rawEvent)WipperSnapper_I2C_Driver_NAU7802inlinevirtual
getEventRelativeHumidity(sensors_event_t *humidEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventTVOC(sensors_event_t *tvocEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventUnitlessPercent(sensors_event_t *unitlessPercentEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventVOCIndex(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventVoltage(sensors_event_t *voltageEvent)WipperSnapper_I2C_Driverinlinevirtual
getI2CAddress()WipperSnapper_I2C_Driverinline
getSensorAltitudePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAltitudePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempFPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempFPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorCO2Period()WipperSnapper_I2C_Driverinlinevirtual
getSensorCO2PeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorCurrentPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorCurrentPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorECO2Period()WipperSnapper_I2C_Driverinlinevirtual
getSensorECO2PeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorGasResistancePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorGasResistancePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorLightPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorLightPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorNOxIndexPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorNOxIndexPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempFPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempFPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM100_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM100_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM10_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM10_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM25_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM25_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPressurePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPressurePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorRawPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorRawPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorRelativeHumidityPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorRelativeHumidityPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorTVOCPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorTVOCPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorUnitlessPercentPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorUnitlessPercentPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorVOCIndexPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorVOCIndexPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorVoltagePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorVoltagePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
sensorProximityPeriod()WipperSnapper_I2C_Driverinlinevirtual
SensorProximityPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
setSensorAltitudePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorAmbientTempFPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorAmbientTempPeriodPrv(long periodPrv)WipperSnapper_I2C_Driverinlinevirtual
setSensorCO2PeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorCurrentPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorECO2PeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorGasResistancePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorLightPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorNOxIndexPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorObjectTempFPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorObjectTempPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPeriod(float period, wippersnapper_i2c_v1_SensorType sensorType)WipperSnapper_I2C_Driverinline
setSensorPM100_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPM10_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPM25_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPressurePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorProximityPeriod(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorProximityPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorRawPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorRelativeHumidityPeriodPrv(long periodPrv)WipperSnapper_I2C_Driverinlinevirtual
setSensorTVOCPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorUnitlessPercentPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorVOCIndexPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorVoltagePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
updateSensorProximity(float period)WipperSnapper_I2C_Driverinlinevirtual
WipperSnapper_I2C_Driver(TwoWire *i2c, uint16_t sensorAddress)WipperSnapper_I2C_Driverinline
WipperSnapper_I2C_Driver_NAU7802(TwoWire *i2c, uint16_t sensorAddress)WipperSnapper_I2C_Driver_NAU7802inline
~WipperSnapper_I2C_Driver()WipperSnapper_I2C_Driverinlinevirtual
~WipperSnapper_I2C_Driver_NAU7802()WipperSnapper_I2C_Driver_NAU7802inline
+ + + + diff --git a/html/class_wipper_snapper___i2_c___driver___n_a_u7802.html b/html/class_wipper_snapper___i2_c___driver___n_a_u7802.html new file mode 100644 index 000000000..269671e57 --- /dev/null +++ b/html/class_wipper_snapper___i2_c___driver___n_a_u7802.html @@ -0,0 +1,720 @@ + + + + + + + +Adafruit Library: WipperSnapper_I2C_Driver_NAU7802 Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Adafruit Library +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
WipperSnapper_I2C_Driver_NAU7802 Class Reference
+
+
+ +

Class that provides a driver interface for the NAU7802. + More...

+ +

#include <WipperSnapper_I2C_Driver_NAU7802.h>

+
+Inheritance diagram for WipperSnapper_I2C_Driver_NAU7802:
+
+
+ + +WipperSnapper_I2C_Driver + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WipperSnapper_I2C_Driver_NAU7802 (TwoWire *i2c, uint16_t sensorAddress)
 Constructor for an NAU7802. More...
 
~WipperSnapper_I2C_Driver_NAU7802 ()
 Destructor for an NAU7802.
 
bool begin ()
 Initializes the NAU7802 sensor and begins I2C. More...
 
bool configure_nau7802 ()
 Configures the NAU7802 sensor. More...
 
void flushNAU7802 (uint8_t count)
 Gets datapoints from sensor and discards (flushes old data). More...
 
bool getEventRaw (sensors_event_t *rawEvent)
 Gets the sensor's raw "force" value. More...
 
- Public Member Functions inherited from WipperSnapper_I2C_Driver
 WipperSnapper_I2C_Driver (TwoWire *i2c, uint16_t sensorAddress)
 Instanciates an I2C sensor. More...
 
+virtual ~WipperSnapper_I2C_Driver ()
 Destructor for an I2C sensor.
 
bool begin ()
 Initializes the I2C sensor and begins I2C. More...
 
void setSensorPeriod (float period, wippersnapper_i2c_v1_SensorType sensorType)
 Sets the sensor's period, provided a wippersnapper_i2c_v1_SensorType. More...
 
void configureDriver (wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)
 Uses an I2CDeviceInitRequest message to configure the sensors belonging to the driver. More...
 
uint16_t getI2CAddress ()
 Gets the I2C device's address. More...
 
virtual long getSensorCO2Period ()
 Base implementation - Returns the co2 sensor's period, if set. More...
 
virtual long getSensorCO2PeriodPrv ()
 Base implementation - Returns the previous time interval at which the co2 sensor was queried last. More...
 
virtual void setSensorCO2PeriodPrv (long period)
 Sets a timestamp for when the co2 sensor was queried. More...
 
virtual bool getEventCO2 (sensors_event_t *co2Event)
 Gets a sensor's CO2 value. More...
 
virtual long getSensorECO2Period ()
 Base implementation - Returns the eCO2 sensor's period, if set. More...
 
virtual long getSensorECO2PeriodPrv ()
 Base implementation - Returns the previous time interval at which the eCO2 sensor was queried last. More...
 
virtual void setSensorECO2PeriodPrv (long period)
 Sets a timestamp for when the eCO2 sensor was queried. More...
 
virtual bool getEventECO2 (sensors_event_t *eco2Event)
 Gets a sensor's eCO2 value. More...
 
virtual long getSensorTVOCPeriod ()
 Base implementation - Returns the TVOC sensor's period, if set. More...
 
virtual long getSensorTVOCPeriodPrv ()
 Base implementation - Returns the previous time interval at which the TVOC sensor was queried last. More...
 
virtual void setSensorTVOCPeriodPrv (long period)
 Sets a timestamp for when the TVOC sensor was queried. More...
 
virtual bool getEventTVOC (sensors_event_t *tvocEvent)
 Gets a sensor's TVOC value. More...
 
virtual long getSensorAmbientTempPeriod ()
 Base implementation - Returns the ambient temperature (°C) sensor's period, if set. More...
 
virtual long getSensorAmbientTempPeriodPrv ()
 Base implementation - Returns the previous time interval at which the ambient temperature sensor (°C) was queried last. More...
 
virtual void setSensorAmbientTempPeriodPrv (long periodPrv)
 Sets a timestamp for when the ambient temperature sensor (°C) was queried. More...
 
virtual bool getEventAmbientTemp (sensors_event_t *tempEvent)
 Base implementation - Reads an ambient temperature sensor (°C). Expects value to return in the proper SI unit. More...
 
virtual long getSensorRelativeHumidityPeriod ()
 Base implementation - Returns the humidity sensor's period, if set. More...
 
virtual long getSensorRelativeHumidityPeriodPrv ()
 Base implementation - Returns the previous time interval at which the humidity sensor was queried last. More...
 
virtual void setSensorRelativeHumidityPeriodPrv (long periodPrv)
 Sets a timestamp for when the temperature sensor was queried. More...
 
virtual bool getEventRelativeHumidity (sensors_event_t *humidEvent)
 Base implementation - Reads a humidity sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPressurePeriod ()
 Base implementation - Returns the pressure sensor's period, if set. More...
 
virtual long getSensorPressurePeriodPrv ()
 Base implementation - Returns the previous time interval at which the pressure sensor was queried last. More...
 
virtual void setSensorPressurePeriodPrv (long period)
 Sets a timestamp for when the pressure sensor was queried. More...
 
virtual bool getEventPressure (sensors_event_t *pressureEvent)
 Base implementation - Reads a pressure sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorAltitudePeriod ()
 Base implementation - Returns the Altitude sensor's period, if set. More...
 
virtual long getSensorAltitudePeriodPrv ()
 Base implementation - Returns the previous time interval at which the Altitude sensor was queried last. More...
 
virtual void setSensorAltitudePeriodPrv (long period)
 Sets a timestamp for when the Altitude sensor was queried. More...
 
virtual bool getEventAltitude (sensors_event_t *altitudeEvent)
 Base implementation - Reads a Altitude sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorObjectTempPeriod ()
 Base implementation - Returns the object temperature sensor's period, if set. More...
 
virtual long getSensorObjectTempPeriodPrv ()
 Base implementation - Returns the previous time interval at which the object temperature sensor was queried last. More...
 
virtual void setSensorObjectTempPeriodPrv (long period)
 Sets a timestamp for when the object temperature sensor was queried. More...
 
virtual bool getEventObjectTemp (sensors_event_t *objectTempEvent)
 Base implementation - Reads a object temperature sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorLightPeriod ()
 Base implementation - Returns the object light sensor's period, if set. More...
 
virtual long getSensorLightPeriodPrv ()
 Base implementation - Returns the previous time interval at which the light sensor was queried last. More...
 
virtual void setSensorLightPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventLight (sensors_event_t *lightEvent)
 Base implementation - Reads a object light sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM10_STDPeriod ()
 Base implementation - Returns the object pm10 standard sensors' period, if set. More...
 
virtual long getSensorPM10_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm10 std. sensor was queried last. More...
 
virtual void setSensorPM10_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM10_STD (sensors_event_t *pm10StdEvent)
 Base implementation - Reads a object pm10 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM25_STDPeriod ()
 Base implementation - Returns the object pm25 standard sensors' period, if set. More...
 
virtual long getSensorPM25_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm25 std. sensor was queried last. More...
 
virtual void setSensorPM25_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM25_STD (sensors_event_t *pm25StdEvent)
 Base implementation - Reads a object pm25 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM100_STDPeriod ()
 Base implementation - Returns the object pm100 standard sensors' period, if set. More...
 
virtual long getSensorPM100_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm100 std. sensor was queried last. More...
 
virtual void setSensorPM100_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM100_STD (sensors_event_t *pm100StdEvent)
 Base implementation - Reads a object pm100 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorUnitlessPercentPeriod ()
 Base implementation - Returns the object unitless % sensor period, if set. More...
 
virtual long getSensorUnitlessPercentPeriodPrv ()
 Base implementation - Returns the previous time interval at which the unitless % sensor was queried last. More...
 
virtual void setSensorUnitlessPercentPeriodPrv (long period)
 Sets a timestamp for when the unitless % sensor was queried. More...
 
virtual bool getEventUnitlessPercent (sensors_event_t *unitlessPercentEvent)
 Base implementation - Reads a object unitless % std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorVoltagePeriod ()
 Base implementation - Returns the voltage sensor's period. More...
 
virtual long getSensorVoltagePeriodPrv ()
 Base implementation - Returns the previous time interval at which the voltage sensor was queried last. More...
 
virtual void setSensorVoltagePeriodPrv (long period)
 Sets a timestamp for when the voltage sensor was queried. More...
 
virtual bool getEventVoltage (sensors_event_t *voltageEvent)
 Base implementation - Reads a voltage sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorCurrentPeriod ()
 Base implementation - Returns the current sensor's period. More...
 
virtual long getSensorCurrentPeriodPrv ()
 Base implementation - Returns the previous time interval at which the current sensor was queried last. More...
 
virtual void setSensorCurrentPeriodPrv (long period)
 Sets a timestamp for when the current sensor was queried. More...
 
virtual bool getEventCurrent (sensors_event_t *currentEvent)
 Base implementation - Reads a current sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorRawPeriod ()
 Base implementation - Returns the raw sensor's period, if set. More...
 
virtual long getSensorRawPeriodPrv ()
 Base implementation - Returns the previous time interval at which the raw sensor was queried last. More...
 
virtual void setSensorRawPeriodPrv (long period)
 Sets a timestamp for when the raw sensor was queried. More...
 
+virtual void disableAmbientTempF ()
 Disables the device's ambient temperature (°F) sensor, if it exists.
 
virtual long getSensorAmbientTempFPeriod ()
 Base implementation - Returns the ambient temperature (°F) sensor's period, if set. More...
 
virtual long getSensorAmbientTempFPeriodPrv ()
 Base implementation - Returns the previous time interval at which the ambient temperature sensor (°F) was queried last. More...
 
virtual void setSensorAmbientTempFPeriodPrv (long period)
 Sets a timestamp for when the ambient temperature sensor (°F) was queried. More...
 
virtual bool getEventAmbientTempF (sensors_event_t *AmbientTempFEvent)
 Helper function to obtain a sensor's ambient temperature value in °F. Requires getEventAmbientTemp() to be fully implemented by a driver. More...
 
virtual long getSensorObjectTempFPeriod ()
 Base implementation - Returns the object temperature (°F) sensor's period, if set. More...
 
virtual long getSensorObjectTempFPeriodPrv ()
 Base implementation - Returns the previous time interval at which the object temperature sensor (°F) was queried last. More...
 
virtual void setSensorObjectTempFPeriodPrv (long period)
 Sets a timestamp for when the object temperature sensor (°F) was queried. More...
 
virtual bool getEventObjectTempF (sensors_event_t *objectTempFEvent)
 Helper function to obtain a sensor's object temperature value in °F. Requires getEventObjectTemp() to be fully implemented by a driver. More...
 
virtual long getSensorGasResistancePeriod ()
 Base implementation - Returns the gas resistance (ohms) sensor's period, if set. More...
 
virtual long getSensorGasResistancePeriodPrv ()
 Base implementation - Returns the previous time interval at which the gas resistance sensor (ohms) was queried last. More...
 
virtual void setSensorGasResistancePeriodPrv (long period)
 Sets a timestamp for when the object gas resistance sensor was queried. More...
 
virtual bool getEventGasResistance (sensors_event_t *gasEvent)
 Base implementation - Reads a gas resistance sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorNOxIndexPeriod ()
 Base implementation - Returns the NOx Index sensor's period, if set. More...
 
virtual long getSensorNOxIndexPeriodPrv ()
 Base implementation - Returns the previous time interval at which the NOx Index sensor was queried last. More...
 
virtual void setSensorNOxIndexPeriodPrv (long period)
 Sets a timestamp for when the object NOx Index sensor was queried. More...
 
virtual bool getEventNOxIndex (sensors_event_t *gasEvent)
 Base implementation - Reads a NOx Index sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorVOCIndexPeriod ()
 Base implementation - Returns the VOC Index sensor's period, if set. More...
 
virtual long getSensorVOCIndexPeriodPrv ()
 Base implementation - Returns the previous time interval at which the VOC Index sensor was queried last. More...
 
virtual void setSensorVOCIndexPeriodPrv (long period)
 Sets a timestamp for when the object VOC Index sensor was queried. More...
 
virtual bool getEventVOCIndex (sensors_event_t *gasEvent)
 Base implementation - Reads a VOC Index sensor and converts the reading into the expected SI unit. More...
 
+virtual void enableSensorProximity ()
 Enables the device's proximity sensor, if it exists.
 
+virtual void disableSensorProximity ()
 Disables the device's object proximity sensor, if it exists.
 
virtual long sensorProximityPeriod ()
 Base implementation - Returns the proximity sensor's period, if set. More...
 
virtual void setSensorProximityPeriod (long period)
 Set the proximity sensor's return frequency. More...
 
virtual long SensorProximityPeriodPrv ()
 Base implementation - Returns the previous time interval at which the proximity sensor was queried last. More...
 
virtual void setSensorProximityPeriodPrv (long period)
 Sets a timestamp for when the proximity sensor was queried. More...
 
virtual bool getEventProximity (sensors_event_t *proximityEvent)
 Base implementation - Reads a proximity sensor and converts the reading into the expected SI unit. More...
 
virtual void updateSensorProximity (float period)
 Updates the properties of a proximity sensor. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Attributes

+Adafruit_NAU7802 * _nau7802 = nullptr
 NAU7802 object.
 
- Protected Attributes inherited from WipperSnapper_I2C_Driver
+TwoWire * _i2c
 Pointer to the I2C driver's Wire object.
 
+uint16_t _sensorAddress
 The I2C driver's unique I2C address.
 
long _tempSensorPeriod
 The time period between reading the temperature sensor's value. More...
 
long _tempSensorPeriodPrv
 
long _humidSensorPeriod
 The time period between reading the humidity sensor's value. More...
 
long _humidSensorPeriodPrv
 
long _pressureSensorPeriod
 The time period between reading the pressure sensor's value. More...
 
long _pressureSensorPeriodPrv
 
long _CO2SensorPeriod
 The time period between reading the CO2 sensor's value. More...
 
long _CO2SensorPeriodPrv
 The time when the CO2 sensor was last read. More...
 
long _ECO2SensorPeriod
 The time period between reading the eCO2 sensor's value. More...
 
long _ECO2SensorPeriodPrv
 The time when the eCO2 sensor was last read. More...
 
long _TVOCSensorPeriod
 The time period between reading the TVOC sensor's value. More...
 
long _TVOCSensorPeriodPrv
 The time when the TVOC sensor was last read. More...
 
long _altitudeSensorPeriod
 The time period between reading the altitude sensor's value. More...
 
long _altitudeSensorPeriodPrv
 
long _objectTempSensorPeriod = 0L
 
long _objectTempSensorPeriodPrv
 
long _lightSensorPeriod
 The time period between reading the light sensor's value. More...
 
long _lightSensorPeriodPrv
 
long _PM10SensorPeriod
 The time period between reading the pm25 sensor's value. More...
 
long _PM10SensorPeriodPrv
 The time when the pm25 sensor was last read. More...
 
long _PM25SensorPeriod
 The time period between reading the pm25 sensor's value. More...
 
long _PM25SensorPeriodPrv
 The time when the pm25 sensor was last read. More...
 
long _PM100SensorPeriod
 The time period between reading the pm100_std sensor's value. More...
 
long _PM100SensorPeriodPrv
 
long _unitlessPercentPeriod
 The time period between reading the unitless % sensor's value. More...
 
long _unitlessPercentPeriodPrv
 
long _voltagePeriod
 The time period between reading the voltage sensor's value. More...
 
long _voltagePeriodPrv
 
long _currentPeriod
 The time period between reading the current sensor's value. More...
 
long _currentPeriodPrv
 
long _rawSensorPeriod
 The time period between reading the Raw sensor's value. More...
 
long _rawSensorPeriodPrv
 The time when the Raw sensor was last read. More...
 
long _ambientTempFPeriod = 0L
 
long _ambientTempFPeriodPrv
 
long _objectTempFPeriod = 0L
 
long _objectTempFPeriodPrv
 
long _gasResistancePeriod = 0L
 
long _gasResistancePeriodPrv
 
long _NOxIndexPeriod
 The time period between reading the NOx Index sensor's value. More...
 
long _NOxIndexPeriodPrv
 
long _VOCIndexPeriod
 The time period between reading the VOC Index sensor's value. More...
 
long _VOCIndexPeriodPrv
 
long _proximitySensorPeriod
 The time period between reading the proximity sensor's value. More...
 
long _proximitySensorPeriodPrv
 
+

Detailed Description

+

Class that provides a driver interface for the NAU7802.

+

Constructor & Destructor Documentation

+ +

◆ WipperSnapper_I2C_Driver_NAU7802()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
WipperSnapper_I2C_Driver_NAU7802::WipperSnapper_I2C_Driver_NAU7802 (TwoWire * i2c,
uint16_t sensorAddress 
)
+
+inline
+
+ +

Constructor for an NAU7802.

+
Parameters
+ + + +
i2cThe I2C interface.
sensorAddress7-bit device address.
+
+
+ +
+
+

Member Function Documentation

+ +

◆ begin()

+ +
+
+ + + + + +
+ + + + + + + +
bool WipperSnapper_I2C_Driver_NAU7802::begin ()
+
+inline
+
+ +

Initializes the NAU7802 sensor and begins I2C.

+
Returns
True if initialized successfully, False otherwise.
+ +
+
+ +

◆ configure_nau7802()

+ +
+
+ + + + + +
+ + + + + + + +
bool WipperSnapper_I2C_Driver_NAU7802::configure_nau7802 ()
+
+inline
+
+ +

Configures the NAU7802 sensor.

+
Returns
True if configured successfully, False otherwise.
+ +
+
+ +

◆ flushNAU7802()

+ +
+
+ + + + + +
+ + + + + + + + +
void WipperSnapper_I2C_Driver_NAU7802::flushNAU7802 (uint8_t count)
+
+inline
+
+ +

Gets datapoints from sensor and discards (flushes old data).

+
Parameters
+ + +
countNumber of readings to discard.
+
+
+ +
+
+ +

◆ getEventRaw()

+ +
+
+ + + + + +
+ + + + + + + + +
bool WipperSnapper_I2C_Driver_NAU7802::getEventRaw (sensors_event_t * rawEvent)
+
+inlinevirtual
+
+ +

Gets the sensor's raw "force" value.

+
Parameters
+ + +
rawEventPointer to an Adafruit_Sensor event.
+
+
+
Returns
True if the reading was obtained successfully, False otherwise.
+ +

Reimplemented from WipperSnapper_I2C_Driver.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/html/class_wipper_snapper___i2_c___driver___n_a_u7802.png b/html/class_wipper_snapper___i2_c___driver___n_a_u7802.png new file mode 100644 index 000000000..ce05fcd22 Binary files /dev/null and b/html/class_wipper_snapper___i2_c___driver___n_a_u7802.png differ diff --git a/html/class_wipper_snapper___i2_c___driver___v_l53_l1_x-members.html b/html/class_wipper_snapper___i2_c___driver___v_l53_l1_x-members.html new file mode 100644 index 000000000..4cd2a37e4 --- /dev/null +++ b/html/class_wipper_snapper___i2_c___driver___v_l53_l1_x-members.html @@ -0,0 +1,224 @@ + + + + + + + +Adafruit Library: Member List + + + + + + + + + +
+
+ + + + + + +
+
Adafruit Library +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
WipperSnapper_I2C_Driver_VL53L1X Member List
+
+
+ +

This is the complete list of members for WipperSnapper_I2C_Driver_VL53L1X, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_altitudeSensorPeriodWipperSnapper_I2C_Driverprotected
_altitudeSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_ambientTempFPeriodWipperSnapper_I2C_Driverprotected
_ambientTempFPeriodPrvWipperSnapper_I2C_Driverprotected
_CO2SensorPeriodWipperSnapper_I2C_Driverprotected
_CO2SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_currentPeriodWipperSnapper_I2C_Driverprotected
_currentPeriodPrvWipperSnapper_I2C_Driverprotected
_ECO2SensorPeriodWipperSnapper_I2C_Driverprotected
_ECO2SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_gasResistancePeriodWipperSnapper_I2C_Driverprotected
_gasResistancePeriodPrvWipperSnapper_I2C_Driverprotected
_humidSensorPeriodWipperSnapper_I2C_Driverprotected
_humidSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_i2cWipperSnapper_I2C_Driverprotected
_lightSensorPeriodWipperSnapper_I2C_Driverprotected
_lightSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_NOxIndexPeriodWipperSnapper_I2C_Driverprotected
_NOxIndexPeriodPrvWipperSnapper_I2C_Driverprotected
_objectTempFPeriodWipperSnapper_I2C_Driverprotected
_objectTempFPeriodPrvWipperSnapper_I2C_Driverprotected
_objectTempSensorPeriodWipperSnapper_I2C_Driverprotected
_objectTempSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM100SensorPeriodWipperSnapper_I2C_Driverprotected
_PM100SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM10SensorPeriodWipperSnapper_I2C_Driverprotected
_PM10SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM25SensorPeriodWipperSnapper_I2C_Driverprotected
_PM25SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_pressureSensorPeriodWipperSnapper_I2C_Driverprotected
_pressureSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_proximitySensorPeriodWipperSnapper_I2C_Driverprotected
_proximitySensorPeriodPrvWipperSnapper_I2C_Driverprotected
_rawSensorPeriodWipperSnapper_I2C_Driverprotected
_rawSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_sensorAddressWipperSnapper_I2C_Driverprotected
_tempSensorPeriodWipperSnapper_I2C_Driverprotected
_tempSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_TVOCSensorPeriodWipperSnapper_I2C_Driverprotected
_TVOCSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_unitlessPercentPeriodWipperSnapper_I2C_Driverprotected
_unitlessPercentPeriodPrvWipperSnapper_I2C_Driverprotected
_VL53L1XWipperSnapper_I2C_Driver_VL53L1Xprotected
_VOCIndexPeriodWipperSnapper_I2C_Driverprotected
_VOCIndexPeriodPrvWipperSnapper_I2C_Driverprotected
_voltagePeriodWipperSnapper_I2C_Driverprotected
_voltagePeriodPrvWipperSnapper_I2C_Driverprotected
begin()WipperSnapper_I2C_Driver_VL53L1Xinline
configureDriver(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)WipperSnapper_I2C_Driverinline
disableAmbientTempF()WipperSnapper_I2C_Driverinlinevirtual
disableSensorProximity()WipperSnapper_I2C_Driverinlinevirtual
enableSensorProximity()WipperSnapper_I2C_Driverinlinevirtual
getEventAltitude(sensors_event_t *altitudeEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventAmbientTemp(sensors_event_t *tempEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventAmbientTempF(sensors_event_t *AmbientTempFEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventCO2(sensors_event_t *co2Event)WipperSnapper_I2C_Driverinlinevirtual
getEventCurrent(sensors_event_t *currentEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventECO2(sensors_event_t *eco2Event)WipperSnapper_I2C_Driverinlinevirtual
getEventGasResistance(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventLight(sensors_event_t *lightEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventNOxIndex(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventObjectTemp(sensors_event_t *objectTempEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventObjectTempF(sensors_event_t *objectTempFEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM100_STD(sensors_event_t *pm100StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM10_STD(sensors_event_t *pm10StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM25_STD(sensors_event_t *pm25StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPressure(sensors_event_t *pressureEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventProximity(sensors_event_t *proximityEvent)WipperSnapper_I2C_Driver_VL53L1Xinlinevirtual
getEventRaw(sensors_event_t *rawEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventRelativeHumidity(sensors_event_t *humidEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventTVOC(sensors_event_t *tvocEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventUnitlessPercent(sensors_event_t *unitlessPercentEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventVOCIndex(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventVoltage(sensors_event_t *voltageEvent)WipperSnapper_I2C_Driverinlinevirtual
getI2CAddress()WipperSnapper_I2C_Driverinline
getSensorAltitudePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAltitudePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempFPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempFPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorCO2Period()WipperSnapper_I2C_Driverinlinevirtual
getSensorCO2PeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorCurrentPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorCurrentPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorECO2Period()WipperSnapper_I2C_Driverinlinevirtual
getSensorECO2PeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorGasResistancePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorGasResistancePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorLightPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorLightPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorNOxIndexPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorNOxIndexPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempFPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempFPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM100_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM100_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM10_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM10_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM25_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM25_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPressurePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPressurePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorRawPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorRawPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorRelativeHumidityPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorRelativeHumidityPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorTVOCPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorTVOCPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorUnitlessPercentPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorUnitlessPercentPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorVOCIndexPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorVOCIndexPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorVoltagePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorVoltagePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
sensorProximityPeriod()WipperSnapper_I2C_Driverinlinevirtual
SensorProximityPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
setSensorAltitudePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorAmbientTempFPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorAmbientTempPeriodPrv(long periodPrv)WipperSnapper_I2C_Driverinlinevirtual
setSensorCO2PeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorCurrentPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorECO2PeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorGasResistancePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorLightPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorNOxIndexPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorObjectTempFPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorObjectTempPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPeriod(float period, wippersnapper_i2c_v1_SensorType sensorType)WipperSnapper_I2C_Driverinline
setSensorPM100_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPM10_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPM25_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPressurePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorProximityPeriod(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorProximityPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorRawPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorRelativeHumidityPeriodPrv(long periodPrv)WipperSnapper_I2C_Driverinlinevirtual
setSensorTVOCPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorUnitlessPercentPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorVOCIndexPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorVoltagePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
updateSensorProximity(float period)WipperSnapper_I2C_Driverinlinevirtual
WipperSnapper_I2C_Driver(TwoWire *i2c, uint16_t sensorAddress)WipperSnapper_I2C_Driverinline
WipperSnapper_I2C_Driver_VL53L1X(TwoWire *i2c, uint16_t sensorAddress)WipperSnapper_I2C_Driver_VL53L1Xinline
~WipperSnapper_I2C_Driver()WipperSnapper_I2C_Driverinlinevirtual
~WipperSnapper_I2C_Driver_VL53L1X()WipperSnapper_I2C_Driver_VL53L1Xinline
+ + + + diff --git a/html/class_wipper_snapper___i2_c___driver___v_l53_l1_x.html b/html/class_wipper_snapper___i2_c___driver___v_l53_l1_x.html new file mode 100644 index 000000000..e56f85a46 --- /dev/null +++ b/html/class_wipper_snapper___i2_c___driver___v_l53_l1_x.html @@ -0,0 +1,652 @@ + + + + + + + +Adafruit Library: WipperSnapper_I2C_Driver_VL53L1X Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Adafruit Library +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
WipperSnapper_I2C_Driver_VL53L1X Class Reference
+
+
+ +

Class that provides a driver interface for a VL53L1X sensor. + More...

+ +

#include <WipperSnapper_I2C_Driver_VL53L1X.h>

+
+Inheritance diagram for WipperSnapper_I2C_Driver_VL53L1X:
+
+
+ + +WipperSnapper_I2C_Driver + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WipperSnapper_I2C_Driver_VL53L1X (TwoWire *i2c, uint16_t sensorAddress)
 Constructor for a VL53L1X sensor. More...
 
~WipperSnapper_I2C_Driver_VL53L1X ()
 Destructor for an VL53L1X sensor.
 
bool begin ()
 Initializes the VL53L1X sensor and begins I2C. More...
 
bool getEventProximity (sensors_event_t *proximityEvent)
 Gets the VL53L1X's current proximity. More...
 
- Public Member Functions inherited from WipperSnapper_I2C_Driver
 WipperSnapper_I2C_Driver (TwoWire *i2c, uint16_t sensorAddress)
 Instanciates an I2C sensor. More...
 
+virtual ~WipperSnapper_I2C_Driver ()
 Destructor for an I2C sensor.
 
bool begin ()
 Initializes the I2C sensor and begins I2C. More...
 
void setSensorPeriod (float period, wippersnapper_i2c_v1_SensorType sensorType)
 Sets the sensor's period, provided a wippersnapper_i2c_v1_SensorType. More...
 
void configureDriver (wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)
 Uses an I2CDeviceInitRequest message to configure the sensors belonging to the driver. More...
 
uint16_t getI2CAddress ()
 Gets the I2C device's address. More...
 
virtual long getSensorCO2Period ()
 Base implementation - Returns the co2 sensor's period, if set. More...
 
virtual long getSensorCO2PeriodPrv ()
 Base implementation - Returns the previous time interval at which the co2 sensor was queried last. More...
 
virtual void setSensorCO2PeriodPrv (long period)
 Sets a timestamp for when the co2 sensor was queried. More...
 
virtual bool getEventCO2 (sensors_event_t *co2Event)
 Gets a sensor's CO2 value. More...
 
virtual long getSensorECO2Period ()
 Base implementation - Returns the eCO2 sensor's period, if set. More...
 
virtual long getSensorECO2PeriodPrv ()
 Base implementation - Returns the previous time interval at which the eCO2 sensor was queried last. More...
 
virtual void setSensorECO2PeriodPrv (long period)
 Sets a timestamp for when the eCO2 sensor was queried. More...
 
virtual bool getEventECO2 (sensors_event_t *eco2Event)
 Gets a sensor's eCO2 value. More...
 
virtual long getSensorTVOCPeriod ()
 Base implementation - Returns the TVOC sensor's period, if set. More...
 
virtual long getSensorTVOCPeriodPrv ()
 Base implementation - Returns the previous time interval at which the TVOC sensor was queried last. More...
 
virtual void setSensorTVOCPeriodPrv (long period)
 Sets a timestamp for when the TVOC sensor was queried. More...
 
virtual bool getEventTVOC (sensors_event_t *tvocEvent)
 Gets a sensor's TVOC value. More...
 
virtual long getSensorAmbientTempPeriod ()
 Base implementation - Returns the ambient temperature (°C) sensor's period, if set. More...
 
virtual long getSensorAmbientTempPeriodPrv ()
 Base implementation - Returns the previous time interval at which the ambient temperature sensor (°C) was queried last. More...
 
virtual void setSensorAmbientTempPeriodPrv (long periodPrv)
 Sets a timestamp for when the ambient temperature sensor (°C) was queried. More...
 
virtual bool getEventAmbientTemp (sensors_event_t *tempEvent)
 Base implementation - Reads an ambient temperature sensor (°C). Expects value to return in the proper SI unit. More...
 
virtual long getSensorRelativeHumidityPeriod ()
 Base implementation - Returns the humidity sensor's period, if set. More...
 
virtual long getSensorRelativeHumidityPeriodPrv ()
 Base implementation - Returns the previous time interval at which the humidity sensor was queried last. More...
 
virtual void setSensorRelativeHumidityPeriodPrv (long periodPrv)
 Sets a timestamp for when the temperature sensor was queried. More...
 
virtual bool getEventRelativeHumidity (sensors_event_t *humidEvent)
 Base implementation - Reads a humidity sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPressurePeriod ()
 Base implementation - Returns the pressure sensor's period, if set. More...
 
virtual long getSensorPressurePeriodPrv ()
 Base implementation - Returns the previous time interval at which the pressure sensor was queried last. More...
 
virtual void setSensorPressurePeriodPrv (long period)
 Sets a timestamp for when the pressure sensor was queried. More...
 
virtual bool getEventPressure (sensors_event_t *pressureEvent)
 Base implementation - Reads a pressure sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorAltitudePeriod ()
 Base implementation - Returns the Altitude sensor's period, if set. More...
 
virtual long getSensorAltitudePeriodPrv ()
 Base implementation - Returns the previous time interval at which the Altitude sensor was queried last. More...
 
virtual void setSensorAltitudePeriodPrv (long period)
 Sets a timestamp for when the Altitude sensor was queried. More...
 
virtual bool getEventAltitude (sensors_event_t *altitudeEvent)
 Base implementation - Reads a Altitude sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorObjectTempPeriod ()
 Base implementation - Returns the object temperature sensor's period, if set. More...
 
virtual long getSensorObjectTempPeriodPrv ()
 Base implementation - Returns the previous time interval at which the object temperature sensor was queried last. More...
 
virtual void setSensorObjectTempPeriodPrv (long period)
 Sets a timestamp for when the object temperature sensor was queried. More...
 
virtual bool getEventObjectTemp (sensors_event_t *objectTempEvent)
 Base implementation - Reads a object temperature sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorLightPeriod ()
 Base implementation - Returns the object light sensor's period, if set. More...
 
virtual long getSensorLightPeriodPrv ()
 Base implementation - Returns the previous time interval at which the light sensor was queried last. More...
 
virtual void setSensorLightPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventLight (sensors_event_t *lightEvent)
 Base implementation - Reads a object light sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM10_STDPeriod ()
 Base implementation - Returns the object pm10 standard sensors' period, if set. More...
 
virtual long getSensorPM10_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm10 std. sensor was queried last. More...
 
virtual void setSensorPM10_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM10_STD (sensors_event_t *pm10StdEvent)
 Base implementation - Reads a object pm10 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM25_STDPeriod ()
 Base implementation - Returns the object pm25 standard sensors' period, if set. More...
 
virtual long getSensorPM25_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm25 std. sensor was queried last. More...
 
virtual void setSensorPM25_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM25_STD (sensors_event_t *pm25StdEvent)
 Base implementation - Reads a object pm25 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM100_STDPeriod ()
 Base implementation - Returns the object pm100 standard sensors' period, if set. More...
 
virtual long getSensorPM100_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm100 std. sensor was queried last. More...
 
virtual void setSensorPM100_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM100_STD (sensors_event_t *pm100StdEvent)
 Base implementation - Reads a object pm100 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorUnitlessPercentPeriod ()
 Base implementation - Returns the object unitless % sensor period, if set. More...
 
virtual long getSensorUnitlessPercentPeriodPrv ()
 Base implementation - Returns the previous time interval at which the unitless % sensor was queried last. More...
 
virtual void setSensorUnitlessPercentPeriodPrv (long period)
 Sets a timestamp for when the unitless % sensor was queried. More...
 
virtual bool getEventUnitlessPercent (sensors_event_t *unitlessPercentEvent)
 Base implementation - Reads a object unitless % std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorVoltagePeriod ()
 Base implementation - Returns the voltage sensor's period. More...
 
virtual long getSensorVoltagePeriodPrv ()
 Base implementation - Returns the previous time interval at which the voltage sensor was queried last. More...
 
virtual void setSensorVoltagePeriodPrv (long period)
 Sets a timestamp for when the voltage sensor was queried. More...
 
virtual bool getEventVoltage (sensors_event_t *voltageEvent)
 Base implementation - Reads a voltage sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorCurrentPeriod ()
 Base implementation - Returns the current sensor's period. More...
 
virtual long getSensorCurrentPeriodPrv ()
 Base implementation - Returns the previous time interval at which the current sensor was queried last. More...
 
virtual void setSensorCurrentPeriodPrv (long period)
 Sets a timestamp for when the current sensor was queried. More...
 
virtual bool getEventCurrent (sensors_event_t *currentEvent)
 Base implementation - Reads a current sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorRawPeriod ()
 Base implementation - Returns the raw sensor's period, if set. More...
 
virtual long getSensorRawPeriodPrv ()
 Base implementation - Returns the previous time interval at which the raw sensor was queried last. More...
 
virtual void setSensorRawPeriodPrv (long period)
 Sets a timestamp for when the raw sensor was queried. More...
 
virtual bool getEventRaw (sensors_event_t *rawEvent)
 Gets a sensor's Raw value. More...
 
+virtual void disableAmbientTempF ()
 Disables the device's ambient temperature (°F) sensor, if it exists.
 
virtual long getSensorAmbientTempFPeriod ()
 Base implementation - Returns the ambient temperature (°F) sensor's period, if set. More...
 
virtual long getSensorAmbientTempFPeriodPrv ()
 Base implementation - Returns the previous time interval at which the ambient temperature sensor (°F) was queried last. More...
 
virtual void setSensorAmbientTempFPeriodPrv (long period)
 Sets a timestamp for when the ambient temperature sensor (°F) was queried. More...
 
virtual bool getEventAmbientTempF (sensors_event_t *AmbientTempFEvent)
 Helper function to obtain a sensor's ambient temperature value in °F. Requires getEventAmbientTemp() to be fully implemented by a driver. More...
 
virtual long getSensorObjectTempFPeriod ()
 Base implementation - Returns the object temperature (°F) sensor's period, if set. More...
 
virtual long getSensorObjectTempFPeriodPrv ()
 Base implementation - Returns the previous time interval at which the object temperature sensor (°F) was queried last. More...
 
virtual void setSensorObjectTempFPeriodPrv (long period)
 Sets a timestamp for when the object temperature sensor (°F) was queried. More...
 
virtual bool getEventObjectTempF (sensors_event_t *objectTempFEvent)
 Helper function to obtain a sensor's object temperature value in °F. Requires getEventObjectTemp() to be fully implemented by a driver. More...
 
virtual long getSensorGasResistancePeriod ()
 Base implementation - Returns the gas resistance (ohms) sensor's period, if set. More...
 
virtual long getSensorGasResistancePeriodPrv ()
 Base implementation - Returns the previous time interval at which the gas resistance sensor (ohms) was queried last. More...
 
virtual void setSensorGasResistancePeriodPrv (long period)
 Sets a timestamp for when the object gas resistance sensor was queried. More...
 
virtual bool getEventGasResistance (sensors_event_t *gasEvent)
 Base implementation - Reads a gas resistance sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorNOxIndexPeriod ()
 Base implementation - Returns the NOx Index sensor's period, if set. More...
 
virtual long getSensorNOxIndexPeriodPrv ()
 Base implementation - Returns the previous time interval at which the NOx Index sensor was queried last. More...
 
virtual void setSensorNOxIndexPeriodPrv (long period)
 Sets a timestamp for when the object NOx Index sensor was queried. More...
 
virtual bool getEventNOxIndex (sensors_event_t *gasEvent)
 Base implementation - Reads a NOx Index sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorVOCIndexPeriod ()
 Base implementation - Returns the VOC Index sensor's period, if set. More...
 
virtual long getSensorVOCIndexPeriodPrv ()
 Base implementation - Returns the previous time interval at which the VOC Index sensor was queried last. More...
 
virtual void setSensorVOCIndexPeriodPrv (long period)
 Sets a timestamp for when the object VOC Index sensor was queried. More...
 
virtual bool getEventVOCIndex (sensors_event_t *gasEvent)
 Base implementation - Reads a VOC Index sensor and converts the reading into the expected SI unit. More...
 
+virtual void enableSensorProximity ()
 Enables the device's proximity sensor, if it exists.
 
+virtual void disableSensorProximity ()
 Disables the device's object proximity sensor, if it exists.
 
virtual long sensorProximityPeriod ()
 Base implementation - Returns the proximity sensor's period, if set. More...
 
virtual void setSensorProximityPeriod (long period)
 Set the proximity sensor's return frequency. More...
 
virtual long SensorProximityPeriodPrv ()
 Base implementation - Returns the previous time interval at which the proximity sensor was queried last. More...
 
virtual void setSensorProximityPeriodPrv (long period)
 Sets a timestamp for when the proximity sensor was queried. More...
 
virtual void updateSensorProximity (float period)
 Updates the properties of a proximity sensor. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Attributes

+Adafruit_VL53L1X * _VL53L1X
 Pointer to VL53L1X temperature sensor object.
 
- Protected Attributes inherited from WipperSnapper_I2C_Driver
+TwoWire * _i2c
 Pointer to the I2C driver's Wire object.
 
+uint16_t _sensorAddress
 The I2C driver's unique I2C address.
 
long _tempSensorPeriod
 The time period between reading the temperature sensor's value. More...
 
long _tempSensorPeriodPrv
 
long _humidSensorPeriod
 The time period between reading the humidity sensor's value. More...
 
long _humidSensorPeriodPrv
 
long _pressureSensorPeriod
 The time period between reading the pressure sensor's value. More...
 
long _pressureSensorPeriodPrv
 
long _CO2SensorPeriod
 The time period between reading the CO2 sensor's value. More...
 
long _CO2SensorPeriodPrv
 The time when the CO2 sensor was last read. More...
 
long _ECO2SensorPeriod
 The time period between reading the eCO2 sensor's value. More...
 
long _ECO2SensorPeriodPrv
 The time when the eCO2 sensor was last read. More...
 
long _TVOCSensorPeriod
 The time period between reading the TVOC sensor's value. More...
 
long _TVOCSensorPeriodPrv
 The time when the TVOC sensor was last read. More...
 
long _altitudeSensorPeriod
 The time period between reading the altitude sensor's value. More...
 
long _altitudeSensorPeriodPrv
 
long _objectTempSensorPeriod = 0L
 
long _objectTempSensorPeriodPrv
 
long _lightSensorPeriod
 The time period between reading the light sensor's value. More...
 
long _lightSensorPeriodPrv
 
long _PM10SensorPeriod
 The time period between reading the pm25 sensor's value. More...
 
long _PM10SensorPeriodPrv
 The time when the pm25 sensor was last read. More...
 
long _PM25SensorPeriod
 The time period between reading the pm25 sensor's value. More...
 
long _PM25SensorPeriodPrv
 The time when the pm25 sensor was last read. More...
 
long _PM100SensorPeriod
 The time period between reading the pm100_std sensor's value. More...
 
long _PM100SensorPeriodPrv
 
long _unitlessPercentPeriod
 The time period between reading the unitless % sensor's value. More...
 
long _unitlessPercentPeriodPrv
 
long _voltagePeriod
 The time period between reading the voltage sensor's value. More...
 
long _voltagePeriodPrv
 
long _currentPeriod
 The time period between reading the current sensor's value. More...
 
long _currentPeriodPrv
 
long _rawSensorPeriod
 The time period between reading the Raw sensor's value. More...
 
long _rawSensorPeriodPrv
 The time when the Raw sensor was last read. More...
 
long _ambientTempFPeriod = 0L
 
long _ambientTempFPeriodPrv
 
long _objectTempFPeriod = 0L
 
long _objectTempFPeriodPrv
 
long _gasResistancePeriod = 0L
 
long _gasResistancePeriodPrv
 
long _NOxIndexPeriod
 The time period between reading the NOx Index sensor's value. More...
 
long _NOxIndexPeriodPrv
 
long _VOCIndexPeriod
 The time period between reading the VOC Index sensor's value. More...
 
long _VOCIndexPeriodPrv
 
long _proximitySensorPeriod
 The time period between reading the proximity sensor's value. More...
 
long _proximitySensorPeriodPrv
 
+

Detailed Description

+

Class that provides a driver interface for a VL53L1X sensor.

+

Constructor & Destructor Documentation

+ +

◆ WipperSnapper_I2C_Driver_VL53L1X()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
WipperSnapper_I2C_Driver_VL53L1X::WipperSnapper_I2C_Driver_VL53L1X (TwoWire * i2c,
uint16_t sensorAddress 
)
+
+inline
+
+ +

Constructor for a VL53L1X sensor.

+
Parameters
+ + + +
i2cThe I2C interface.
sensorAddress7-bit device address.
+
+
+ +
+
+

Member Function Documentation

+ +

◆ begin()

+ +
+
+ + + + + +
+ + + + + + + +
bool WipperSnapper_I2C_Driver_VL53L1X::begin ()
+
+inline
+
+ +

Initializes the VL53L1X sensor and begins I2C.

+
Returns
True if initialized successfully, False otherwise.
+ +
+
+ +

◆ getEventProximity()

+ +
+
+ + + + + +
+ + + + + + + + +
bool WipperSnapper_I2C_Driver_VL53L1X::getEventProximity (sensors_event_t * proximityEvent)
+
+inlinevirtual
+
+ +

Gets the VL53L1X's current proximity.

+
Parameters
+ + +
proximityEventPointer to an Adafruit_Sensor event.
+
+
+
Returns
True if the proximity was obtained successfully, False otherwise.
+ +

Reimplemented from WipperSnapper_I2C_Driver.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/html/class_wipper_snapper___i2_c___driver___v_l53_l1_x.png b/html/class_wipper_snapper___i2_c___driver___v_l53_l1_x.png new file mode 100644 index 000000000..438e0f791 Binary files /dev/null and b/html/class_wipper_snapper___i2_c___driver___v_l53_l1_x.png differ diff --git a/html/class_wipper_snapper___i2_c___driver___v_l53_l4_c_d-members.html b/html/class_wipper_snapper___i2_c___driver___v_l53_l4_c_d-members.html new file mode 100644 index 000000000..ec062a70b --- /dev/null +++ b/html/class_wipper_snapper___i2_c___driver___v_l53_l4_c_d-members.html @@ -0,0 +1,224 @@ + + + + + + + +Adafruit Library: Member List + + + + + + + + + +
+
+ + + + + + +
+
Adafruit Library +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
WipperSnapper_I2C_Driver_VL53L4CD Member List
+
+
+ +

This is the complete list of members for WipperSnapper_I2C_Driver_VL53L4CD, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
_altitudeSensorPeriodWipperSnapper_I2C_Driverprotected
_altitudeSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_ambientTempFPeriodWipperSnapper_I2C_Driverprotected
_ambientTempFPeriodPrvWipperSnapper_I2C_Driverprotected
_CO2SensorPeriodWipperSnapper_I2C_Driverprotected
_CO2SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_currentPeriodWipperSnapper_I2C_Driverprotected
_currentPeriodPrvWipperSnapper_I2C_Driverprotected
_ECO2SensorPeriodWipperSnapper_I2C_Driverprotected
_ECO2SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_gasResistancePeriodWipperSnapper_I2C_Driverprotected
_gasResistancePeriodPrvWipperSnapper_I2C_Driverprotected
_humidSensorPeriodWipperSnapper_I2C_Driverprotected
_humidSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_i2cWipperSnapper_I2C_Driverprotected
_lightSensorPeriodWipperSnapper_I2C_Driverprotected
_lightSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_NOxIndexPeriodWipperSnapper_I2C_Driverprotected
_NOxIndexPeriodPrvWipperSnapper_I2C_Driverprotected
_objectTempFPeriodWipperSnapper_I2C_Driverprotected
_objectTempFPeriodPrvWipperSnapper_I2C_Driverprotected
_objectTempSensorPeriodWipperSnapper_I2C_Driverprotected
_objectTempSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM100SensorPeriodWipperSnapper_I2C_Driverprotected
_PM100SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM10SensorPeriodWipperSnapper_I2C_Driverprotected
_PM10SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_PM25SensorPeriodWipperSnapper_I2C_Driverprotected
_PM25SensorPeriodPrvWipperSnapper_I2C_Driverprotected
_pressureSensorPeriodWipperSnapper_I2C_Driverprotected
_pressureSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_proximitySensorPeriodWipperSnapper_I2C_Driverprotected
_proximitySensorPeriodPrvWipperSnapper_I2C_Driverprotected
_rawSensorPeriodWipperSnapper_I2C_Driverprotected
_rawSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_sensorAddressWipperSnapper_I2C_Driverprotected
_tempSensorPeriodWipperSnapper_I2C_Driverprotected
_tempSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_TVOCSensorPeriodWipperSnapper_I2C_Driverprotected
_TVOCSensorPeriodPrvWipperSnapper_I2C_Driverprotected
_unitlessPercentPeriodWipperSnapper_I2C_Driverprotected
_unitlessPercentPeriodPrvWipperSnapper_I2C_Driverprotected
_VL53L4CDWipperSnapper_I2C_Driver_VL53L4CDprotected
_VOCIndexPeriodWipperSnapper_I2C_Driverprotected
_VOCIndexPeriodPrvWipperSnapper_I2C_Driverprotected
_voltagePeriodWipperSnapper_I2C_Driverprotected
_voltagePeriodPrvWipperSnapper_I2C_Driverprotected
begin()WipperSnapper_I2C_Driver_VL53L4CDinline
configureDriver(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)WipperSnapper_I2C_Driverinline
disableAmbientTempF()WipperSnapper_I2C_Driverinlinevirtual
disableSensorProximity()WipperSnapper_I2C_Driverinlinevirtual
enableSensorProximity()WipperSnapper_I2C_Driverinlinevirtual
getEventAltitude(sensors_event_t *altitudeEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventAmbientTemp(sensors_event_t *tempEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventAmbientTempF(sensors_event_t *AmbientTempFEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventCO2(sensors_event_t *co2Event)WipperSnapper_I2C_Driverinlinevirtual
getEventCurrent(sensors_event_t *currentEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventECO2(sensors_event_t *eco2Event)WipperSnapper_I2C_Driverinlinevirtual
getEventGasResistance(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventLight(sensors_event_t *lightEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventNOxIndex(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventObjectTemp(sensors_event_t *objectTempEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventObjectTempF(sensors_event_t *objectTempFEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM100_STD(sensors_event_t *pm100StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM10_STD(sensors_event_t *pm10StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPM25_STD(sensors_event_t *pm25StdEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventPressure(sensors_event_t *pressureEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventProximity(sensors_event_t *proximityEvent)WipperSnapper_I2C_Driver_VL53L4CDinlinevirtual
getEventRaw(sensors_event_t *rawEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventRelativeHumidity(sensors_event_t *humidEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventTVOC(sensors_event_t *tvocEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventUnitlessPercent(sensors_event_t *unitlessPercentEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventVOCIndex(sensors_event_t *gasEvent)WipperSnapper_I2C_Driverinlinevirtual
getEventVoltage(sensors_event_t *voltageEvent)WipperSnapper_I2C_Driverinlinevirtual
getI2CAddress()WipperSnapper_I2C_Driverinline
getSensorAltitudePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAltitudePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempFPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempFPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorAmbientTempPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorCO2Period()WipperSnapper_I2C_Driverinlinevirtual
getSensorCO2PeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorCurrentPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorCurrentPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorECO2Period()WipperSnapper_I2C_Driverinlinevirtual
getSensorECO2PeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorGasResistancePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorGasResistancePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorLightPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorLightPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorNOxIndexPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorNOxIndexPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempFPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempFPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorObjectTempPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM100_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM100_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM10_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM10_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM25_STDPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPM25_STDPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorPressurePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorPressurePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorRawPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorRawPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorRelativeHumidityPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorRelativeHumidityPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorTVOCPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorTVOCPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorUnitlessPercentPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorUnitlessPercentPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorVOCIndexPeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorVOCIndexPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
getSensorVoltagePeriod()WipperSnapper_I2C_Driverinlinevirtual
getSensorVoltagePeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
sensorProximityPeriod()WipperSnapper_I2C_Driverinlinevirtual
SensorProximityPeriodPrv()WipperSnapper_I2C_Driverinlinevirtual
setSensorAltitudePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorAmbientTempFPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorAmbientTempPeriodPrv(long periodPrv)WipperSnapper_I2C_Driverinlinevirtual
setSensorCO2PeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorCurrentPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorECO2PeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorGasResistancePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorLightPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorNOxIndexPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorObjectTempFPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorObjectTempPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPeriod(float period, wippersnapper_i2c_v1_SensorType sensorType)WipperSnapper_I2C_Driverinline
setSensorPM100_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPM10_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPM25_STDPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorPressurePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorProximityPeriod(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorProximityPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorRawPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorRelativeHumidityPeriodPrv(long periodPrv)WipperSnapper_I2C_Driverinlinevirtual
setSensorTVOCPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorUnitlessPercentPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorVOCIndexPeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
setSensorVoltagePeriodPrv(long period)WipperSnapper_I2C_Driverinlinevirtual
updateSensorProximity(float period)WipperSnapper_I2C_Driverinlinevirtual
WipperSnapper_I2C_Driver(TwoWire *i2c, uint16_t sensorAddress)WipperSnapper_I2C_Driverinline
WipperSnapper_I2C_Driver_VL53L4CD(TwoWire *i2c, uint16_t sensorAddress)WipperSnapper_I2C_Driver_VL53L4CDinline
~WipperSnapper_I2C_Driver()WipperSnapper_I2C_Driverinlinevirtual
~WipperSnapper_I2C_Driver_VL53L4CD()WipperSnapper_I2C_Driver_VL53L4CDinline
+ + + + diff --git a/html/class_wipper_snapper___i2_c___driver___v_l53_l4_c_d.html b/html/class_wipper_snapper___i2_c___driver___v_l53_l4_c_d.html new file mode 100644 index 000000000..72dd0ca7b --- /dev/null +++ b/html/class_wipper_snapper___i2_c___driver___v_l53_l4_c_d.html @@ -0,0 +1,652 @@ + + + + + + + +Adafruit Library: WipperSnapper_I2C_Driver_VL53L4CD Class Reference + + + + + + + + + +
+
+ + + + + + +
+
Adafruit Library +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
WipperSnapper_I2C_Driver_VL53L4CD Class Reference
+
+
+ +

Class that provides a driver interface for a VL53L4CD sensor. + More...

+ +

#include <WipperSnapper_I2C_Driver_VL53L4CD.h>

+
+Inheritance diagram for WipperSnapper_I2C_Driver_VL53L4CD:
+
+
+ + +WipperSnapper_I2C_Driver + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

 WipperSnapper_I2C_Driver_VL53L4CD (TwoWire *i2c, uint16_t sensorAddress)
 Constructor for a VL53L4CD sensor. More...
 
~WipperSnapper_I2C_Driver_VL53L4CD ()
 Destructor for an VL53L4CD sensor.
 
bool begin ()
 Initializes the VL53L4CD sensor and begins I2C. More...
 
bool getEventProximity (sensors_event_t *proximityEvent)
 Gets the VL53L4CD's current proximity. More...
 
- Public Member Functions inherited from WipperSnapper_I2C_Driver
 WipperSnapper_I2C_Driver (TwoWire *i2c, uint16_t sensorAddress)
 Instanciates an I2C sensor. More...
 
+virtual ~WipperSnapper_I2C_Driver ()
 Destructor for an I2C sensor.
 
bool begin ()
 Initializes the I2C sensor and begins I2C. More...
 
void setSensorPeriod (float period, wippersnapper_i2c_v1_SensorType sensorType)
 Sets the sensor's period, provided a wippersnapper_i2c_v1_SensorType. More...
 
void configureDriver (wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)
 Uses an I2CDeviceInitRequest message to configure the sensors belonging to the driver. More...
 
uint16_t getI2CAddress ()
 Gets the I2C device's address. More...
 
virtual long getSensorCO2Period ()
 Base implementation - Returns the co2 sensor's period, if set. More...
 
virtual long getSensorCO2PeriodPrv ()
 Base implementation - Returns the previous time interval at which the co2 sensor was queried last. More...
 
virtual void setSensorCO2PeriodPrv (long period)
 Sets a timestamp for when the co2 sensor was queried. More...
 
virtual bool getEventCO2 (sensors_event_t *co2Event)
 Gets a sensor's CO2 value. More...
 
virtual long getSensorECO2Period ()
 Base implementation - Returns the eCO2 sensor's period, if set. More...
 
virtual long getSensorECO2PeriodPrv ()
 Base implementation - Returns the previous time interval at which the eCO2 sensor was queried last. More...
 
virtual void setSensorECO2PeriodPrv (long period)
 Sets a timestamp for when the eCO2 sensor was queried. More...
 
virtual bool getEventECO2 (sensors_event_t *eco2Event)
 Gets a sensor's eCO2 value. More...
 
virtual long getSensorTVOCPeriod ()
 Base implementation - Returns the TVOC sensor's period, if set. More...
 
virtual long getSensorTVOCPeriodPrv ()
 Base implementation - Returns the previous time interval at which the TVOC sensor was queried last. More...
 
virtual void setSensorTVOCPeriodPrv (long period)
 Sets a timestamp for when the TVOC sensor was queried. More...
 
virtual bool getEventTVOC (sensors_event_t *tvocEvent)
 Gets a sensor's TVOC value. More...
 
virtual long getSensorAmbientTempPeriod ()
 Base implementation - Returns the ambient temperature (°C) sensor's period, if set. More...
 
virtual long getSensorAmbientTempPeriodPrv ()
 Base implementation - Returns the previous time interval at which the ambient temperature sensor (°C) was queried last. More...
 
virtual void setSensorAmbientTempPeriodPrv (long periodPrv)
 Sets a timestamp for when the ambient temperature sensor (°C) was queried. More...
 
virtual bool getEventAmbientTemp (sensors_event_t *tempEvent)
 Base implementation - Reads an ambient temperature sensor (°C). Expects value to return in the proper SI unit. More...
 
virtual long getSensorRelativeHumidityPeriod ()
 Base implementation - Returns the humidity sensor's period, if set. More...
 
virtual long getSensorRelativeHumidityPeriodPrv ()
 Base implementation - Returns the previous time interval at which the humidity sensor was queried last. More...
 
virtual void setSensorRelativeHumidityPeriodPrv (long periodPrv)
 Sets a timestamp for when the temperature sensor was queried. More...
 
virtual bool getEventRelativeHumidity (sensors_event_t *humidEvent)
 Base implementation - Reads a humidity sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPressurePeriod ()
 Base implementation - Returns the pressure sensor's period, if set. More...
 
virtual long getSensorPressurePeriodPrv ()
 Base implementation - Returns the previous time interval at which the pressure sensor was queried last. More...
 
virtual void setSensorPressurePeriodPrv (long period)
 Sets a timestamp for when the pressure sensor was queried. More...
 
virtual bool getEventPressure (sensors_event_t *pressureEvent)
 Base implementation - Reads a pressure sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorAltitudePeriod ()
 Base implementation - Returns the Altitude sensor's period, if set. More...
 
virtual long getSensorAltitudePeriodPrv ()
 Base implementation - Returns the previous time interval at which the Altitude sensor was queried last. More...
 
virtual void setSensorAltitudePeriodPrv (long period)
 Sets a timestamp for when the Altitude sensor was queried. More...
 
virtual bool getEventAltitude (sensors_event_t *altitudeEvent)
 Base implementation - Reads a Altitude sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorObjectTempPeriod ()
 Base implementation - Returns the object temperature sensor's period, if set. More...
 
virtual long getSensorObjectTempPeriodPrv ()
 Base implementation - Returns the previous time interval at which the object temperature sensor was queried last. More...
 
virtual void setSensorObjectTempPeriodPrv (long period)
 Sets a timestamp for when the object temperature sensor was queried. More...
 
virtual bool getEventObjectTemp (sensors_event_t *objectTempEvent)
 Base implementation - Reads a object temperature sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorLightPeriod ()
 Base implementation - Returns the object light sensor's period, if set. More...
 
virtual long getSensorLightPeriodPrv ()
 Base implementation - Returns the previous time interval at which the light sensor was queried last. More...
 
virtual void setSensorLightPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventLight (sensors_event_t *lightEvent)
 Base implementation - Reads a object light sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM10_STDPeriod ()
 Base implementation - Returns the object pm10 standard sensors' period, if set. More...
 
virtual long getSensorPM10_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm10 std. sensor was queried last. More...
 
virtual void setSensorPM10_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM10_STD (sensors_event_t *pm10StdEvent)
 Base implementation - Reads a object pm10 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM25_STDPeriod ()
 Base implementation - Returns the object pm25 standard sensors' period, if set. More...
 
virtual long getSensorPM25_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm25 std. sensor was queried last. More...
 
virtual void setSensorPM25_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM25_STD (sensors_event_t *pm25StdEvent)
 Base implementation - Reads a object pm25 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorPM100_STDPeriod ()
 Base implementation - Returns the object pm100 standard sensors' period, if set. More...
 
virtual long getSensorPM100_STDPeriodPrv ()
 Base implementation - Returns the previous time interval at which the pm100 std. sensor was queried last. More...
 
virtual void setSensorPM100_STDPeriodPrv (long period)
 Sets a timestamp for when the light sensor was queried. More...
 
virtual bool getEventPM100_STD (sensors_event_t *pm100StdEvent)
 Base implementation - Reads a object pm100 std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorUnitlessPercentPeriod ()
 Base implementation - Returns the object unitless % sensor period, if set. More...
 
virtual long getSensorUnitlessPercentPeriodPrv ()
 Base implementation - Returns the previous time interval at which the unitless % sensor was queried last. More...
 
virtual void setSensorUnitlessPercentPeriodPrv (long period)
 Sets a timestamp for when the unitless % sensor was queried. More...
 
virtual bool getEventUnitlessPercent (sensors_event_t *unitlessPercentEvent)
 Base implementation - Reads a object unitless % std. sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorVoltagePeriod ()
 Base implementation - Returns the voltage sensor's period. More...
 
virtual long getSensorVoltagePeriodPrv ()
 Base implementation - Returns the previous time interval at which the voltage sensor was queried last. More...
 
virtual void setSensorVoltagePeriodPrv (long period)
 Sets a timestamp for when the voltage sensor was queried. More...
 
virtual bool getEventVoltage (sensors_event_t *voltageEvent)
 Base implementation - Reads a voltage sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorCurrentPeriod ()
 Base implementation - Returns the current sensor's period. More...
 
virtual long getSensorCurrentPeriodPrv ()
 Base implementation - Returns the previous time interval at which the current sensor was queried last. More...
 
virtual void setSensorCurrentPeriodPrv (long period)
 Sets a timestamp for when the current sensor was queried. More...
 
virtual bool getEventCurrent (sensors_event_t *currentEvent)
 Base implementation - Reads a current sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorRawPeriod ()
 Base implementation - Returns the raw sensor's period, if set. More...
 
virtual long getSensorRawPeriodPrv ()
 Base implementation - Returns the previous time interval at which the raw sensor was queried last. More...
 
virtual void setSensorRawPeriodPrv (long period)
 Sets a timestamp for when the raw sensor was queried. More...
 
virtual bool getEventRaw (sensors_event_t *rawEvent)
 Gets a sensor's Raw value. More...
 
+virtual void disableAmbientTempF ()
 Disables the device's ambient temperature (°F) sensor, if it exists.
 
virtual long getSensorAmbientTempFPeriod ()
 Base implementation - Returns the ambient temperature (°F) sensor's period, if set. More...
 
virtual long getSensorAmbientTempFPeriodPrv ()
 Base implementation - Returns the previous time interval at which the ambient temperature sensor (°F) was queried last. More...
 
virtual void setSensorAmbientTempFPeriodPrv (long period)
 Sets a timestamp for when the ambient temperature sensor (°F) was queried. More...
 
virtual bool getEventAmbientTempF (sensors_event_t *AmbientTempFEvent)
 Helper function to obtain a sensor's ambient temperature value in °F. Requires getEventAmbientTemp() to be fully implemented by a driver. More...
 
virtual long getSensorObjectTempFPeriod ()
 Base implementation - Returns the object temperature (°F) sensor's period, if set. More...
 
virtual long getSensorObjectTempFPeriodPrv ()
 Base implementation - Returns the previous time interval at which the object temperature sensor (°F) was queried last. More...
 
virtual void setSensorObjectTempFPeriodPrv (long period)
 Sets a timestamp for when the object temperature sensor (°F) was queried. More...
 
virtual bool getEventObjectTempF (sensors_event_t *objectTempFEvent)
 Helper function to obtain a sensor's object temperature value in °F. Requires getEventObjectTemp() to be fully implemented by a driver. More...
 
virtual long getSensorGasResistancePeriod ()
 Base implementation - Returns the gas resistance (ohms) sensor's period, if set. More...
 
virtual long getSensorGasResistancePeriodPrv ()
 Base implementation - Returns the previous time interval at which the gas resistance sensor (ohms) was queried last. More...
 
virtual void setSensorGasResistancePeriodPrv (long period)
 Sets a timestamp for when the object gas resistance sensor was queried. More...
 
virtual bool getEventGasResistance (sensors_event_t *gasEvent)
 Base implementation - Reads a gas resistance sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorNOxIndexPeriod ()
 Base implementation - Returns the NOx Index sensor's period, if set. More...
 
virtual long getSensorNOxIndexPeriodPrv ()
 Base implementation - Returns the previous time interval at which the NOx Index sensor was queried last. More...
 
virtual void setSensorNOxIndexPeriodPrv (long period)
 Sets a timestamp for when the object NOx Index sensor was queried. More...
 
virtual bool getEventNOxIndex (sensors_event_t *gasEvent)
 Base implementation - Reads a NOx Index sensor and converts the reading into the expected SI unit. More...
 
virtual long getSensorVOCIndexPeriod ()
 Base implementation - Returns the VOC Index sensor's period, if set. More...
 
virtual long getSensorVOCIndexPeriodPrv ()
 Base implementation - Returns the previous time interval at which the VOC Index sensor was queried last. More...
 
virtual void setSensorVOCIndexPeriodPrv (long period)
 Sets a timestamp for when the object VOC Index sensor was queried. More...
 
virtual bool getEventVOCIndex (sensors_event_t *gasEvent)
 Base implementation - Reads a VOC Index sensor and converts the reading into the expected SI unit. More...
 
+virtual void enableSensorProximity ()
 Enables the device's proximity sensor, if it exists.
 
+virtual void disableSensorProximity ()
 Disables the device's object proximity sensor, if it exists.
 
virtual long sensorProximityPeriod ()
 Base implementation - Returns the proximity sensor's period, if set. More...
 
virtual void setSensorProximityPeriod (long period)
 Set the proximity sensor's return frequency. More...
 
virtual long SensorProximityPeriodPrv ()
 Base implementation - Returns the previous time interval at which the proximity sensor was queried last. More...
 
virtual void setSensorProximityPeriodPrv (long period)
 Sets a timestamp for when the proximity sensor was queried. More...
 
virtual void updateSensorProximity (float period)
 Updates the properties of a proximity sensor. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Protected Attributes

+VL53L4CD * _VL53L4CD
 Pointer to VL53L4CD temperature sensor object.
 
- Protected Attributes inherited from WipperSnapper_I2C_Driver
+TwoWire * _i2c
 Pointer to the I2C driver's Wire object.
 
+uint16_t _sensorAddress
 The I2C driver's unique I2C address.
 
long _tempSensorPeriod
 The time period between reading the temperature sensor's value. More...
 
long _tempSensorPeriodPrv
 
long _humidSensorPeriod
 The time period between reading the humidity sensor's value. More...
 
long _humidSensorPeriodPrv
 
long _pressureSensorPeriod
 The time period between reading the pressure sensor's value. More...
 
long _pressureSensorPeriodPrv
 
long _CO2SensorPeriod
 The time period between reading the CO2 sensor's value. More...
 
long _CO2SensorPeriodPrv
 The time when the CO2 sensor was last read. More...
 
long _ECO2SensorPeriod
 The time period between reading the eCO2 sensor's value. More...
 
long _ECO2SensorPeriodPrv
 The time when the eCO2 sensor was last read. More...
 
long _TVOCSensorPeriod
 The time period between reading the TVOC sensor's value. More...
 
long _TVOCSensorPeriodPrv
 The time when the TVOC sensor was last read. More...
 
long _altitudeSensorPeriod
 The time period between reading the altitude sensor's value. More...
 
long _altitudeSensorPeriodPrv
 
long _objectTempSensorPeriod = 0L
 
long _objectTempSensorPeriodPrv
 
long _lightSensorPeriod
 The time period between reading the light sensor's value. More...
 
long _lightSensorPeriodPrv
 
long _PM10SensorPeriod
 The time period between reading the pm25 sensor's value. More...
 
long _PM10SensorPeriodPrv
 The time when the pm25 sensor was last read. More...
 
long _PM25SensorPeriod
 The time period between reading the pm25 sensor's value. More...
 
long _PM25SensorPeriodPrv
 The time when the pm25 sensor was last read. More...
 
long _PM100SensorPeriod
 The time period between reading the pm100_std sensor's value. More...
 
long _PM100SensorPeriodPrv
 
long _unitlessPercentPeriod
 The time period between reading the unitless % sensor's value. More...
 
long _unitlessPercentPeriodPrv
 
long _voltagePeriod
 The time period between reading the voltage sensor's value. More...
 
long _voltagePeriodPrv
 
long _currentPeriod
 The time period between reading the current sensor's value. More...
 
long _currentPeriodPrv
 
long _rawSensorPeriod
 The time period between reading the Raw sensor's value. More...
 
long _rawSensorPeriodPrv
 The time when the Raw sensor was last read. More...
 
long _ambientTempFPeriod = 0L
 
long _ambientTempFPeriodPrv
 
long _objectTempFPeriod = 0L
 
long _objectTempFPeriodPrv
 
long _gasResistancePeriod = 0L
 
long _gasResistancePeriodPrv
 
long _NOxIndexPeriod
 The time period between reading the NOx Index sensor's value. More...
 
long _NOxIndexPeriodPrv
 
long _VOCIndexPeriod
 The time period between reading the VOC Index sensor's value. More...
 
long _VOCIndexPeriodPrv
 
long _proximitySensorPeriod
 The time period between reading the proximity sensor's value. More...
 
long _proximitySensorPeriodPrv
 
+

Detailed Description

+

Class that provides a driver interface for a VL53L4CD sensor.

+

Constructor & Destructor Documentation

+ +

◆ WipperSnapper_I2C_Driver_VL53L4CD()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
WipperSnapper_I2C_Driver_VL53L4CD::WipperSnapper_I2C_Driver_VL53L4CD (TwoWire * i2c,
uint16_t sensorAddress 
)
+
+inline
+
+ +

Constructor for a VL53L4CD sensor.

+
Parameters
+ + + +
i2cThe I2C interface.
sensorAddress7-bit device address.
+
+
+ +
+
+

Member Function Documentation

+ +

◆ begin()

+ +
+
+ + + + + +
+ + + + + + + +
bool WipperSnapper_I2C_Driver_VL53L4CD::begin ()
+
+inline
+
+ +

Initializes the VL53L4CD sensor and begins I2C.

+
Returns
True if initialized successfully, False otherwise.
+ +
+
+ +

◆ getEventProximity()

+ +
+
+ + + + + +
+ + + + + + + + +
bool WipperSnapper_I2C_Driver_VL53L4CD::getEventProximity (sensors_event_t * proximityEvent)
+
+inlinevirtual
+
+ +

Gets the VL53L4CD's current proximity.

+
Parameters
+ + +
proximityEventPointer to an Adafruit_Sensor event.
+
+
+
Returns
True if the proximity was obtained successfully, False otherwise.
+ +

Reimplemented from WipperSnapper_I2C_Driver.

+ +
+
+
The documentation for this class was generated from the following file: +
+ + + + diff --git a/html/class_wipper_snapper___i2_c___driver___v_l53_l4_c_d.png b/html/class_wipper_snapper___i2_c___driver___v_l53_l4_c_d.png new file mode 100644 index 000000000..6cc252aee Binary files /dev/null and b/html/class_wipper_snapper___i2_c___driver___v_l53_l4_c_d.png differ diff --git a/html/classes.html b/html/classes.html index 11cdb030b..6ca0814fe 100644 --- a/html/classes.html +++ b/html/classes.html @@ -65,25 +65,26 @@
a | d | s | w
- - + + + - - - + + + + - - - - - + + + + + + - - + + + +
  a  
-
Wippersnapper_AIRLIFT   WipperSnapper_I2C_Driver_HTU21D   WipperSnapper_I2C_Driver_SCD30   WipperSnapper_I2C_Driver_VL6180X   
Wippersnapper_AnalogIO   WipperSnapper_I2C_Driver_HTU31D   WipperSnapper_I2C_Driver_SCD4X   Wippersnapper_WIFININA   
analogInputPin   WipperSnapper_Component_I2C   WipperSnapper_I2C_Driver_INA219   WipperSnapper_I2C_Driver_SEN5X   ws_display_driver   
Wippersnapper_AnalogIO   WipperSnapper_I2C_Driver_INA219   WipperSnapper_I2C_Driver_SCD4X   WipperSnapper_I2C_Driver_VL6180X   
WipperSnapper_Component_I2C   WipperSnapper_I2C_Driver_LC709203F   WipperSnapper_I2C_Driver_SEN5X   Wippersnapper_WIFININA   
analogInputPin   Wippersnapper_DigitalGPIO   WipperSnapper_I2C_Driver_LPS22HB   WipperSnapper_I2C_Driver_SGP30   ws_display_driver   
  d  
-
Wippersnapper_DigitalGPIO   WipperSnapper_I2C_Driver_LC709203F   WipperSnapper_I2C_Driver_SGP30   ws_display_ui_helper   
Wippersnapper_ESP32   WipperSnapper_I2C_Driver_LPS22HB   WipperSnapper_I2C_Driver_SGP40   ws_ds18x20   
digitalInputPin   WipperSnapper_I2C_Driver   WipperSnapper_I2C_Driver_LPS25HB   WipperSnapper_I2C_Driver_SHT3X   ws_ledc   
ds18x20Obj   WipperSnapper_I2C_Driver_ADT7410   WipperSnapper_I2C_Driver_LPS3XHW   WipperSnapper_I2C_Driver_SHT4X   ws_ledc_servo   
Wippersnapper_ESP32   WipperSnapper_I2C_Driver_LPS25HB   WipperSnapper_I2C_Driver_SGP40   ws_display_ui_helper   
WipperSnapper_I2C_Driver   WipperSnapper_I2C_Driver_LPS3XHW   WipperSnapper_I2C_Driver_SHT3X   ws_ds18x20   
digitalInputPin   WipperSnapper_I2C_Driver_ADT7410   WipperSnapper_I2C_Driver_LTR329_LTR303   WipperSnapper_I2C_Driver_SHT4X   ws_ledc   
ds18x20Obj   WipperSnapper_I2C_Driver_AHTX0   WipperSnapper_I2C_Driver_LTR390   WipperSnapper_I2C_Driver_SHTC3   ws_ledc_servo   
  s  
-
WipperSnapper_I2C_Driver_AHTX0   WipperSnapper_I2C_Driver_LTR329_LTR303   WipperSnapper_I2C_Driver_SHTC3   ws_pixels   
WipperSnapper_I2C_Driver_BH1750   WipperSnapper_I2C_Driver_LTR390   WipperSnapper_I2C_Driver_SI7021   ws_pwm   
servo_t   WipperSnapper_I2C_Driver_BME280   WipperSnapper_I2C_Driver_MAX17048   WipperSnapper_I2C_Driver_STEMMA_Soil_Sensor   ws_servo   
servoComponent   WipperSnapper_I2C_Driver_BME680   WipperSnapper_I2C_Driver_MCP9808   WipperSnapper_I2C_Driver_TMP117   ws_uart   
ServoPin_t   WipperSnapper_I2C_Driver_BMP280   WipperSnapper_I2C_Driver_MPL115A2   WipperSnapper_I2C_Driver_TSL2591   ws_uart_drv   
strand_s   WipperSnapper_I2C_Driver_BMP3XX   WipperSnapper_I2C_Driver_MPRLS   WipperSnapper_I2C_Driver_VCNL4020   ws_uart_drv_pm25aqi   
WipperSnapper_I2C_Driver_BH1750   WipperSnapper_I2C_Driver_MAX17048   WipperSnapper_I2C_Driver_SI7021   ws_pixels   
WipperSnapper_I2C_Driver_BME280   WipperSnapper_I2C_Driver_MCP3421   WipperSnapper_I2C_Driver_STEMMA_Soil_Sensor   ws_pwm   
servo_t   WipperSnapper_I2C_Driver_BME680   WipperSnapper_I2C_Driver_MCP9808   WipperSnapper_I2C_Driver_TMP117   ws_servo   
servoComponent   WipperSnapper_I2C_Driver_BMP280   WipperSnapper_I2C_Driver_MPL115A2   WipperSnapper_I2C_Driver_TSL2591   ws_uart   
ServoPin_t   WipperSnapper_I2C_Driver_BMP3XX   WipperSnapper_I2C_Driver_MPRLS   WipperSnapper_I2C_Driver_VCNL4020   ws_uart_drv   
strand_s   WipperSnapper_I2C_Driver_DPS310   WipperSnapper_I2C_Driver_MS8607   WipperSnapper_I2C_Driver_VCNL4040   ws_uart_drv_pm25aqi   
  w  
-
WipperSnapper_I2C_Driver_DPS310   WipperSnapper_I2C_Driver_MS8607   WipperSnapper_I2C_Driver_VCNL4040   
WipperSnapper_I2C_Driver_ENS160   WipperSnapper_I2C_Driver_PCT2075   WipperSnapper_I2C_Driver_VEML7700   
Wippersnapper   WipperSnapper_I2C_Driver_HTS221   WipperSnapper_I2C_Driver_PM25   WipperSnapper_I2C_Driver_VL53L0X   
WipperSnapper_I2C_Driver_ENS160   WipperSnapper_I2C_Driver_NAU7802   WipperSnapper_I2C_Driver_VEML7700   
WipperSnapper_I2C_Driver_HTS221   WipperSnapper_I2C_Driver_PCT2075   WipperSnapper_I2C_Driver_VL53L0X   
Wippersnapper   WipperSnapper_I2C_Driver_HTU21D   WipperSnapper_I2C_Driver_PM25   WipperSnapper_I2C_Driver_VL53L1X   
Wippersnapper_AIRLIFT   WipperSnapper_I2C_Driver_HTU31D   WipperSnapper_I2C_Driver_SCD30   WipperSnapper_I2C_Driver_VL53L4CD   
a | d | s | w
diff --git a/html/dir_fcb6e4fbca5bd9aa8323205978345f78.html b/html/dir_fcb6e4fbca5bd9aa8323205978345f78.html index e62363130..b75077070 100644 --- a/html/dir_fcb6e4fbca5bd9aa8323205978345f78.html +++ b/html/dir_fcb6e4fbca5bd9aa8323205978345f78.html @@ -109,6 +109,8 @@   file  WipperSnapper_I2C_Driver_MAX17048.h [code]   +file  WipperSnapper_I2C_Driver_MCP3421.h [code] +  file  WipperSnapper_I2C_Driver_MCP9808.h [code]   file  WipperSnapper_I2C_Driver_MPL115A2.h [code] @@ -117,6 +119,8 @@   file  WipperSnapper_I2C_Driver_MS8607.h [code]   +file  WipperSnapper_I2C_Driver_NAU7802.h [code] +  file  WipperSnapper_I2C_Driver_PCT2075.h [code]   file  WipperSnapper_I2C_Driver_PM25.h [code] @@ -151,6 +155,10 @@   file  WipperSnapper_I2C_Driver_VL53L0X.h [code]   +file  WipperSnapper_I2C_Driver_VL53L1X.h [code] +  +file  WipperSnapper_I2C_Driver_VL53L4CD.h [code] +  file  WipperSnapper_I2C_Driver_VL6180X.h [code]   diff --git a/html/files.html b/html/files.html index 2d2f9c6cb..6572f4533 100644 --- a/html/files.html +++ b/html/files.html @@ -76,96 +76,100 @@  ws_ds18x20.cpp  ws_ds18x20.h   i2c -  drivers - WipperSnapper_I2C_Driver.h - WipperSnapper_I2C_Driver_ADT7410.h - WipperSnapper_I2C_Driver_AHTX0.h - WipperSnapper_I2C_Driver_BH1750.h - WipperSnapper_I2C_Driver_BME280.h - WipperSnapper_I2C_Driver_BME680.h - WipperSnapper_I2C_Driver_BMP280.h - WipperSnapper_I2C_Driver_BMP3XX.h - WipperSnapper_I2C_Driver_DPS310.h - WipperSnapper_I2C_Driver_ENS160.h - WipperSnapper_I2C_Driver_HTS221.h - WipperSnapper_I2C_Driver_HTU21D.h - WipperSnapper_I2C_Driver_HTU31D.h - WipperSnapper_I2C_Driver_INA219.h - WipperSnapper_I2C_Driver_LC709203F.h - WipperSnapper_I2C_Driver_LPS22HB.h - WipperSnapper_I2C_Driver_LPS25HB.h - WipperSnapper_I2C_Driver_LPS3XHW.h - WipperSnapper_I2C_Driver_LTR329_LTR303.h - WipperSnapper_I2C_Driver_LTR390.h - WipperSnapper_I2C_Driver_MAX17048.h - WipperSnapper_I2C_Driver_MCP9808.h - WipperSnapper_I2C_Driver_MPL115A2.h - WipperSnapper_I2C_Driver_MPRLS.h - WipperSnapper_I2C_Driver_MS8607.h - WipperSnapper_I2C_Driver_PCT2075.h - WipperSnapper_I2C_Driver_PM25.h - WipperSnapper_I2C_Driver_SCD30.h - WipperSnapper_I2C_Driver_SCD4X.h - WipperSnapper_I2C_Driver_SEN5X.h - WipperSnapper_I2C_Driver_SGP30.h - WipperSnapper_I2C_Driver_SGP40.h - WipperSnapper_I2C_Driver_SHT3X.h - WipperSnapper_I2C_Driver_SHT4X.h - WipperSnapper_I2C_Driver_SHTC3.h - WipperSnapper_I2C_Driver_SI7021.h - WipperSnapper_I2C_Driver_STEMMA_Soil_Sensor.h - WipperSnapper_I2C_Driver_TMP117.h - WipperSnapper_I2C_Driver_TSL2591.h - WipperSnapper_I2C_Driver_VCNL4020.h - WipperSnapper_I2C_Driver_VCNL4040.h - WipperSnapper_I2C_Driver_VEML7700.h - WipperSnapper_I2C_Driver_VL53L0X.h - WipperSnapper_I2C_Driver_VL6180X.h +  drivers + WipperSnapper_I2C_Driver.h + WipperSnapper_I2C_Driver_ADT7410.h + WipperSnapper_I2C_Driver_AHTX0.h + WipperSnapper_I2C_Driver_BH1750.h + WipperSnapper_I2C_Driver_BME280.h + WipperSnapper_I2C_Driver_BME680.h + WipperSnapper_I2C_Driver_BMP280.h + WipperSnapper_I2C_Driver_BMP3XX.h + WipperSnapper_I2C_Driver_DPS310.h + WipperSnapper_I2C_Driver_ENS160.h + WipperSnapper_I2C_Driver_HTS221.h + WipperSnapper_I2C_Driver_HTU21D.h + WipperSnapper_I2C_Driver_HTU31D.h + WipperSnapper_I2C_Driver_INA219.h + WipperSnapper_I2C_Driver_LC709203F.h + WipperSnapper_I2C_Driver_LPS22HB.h + WipperSnapper_I2C_Driver_LPS25HB.h + WipperSnapper_I2C_Driver_LPS3XHW.h + WipperSnapper_I2C_Driver_LTR329_LTR303.h + WipperSnapper_I2C_Driver_LTR390.h + WipperSnapper_I2C_Driver_MAX17048.h + WipperSnapper_I2C_Driver_MCP3421.h + WipperSnapper_I2C_Driver_MCP9808.h + WipperSnapper_I2C_Driver_MPL115A2.h + WipperSnapper_I2C_Driver_MPRLS.h + WipperSnapper_I2C_Driver_MS8607.h + WipperSnapper_I2C_Driver_NAU7802.h + WipperSnapper_I2C_Driver_PCT2075.h + WipperSnapper_I2C_Driver_PM25.h + WipperSnapper_I2C_Driver_SCD30.h + WipperSnapper_I2C_Driver_SCD4X.h + WipperSnapper_I2C_Driver_SEN5X.h + WipperSnapper_I2C_Driver_SGP30.h + WipperSnapper_I2C_Driver_SGP40.h + WipperSnapper_I2C_Driver_SHT3X.h + WipperSnapper_I2C_Driver_SHT4X.h + WipperSnapper_I2C_Driver_SHTC3.h + WipperSnapper_I2C_Driver_SI7021.h + WipperSnapper_I2C_Driver_STEMMA_Soil_Sensor.h + WipperSnapper_I2C_Driver_TMP117.h + WipperSnapper_I2C_Driver_TSL2591.h + WipperSnapper_I2C_Driver_VCNL4020.h + WipperSnapper_I2C_Driver_VCNL4040.h + WipperSnapper_I2C_Driver_VEML7700.h + WipperSnapper_I2C_Driver_VL53L0X.h + WipperSnapper_I2C_Driver_VL53L1X.h + WipperSnapper_I2C_Driver_VL53L4CD.h + WipperSnapper_I2C_Driver_VL6180X.h  WipperSnapper_I2C.cpp  WipperSnapper_I2C.h   ledc -  drivers -  servo - ws_ledc_servo.cpp - ws_ledc_servo.h - ws_ledc.cpp - ws_ledc.h -  pixels - ws_pixels.cpp - ws_pixels.h -  pwm - ws_pwm.cpp - ws_pwm.h -  register - Wippersnapper_Register.cpp -  servo - ws_servo.cpp - ws_servo.h -  statusLED - Wippersnapper_StatusLED.cpp - Wippersnapper_StatusLED.h -  uart -  drivers - ws_uart_drv.h - ws_uart_drv_pm25aqi.h - ws_uart.cpp - ws_uart.h -  display - ws_display_driver.cpp - ws_display_driver.h - ws_display_tooltips.h - ws_display_ui_helper.cpp - ws_display_ui_helper.h -  network_interfaces - Wippersnapper_AIRLIFT.h - Wippersnapper_ESP32.h - Wippersnapper_ESP8266.h - Wippersnapper_WIFININA.h - ws_networking_pico.h - Wippersnapper.cpp - Wippersnapper.h - Wippersnapper_Boards.h - Wippersnapper_Networking.h +  drivers +  servo + ws_ledc_servo.cpp + ws_ledc_servo.h + ws_ledc.cpp + ws_ledc.h +  pixels + ws_pixels.cpp + ws_pixels.h +  pwm + ws_pwm.cpp + ws_pwm.h +  register + Wippersnapper_Register.cpp +  servo + ws_servo.cpp + ws_servo.h +  statusLED + Wippersnapper_StatusLED.cpp + Wippersnapper_StatusLED.h +  uart +  drivers + ws_uart_drv.h + ws_uart_drv_pm25aqi.h + ws_uart.cpp + ws_uart.h +  display + ws_display_driver.cpp + ws_display_driver.h + ws_display_tooltips.h + ws_display_ui_helper.cpp + ws_display_ui_helper.h +  network_interfaces + Wippersnapper_AIRLIFT.h + Wippersnapper_ESP32.h + Wippersnapper_ESP8266.h + Wippersnapper_WIFININA.h + ws_networking_pico.h + Wippersnapper.cpp + Wippersnapper.h + Wippersnapper_Boards.h + Wippersnapper_Networking.h diff --git a/html/functions.html b/html/functions.html index ec23ec52b..eb52abb87 100644 --- a/html/functions.html +++ b/html/functions.html @@ -329,6 +329,9 @@

- _ -