From 9ceb5470f4c05b62db47c09cd0a7200efa78afe8 Mon Sep 17 00:00:00 2001 From: Doxygen CI Date: Fri, 22 Mar 2024 17:14:40 +0000 Subject: [PATCH] Deploy docs to GitHub Pages from commit 1731273506 Commit: 17312735069ee948342969b60aab9a35502b04ef GitHub Actions run: 8393791637 --- html/_wipper_snapper___i2_c_8h.html | 38 +- html/_wipper_snapper___i2_c_8h_source.html | 101 +- html/_wipper_snapper___i2_c___driver_8h.html | 10 +- ...per_snapper___i2_c___driver_8h_source.html | 238 +- ...apper___i2_c___driver___a_d_t7410_8h.html} | 16 +- ...__i2_c___driver___a_d_t7410_8h_source.html | 87 + ...___i2_c___driver___a_h_t_x0_8h_source.html | 22 +- ...r___i2_c___driver___b_h1750_8h_source.html | 87 + ...snapper___i2_c___driver___b_m_e280_8h.html | 2 +- ...___i2_c___driver___b_m_e280_8h_source.html | 37 +- ...snapper___i2_c___driver___b_m_e680_8h.html | 103 + ...___i2_c___driver___b_m_e680_8h_source.html | 93 + ...snapper___i2_c___driver___b_m_p280_8h.html | 103 + ...___i2_c___driver___b_m_p280_8h_source.html | 93 + ...apper___i2_c___driver___b_m_p3_x_x_8h.html | 103 + ..._i2_c___driver___b_m_p3_x_x_8h_source.html | 90 + ...___i2_c___driver___d_p_s310_8h_source.html | 28 +- ...snapper___i2_c___driver___e_n_s160_8h.html | 103 + ...___i2_c___driver___e_n_s160_8h_source.html | 90 + ...snapper___i2_c___driver___h_t_s221_8h.html | 92 + ...___i2_c___driver___h_t_s221_8h_source.html | 90 + ...napper___i2_c___driver___h_t_u21_d_8h.html | 92 + ...__i2_c___driver___h_t_u21_d_8h_source.html | 88 + ...napper___i2_c___driver___h_t_u31_d_8h.html | 92 + ...__i2_c___driver___h_t_u31_d_8h_source.html | 88 + ...snapper___i2_c___driver___i_n_a219_8h.html | 95 + ...___i2_c___driver___i_n_a219_8h_source.html | 88 + ...pper___i2_c___driver___l_c709203_f_8h.html | 95 + ...i2_c___driver___l_c709203_f_8h_source.html | 88 + ...pper___i2_c___driver___l_p_s22_h_b_8h.html | 95 + ...i2_c___driver___l_p_s22_h_b_8h_source.html | 90 + ...pper___i2_c___driver___l_p_s25_h_b_8h.html | 95 + ...i2_c___driver___l_p_s25_h_b_8h_source.html | 90 + ...per___i2_c___driver___l_p_s3_x_h_w_8h.html | 95 + ...2_c___driver___l_p_s3_x_h_w_8h_source.html | 88 + ...2_c___driver___l_t_r329___l_t_r303_8h.html | 95 + ...river___l_t_r329___l_t_r303_8h_source.html | 89 + ...snapper___i2_c___driver___l_t_r390_8h.html | 95 + ...___i2_c___driver___l_t_r390_8h_source.html | 88 + ...apper___i2_c___driver___m_a_x17048_8h.html | 95 + ..._i2_c___driver___m_a_x17048_8h_source.html | 88 + ...__i2_c___driver___m_c_p9601_8h_source.html | 88 - ...__i2_c___driver___m_c_p9808_8h_source.html | 10 +- ...pper___i2_c___driver___m_p_l115_a2_8h.html | 95 + ...i2_c___driver___m_p_l115_a2_8h_source.html | 88 + ...napper___i2_c___driver___m_p_r_l_s_8h.html | 95 + ...__i2_c___driver___m_p_r_l_s_8h_source.html | 87 + ..._snapper___i2_c___driver___m_s8607_8h.html | 95 + ...r___i2_c___driver___m_s8607_8h_source.html | 92 + ...napper___i2_c___driver___p_c_t2075_8h.html | 95 + ...__i2_c___driver___p_c_t2075_8h_source.html | 87 + ...er_snapper___i2_c___driver___p_m25_8h.html | 97 + ...per___i2_c___driver___p_m25_8h_source.html | 88 + ...r___i2_c___driver___s_c_d30_8h_source.html | 25 +- ...snapper___i2_c___driver___s_c_d4_x_8h.html | 96 + ...___i2_c___driver___s_c_d4_x_8h_source.html | 92 + ...snapper___i2_c___driver___s_e_n5_x_8h.html | 96 + ...___i2_c___driver___s_e_n5_x_8h_source.html | 100 + ...r___i2_c___driver___s_g_p30_8h_source.html | 88 + ..._snapper___i2_c___driver___s_g_p40_8h.html | 96 + ...r___i2_c___driver___s_g_p40_8h_source.html | 87 + ...snapper___i2_c___driver___s_h_t3_x_8h.html | 96 + ...___i2_c___driver___s_h_t3_x_8h_source.html | 87 + ...snapper___i2_c___driver___s_h_t4_x_8h.html | 96 + ...___i2_c___driver___s_h_t4_x_8h_source.html | 87 + ...snapper___i2_c___driver___s_h_t_c3_8h.html | 96 + ...___i2_c___driver___s_h_t_c3_8h_source.html | 87 + ..._snapper___i2_c___driver___s_i7021_8h.html | 96 + ...r___i2_c___driver___s_i7021_8h_source.html | 88 + ...iver___s_t_e_m_m_a___soil___sensor_8h.html | 95 + ...s_t_e_m_m_a___soil___sensor_8h_source.html | 88 + ...snapper___i2_c___driver___t_m_p117_8h.html | 95 + ...___i2_c___driver___t_m_p117_8h_source.html | 87 + ...__i2_c___driver___t_s_l2591_8h_source.html | 8 +- ...pper___i2_c___driver___v_c_n_l4020_8h.html | 95 + ...i2_c___driver___v_c_n_l4020_8h_source.html | 88 + ...pper___i2_c___driver___v_c_n_l4040_8h.html | 95 + ...i2_c___driver___v_c_n_l4040_8h_source.html | 88 + ...pper___i2_c___driver___v_e_m_l7700_8h.html | 95 + ...i2_c___driver___v_e_m_l7700_8h_source.html | 87 + ...apper___i2_c___driver___v_l53_l0_x_8h.html | 95 + ..._i2_c___driver___v_l53_l0_x_8h_source.html | 87 + ...napper___i2_c___driver___v_l6180_x_8h.html | 96 + ...__i2_c___driver___v_l6180_x_8h_source.html | 90 + html/_wippersnapper_8cpp.html | 524 ++- html/_wippersnapper_8h.html | 81 +- html/_wippersnapper_8h_source.html | 239 +- ...ppersnapper___a_i_r_l_i_f_t_8h_source.html | 59 +- html/_wippersnapper___analog_i_o_8cpp.html | 2 +- html/_wippersnapper___analog_i_o_8h.html | 10 +- ..._wippersnapper___analog_i_o_8h_source.html | 18 +- html/_wippersnapper___boards_8h.html | 44 +- html/_wippersnapper___boards_8h_source.html | 2 +- ...ersnapper___digital_g_p_i_o_8h_source.html | 2 +- html/_wippersnapper___e_s_p32_8h.html | 40 +- html/_wippersnapper___e_s_p32_8h_source.html | 43 +- .../_wippersnapper___e_s_p8266_8h_source.html | 29 +- html/_wippersnapper___networking_8h.html | 29 +- ..._wippersnapper___networking_8h_source.html | 5 +- html/_wippersnapper___status_l_e_d_8cpp.html | 292 +- html/_wippersnapper___status_l_e_d_8h.html | 519 +++ ...ippersnapper___status_l_e_d_8h_source.html | 88 + ...persnapper___status_l_e_d___colors_8h.html | 185 - ...per___status_l_e_d___colors_8h_source.html | 78 - ...ersnapper___w_i_f_i_n_i_n_a_8h_source.html | 53 +- html/annotated.html | 81 +- ...er_snapper___component___i2_c-members.html | 21 +- ...ass_wipper_snapper___component___i2_c.html | 40 + ...ipper_snapper___i2_c___driver-members.html | 185 +- .../class_wipper_snapper___i2_c___driver.html | 3502 +++++++++++++---- html/class_wipper_snapper___i2_c___driver.png | Bin 2282 -> 28615 bytes ...r___i2_c___driver___a_d_t7410-members.html | 224 ++ ...r_snapper___i2_c___driver___a_d_t7410.html | 652 +++ ...er_snapper___i2_c___driver___a_d_t7410.png | Bin 0 -> 813 bytes ...er___i2_c___driver___a_h_t_x0-members.html | 189 +- ...er_snapper___i2_c___driver___a_h_t_x0.html | 545 ++- ...per___i2_c___driver___b_h1750-members.html | 224 ++ ...per_snapper___i2_c___driver___b_h1750.html | 654 +++ ...pper_snapper___i2_c___driver___b_h1750.png | Bin 0 -> 814 bytes ...er___i2_c___driver___b_m_e280-members.html | 189 +- ...er_snapper___i2_c___driver___b_m_e280.html | 653 +-- ...er___i2_c___driver___b_m_e680-members.html | 225 ++ ...er_snapper___i2_c___driver___b_m_e680.html | 831 ++++ ...per_snapper___i2_c___driver___b_m_e680.png | Bin 0 -> 802 bytes ...er___i2_c___driver___b_m_p280-members.html | 227 ++ ...er_snapper___i2_c___driver___b_m_p280.html | 808 ++++ ...per_snapper___i2_c___driver___b_m_p280.png | Bin 0 -> 810 bytes ...___i2_c___driver___b_m_p3_x_x-members.html | 224 ++ ..._snapper___i2_c___driver___b_m_p3_x_x.html | 726 ++++ ...r_snapper___i2_c___driver___b_m_p3_x_x.png | Bin 0 -> 821 bytes ...er___i2_c___driver___d_p_s310-members.html | 189 +- ...er_snapper___i2_c___driver___d_p_s310.html | 617 +-- ...er___i2_c___driver___e_n_s160-members.html | 225 ++ ...er_snapper___i2_c___driver___e_n_s160.html | 757 ++++ ...per_snapper___i2_c___driver___e_n_s160.png | Bin 0 -> 814 bytes ...er___i2_c___driver___h_t_s221-members.html | 226 ++ ...er_snapper___i2_c___driver___h_t_s221.html | 744 ++++ ...per_snapper___i2_c___driver___h_t_s221.png | Bin 0 -> 806 bytes ...r___i2_c___driver___h_t_u21_d-members.html | 224 ++ ...r_snapper___i2_c___driver___h_t_u21_d.html | 689 ++++ ...er_snapper___i2_c___driver___h_t_u21_d.png | Bin 0 -> 805 bytes ...r___i2_c___driver___h_t_u31_d-members.html | 224 ++ ...r_snapper___i2_c___driver___h_t_u31_d.html | 689 ++++ ...er_snapper___i2_c___driver___h_t_u31_d.png | Bin 0 -> 803 bytes ...er___i2_c___driver___i_n_a219-members.html | 224 ++ ...er_snapper___i2_c___driver___i_n_a219.html | 689 ++++ ...per_snapper___i2_c___driver___i_n_a219.png | Bin 0 -> 810 bytes ...__i2_c___driver___l_c709203_f-members.html | 224 ++ ...snapper___i2_c___driver___l_c709203_f.html | 689 ++++ ..._snapper___i2_c___driver___l_c709203_f.png | Bin 0 -> 817 bytes ...__i2_c___driver___l_p_s22_h_b-members.html | 226 ++ ...snapper___i2_c___driver___l_p_s22_h_b.html | 744 ++++ ..._snapper___i2_c___driver___l_p_s22_h_b.png | Bin 0 -> 820 bytes ...__i2_c___driver___l_p_s25_h_b-members.html | 226 ++ ...snapper___i2_c___driver___l_p_s25_h_b.html | 744 ++++ ..._snapper___i2_c___driver___l_p_s25_h_b.png | Bin 0 -> 818 bytes ..._i2_c___driver___l_p_s3_x_h_w-members.html | 224 ++ ...napper___i2_c___driver___l_p_s3_x_h_w.html | 689 ++++ ...snapper___i2_c___driver___l_p_s3_x_h_w.png | Bin 0 -> 814 bytes ..._driver___l_t_r329___l_t_r303-members.html | 225 ++ ...__i2_c___driver___l_t_r329___l_t_r303.html | 693 ++++ ...___i2_c___driver___l_t_r329___l_t_r303.png | Bin 0 -> 884 bytes ...er___i2_c___driver___l_t_r390-members.html | 224 ++ ...er_snapper___i2_c___driver___l_t_r390.html | 689 ++++ ...per_snapper___i2_c___driver___l_t_r390.png | Bin 0 -> 799 bytes ...___i2_c___driver___m_a_x17048-members.html | 224 ++ ..._snapper___i2_c___driver___m_a_x17048.html | 689 ++++ ...r_snapper___i2_c___driver___m_a_x17048.png | Bin 0 -> 840 bytes ...r___i2_c___driver___m_c_p9601-members.html | 169 - ...r_snapper___i2_c___driver___m_c_p9601.html | 548 --- ...er_snapper___i2_c___driver___m_c_p9601.png | Bin 806 -> 0 bytes ...r___i2_c___driver___m_c_p9808-members.html | 189 +- ...r_snapper___i2_c___driver___m_c_p9808.html | 545 ++- ...__i2_c___driver___m_p_l115_a2-members.html | 224 ++ ...snapper___i2_c___driver___m_p_l115_a2.html | 689 ++++ ..._snapper___i2_c___driver___m_p_l115_a2.png | Bin 0 -> 826 bytes ...r___i2_c___driver___m_p_r_l_s-members.html | 224 ++ ...r_snapper___i2_c___driver___m_p_r_l_s.html | 652 +++ ...er_snapper___i2_c___driver___m_p_r_l_s.png | Bin 0 -> 802 bytes ...per___i2_c___driver___m_s8607-members.html | 227 ++ ...per_snapper___i2_c___driver___m_s8607.html | 808 ++++ ...pper_snapper___i2_c___driver___m_s8607.png | Bin 0 -> 809 bytes ...r___i2_c___driver___p_c_t2075-members.html | 224 ++ ...r_snapper___i2_c___driver___p_c_t2075.html | 652 +++ ...er_snapper___i2_c___driver___p_c_t2075.png | Bin 0 -> 817 bytes ...apper___i2_c___driver___p_m25-members.html | 223 ++ ...ipper_snapper___i2_c___driver___p_m25.html | 722 ++++ ...wipper_snapper___i2_c___driver___p_m25.png | Bin 0 -> 802 bytes ...per___i2_c___driver___s_c_d30-members.html | 190 +- ...per_snapper___i2_c___driver___s_c_d30.html | 557 ++- ...er___i2_c___driver___s_c_d4_x-members.html | 227 ++ ...er_snapper___i2_c___driver___s_c_d4_x.html | 765 ++++ ...per_snapper___i2_c___driver___s_c_d4_x.png | Bin 0 -> 814 bytes ...er___i2_c___driver___s_e_n5_x-members.html | 224 ++ ...er_snapper___i2_c___driver___s_e_n5_x.html | 908 +++++ ...per_snapper___i2_c___driver___s_e_n5_x.png | Bin 0 -> 813 bytes ...per___i2_c___driver___s_g_p30-members.html | 224 ++ ...per_snapper___i2_c___driver___s_g_p30.html | 689 ++++ ...pper_snapper___i2_c___driver___s_g_p30.png | Bin 0 -> 807 bytes ...per___i2_c___driver___s_g_p40-members.html | 223 ++ ...per_snapper___i2_c___driver___s_g_p40.html | 685 ++++ ...pper_snapper___i2_c___driver___s_g_p40.png | Bin 0 -> 811 bytes ...er___i2_c___driver___s_h_t3_x-members.html | 223 ++ ...er_snapper___i2_c___driver___s_h_t3_x.html | 685 ++++ ...per_snapper___i2_c___driver___s_h_t3_x.png | Bin 0 -> 809 bytes ...er___i2_c___driver___s_h_t4_x-members.html | 223 ++ ...er_snapper___i2_c___driver___s_h_t4_x.html | 685 ++++ ...per_snapper___i2_c___driver___s_h_t4_x.png | Bin 0 -> 817 bytes ...er___i2_c___driver___s_h_t_c3-members.html | 223 ++ ...er_snapper___i2_c___driver___s_h_t_c3.html | 685 ++++ ...per_snapper___i2_c___driver___s_h_t_c3.png | Bin 0 -> 807 bytes ...per___i2_c___driver___s_i7021-members.html | 224 ++ ...per_snapper___i2_c___driver___s_i7021.html | 689 ++++ ...pper_snapper___i2_c___driver___s_i7021.png | Bin 0 -> 801 bytes ...__s_t_e_m_m_a___soil___sensor-members.html | 224 ++ ..._driver___s_t_e_m_m_a___soil___sensor.html | 689 ++++ ...__driver___s_t_e_m_m_a___soil___sensor.png | Bin 0 -> 1019 bytes ...er___i2_c___driver___t_m_p117-members.html | 224 ++ ...er_snapper___i2_c___driver___t_m_p117.html | 652 +++ ...per_snapper___i2_c___driver___t_m_p117.png | Bin 0 -> 802 bytes ...r___i2_c___driver___t_s_l2591-members.html | 189 +- ...r_snapper___i2_c___driver___t_s_l2591.html | 537 ++- ...__i2_c___driver___v_c_n_l4020-members.html | 224 ++ ...snapper___i2_c___driver___v_c_n_l4020.html | 689 ++++ ..._snapper___i2_c___driver___v_c_n_l4020.png | Bin 0 -> 832 bytes ...__i2_c___driver___v_c_n_l4040-members.html | 224 ++ ...snapper___i2_c___driver___v_c_n_l4040.html | 689 ++++ ..._snapper___i2_c___driver___v_c_n_l4040.png | Bin 0 -> 826 bytes ...__i2_c___driver___v_e_m_l7700-members.html | 224 ++ ...snapper___i2_c___driver___v_e_m_l7700.html | 652 +++ ..._snapper___i2_c___driver___v_e_m_l7700.png | Bin 0 -> 827 bytes ...___i2_c___driver___v_l53_l0_x-members.html | 224 ++ ..._snapper___i2_c___driver___v_l53_l0_x.html | 652 +++ ...r_snapper___i2_c___driver___v_l53_l0_x.png | Bin 0 -> 817 bytes ...r___i2_c___driver___v_l6180_x-members.html | 224 ++ ...r_snapper___i2_c___driver___v_l6180_x.html | 689 ++++ ...er_snapper___i2_c___driver___v_l6180_x.png | Bin 0 -> 815 bytes html/class_wippersnapper-members.html | 143 +- html/class_wippersnapper.html | 721 +++- html/class_wippersnapper.png | Bin 859 -> 1085 bytes ...wippersnapper___a_i_r_l_i_f_t-members.html | 161 +- html/class_wippersnapper___a_i_r_l_i_f_t.html | 225 +- ...ss_wippersnapper___analog_i_o-members.html | 20 +- html/class_wippersnapper___analog_i_o.html | 175 +- ...class_wippersnapper___e_s_p32-members.html | 199 + html/class_wippersnapper___e_s_p32.html | 711 ++++ html/class_wippersnapper___e_s_p32.png | Bin 0 -> 589 bytes ...ppersnapper___w_i_f_i_n_i_n_a-members.html | 123 +- ...class_wippersnapper___w_i_f_i_n_i_n_a.html | 237 +- html/classes.html | 29 +- html/classws__display__driver-members.html | 86 + html/classws__display__driver.html | 238 ++ .../classws__display__ui__helper-members.html | 88 + html/classws__display__ui__helper.html | 300 ++ html/classws__ds18x20-members.html | 81 + html/classws__ds18x20.html | 163 + html/classws__ledc-members.html | 83 + html/classws__ledc.html | 301 ++ html/classws__ledc__servo-members.html | 83 + html/classws__ledc__servo.html | 240 ++ html/classws__pixels-members.html | 88 + html/classws__pixels.html | 419 ++ html/classws__pwm-members.html | 84 + html/classws__pwm.html | 316 ++ html/classws__servo-members.html | 82 + html/classws__servo.html | 250 ++ html/classws__uart-members.html | 85 + html/classws__uart.html | 311 ++ html/classws__uart__drv-members.html | 90 + html/classws__uart__drv.html | 481 +++ html/classws__uart__drv.png | Bin 0 -> 596 bytes html/classws__uart__drv__pm25aqi-members.html | 95 + html/classws__uart__drv__pm25aqi.html | 277 ++ html/classws__uart__drv__pm25aqi.png | Bin 0 -> 594 bytes .../dir_1bf34071b5c34aeb2298e89f81870d46.html | 88 + .../dir_25685f9c6d837c57f295dee081495707.html | 94 + .../dir_2b98c2593a5154f8393c750678511cb8.html | 85 + .../dir_3703427030471753114ca50dce88ebe4.html | 2 +- .../dir_384afa6800dc01af341b7a1d1ac42cdb.html | 85 + .../dir_4a9519a49e9051d84f0b3b7a9ac45fe1.html | 81 + .../dir_5530f73bcc1d8b92ed43c0b82a3caa25.html | 85 + .../dir_59ed2539fffb4b351d4fc696f9094d0c.html | 85 + .../dir_64d940c68f440c6677ca2d67056379f6.html | 85 + .../dir_67d90efdfbd9abd693dc1a39320da59d.html | 77 + .../dir_7e0264f5491619e7733fa0e2608679bb.html | 2 + .../dir_b0858889b128cdb2e1f9732cd3ebc543.html | 85 + .../dir_dd6d0c9df332df1027f85d48991e6e3f.html | 83 + .../dir_fcb6e4fbca5bd9aa8323205978345f78.html | 70 +- html/files.html | 122 +- html/functions.html | 354 +- html/functions_0x7e.html | 124 +- html/functions_a.html | 98 + html/functions_b.html | 54 +- html/functions_c.html | 19 +- html/functions_d.html | 69 +- html/functions_e.html | 45 +- html/functions_f.html | 3 + html/functions_func.html | 2 + html/functions_func_0x7e.html | 124 +- html/functions_func_a.html | 98 + html/functions_func_b.html | 49 +- html/functions_func_c.html | 19 +- html/functions_func_d.html | 60 +- html/functions_func_e.html | 44 +- html/functions_func_f.html | 3 + html/functions_func_g.html | 312 +- html/functions_func_h.html | 2 +- html/functions_func_i.html | 18 +- html/functions_func_n.html | 4 + html/functions_func_p.html | 9 +- html/functions_func_r.html | 11 +- html/functions_func_s.html | 167 +- html/functions_func_t.html | 79 + html/functions_func_u.html | 35 +- html/functions_func_w.html | 148 +- html/functions_g.html | 312 +- html/functions_h.html | 2 +- html/functions_i.html | 21 +- html/functions_m.html | 18 + html/functions_n.html | 13 + html/functions_o.html | 82 + html/functions_p.html | 27 +- html/functions_r.html | 11 +- html/functions_s.html | 172 +- html/functions_t.html | 9 + html/functions_u.html | 38 +- html/functions_vars.html | 412 +- html/functions_vars_b.html | 79 + html/functions_vars_d.html | 82 + html/functions_vars_e.html | 76 + html/functions_vars_i.html | 79 + html/functions_vars_l.html | 82 + html/functions_vars_m.html | 94 + html/functions_vars_n.html | 82 + html/functions_vars_o.html | 82 + html/functions_vars_p.html | 110 + html/functions_vars_r.html | 76 + html/functions_vars_s.html | 91 + html/functions_vars_t.html | 85 + html/functions_vars_u.html | 76 + html/functions_w.html | 148 +- html/globals.html | 293 +- html/globals_defs.html | 167 +- html/globals_enum.html | 5 +- html/globals_eval.html | 86 + html/globals_func.html | 124 +- html/globals_type.html | 77 + html/globals_vars.html | 23 +- html/hierarchy.html | 81 +- html/index.html | 2 +- html/menudata.js | 47 +- html/search/all_0.js | 137 +- html/search/all_1.js | 9 + html/search/all_10.js | 88 +- html/search/all_11.js | 22 +- html/search/all_12.js | 9 +- html/search/all_13.js | 122 +- html/search/all_14.js | 2 +- html/search/all_15.js | 46 +- html/search/all_2.js | 12 +- html/search/all_3.js | 21 +- html/search/all_4.js | 28 +- html/search/all_5.js | 20 +- html/search/all_6.js | 1 + html/search/all_7.js | 92 +- html/search/all_8.js | 2 +- html/search/all_9.js | 13 +- html/search/all_a.js | 25 +- html/search/all_b.js | 16 +- html/search/all_c.js | 8 +- html/search/all_d.js | 18 +- html/search/all_e.js | 31 +- html/search/all_f.js | 59 +- html/search/classes_1.js | 3 +- html/search/classes_2.js | 18 +- html/search/classes_3.html | 26 + html/search/classes_3.js | 65 + html/search/defines_0.js | 3 +- html/search/defines_1.js | 4 +- html/search/defines_10.html | 26 + html/search/defines_10.js | 4 + html/search/defines_2.js | 2 +- html/search/defines_3.js | 3 +- html/search/defines_4.js | 7 +- html/search/defines_5.js | 2 +- html/search/defines_6.js | 3 +- html/search/defines_7.js | 10 +- html/search/defines_8.js | 11 +- html/search/defines_9.js | 7 +- html/search/defines_a.js | 12 +- html/search/defines_b.js | 2 +- html/search/defines_c.html | 26 + html/search/defines_c.js | 16 + html/search/defines_d.html | 26 + html/search/defines_d.js | 9 + html/search/defines_e.html | 26 + html/search/defines_e.js | 7 + html/search/defines_f.html | 26 + html/search/defines_f.js | 16 + html/search/enums_1.js | 5 +- html/search/enums_2.html | 26 + html/search/enums_2.js | 7 + html/search/enumvalues_0.html | 26 + html/search/enumvalues_0.js | 8 + html/search/files_0.js | 61 +- html/search/functions_0.js | 4 +- html/search/functions_1.js | 11 +- html/search/functions_10.js | 17 +- html/search/functions_11.html | 26 + html/search/functions_11.js | 64 + html/search/functions_12.html | 26 + html/search/functions_12.js | 55 + html/search/functions_2.js | 17 +- html/search/functions_3.js | 44 +- html/search/functions_4.js | 33 +- html/search/functions_5.js | 14 +- html/search/functions_6.js | 20 +- html/search/functions_7.js | 87 +- html/search/functions_8.js | 7 +- html/search/functions_9.js | 12 +- html/search/functions_a.js | 12 +- html/search/functions_b.js | 7 +- html/search/functions_c.js | 58 +- html/search/functions_d.js | 17 +- html/search/functions_e.js | 56 +- html/search/functions_f.js | 15 +- html/search/searchdata.js | 32 +- html/search/typedefs_0.html | 26 + html/search/typedefs_0.js | 5 + html/search/variables_0.js | 133 +- html/search/variables_1.js | 1 + html/search/variables_2.js | 4 +- html/search/variables_3.js | 4 +- html/search/variables_4.js | 3 +- html/search/variables_5.js | 8 +- html/search/variables_6.js | 8 +- html/search/variables_7.js | 4 +- html/search/variables_8.js | 6 +- html/search/variables_9.js | 11 +- html/search/variables_a.html | 26 + html/search/variables_a.js | 4 + html/search/variables_b.html | 26 + html/search/variables_b.js | 10 + html/search/variables_c.html | 26 + html/search/variables_c.js | 7 + html/search/variables_d.html | 26 + html/search/variables_d.js | 4 + html/search/variables_e.html | 26 + html/search/variables_e.js | 4 + html/struct_servo_pin__t-members.html | 78 + html/struct_servo_pin__t.html | 95 + html/structanalog_input_pin-members.html | 11 +- html/structanalog_input_pin.html | 6 +- html/structds18x20_obj-members.html | 83 + html/structds18x20_obj.html | 129 + html/structservo__t-members.html | 77 + html/structservo__t.html | 91 + html/structservo_component-members.html | 78 + html/structservo_component.html | 95 + html/structstrand__s-members.html | 85 + html/structstrand__s.html | 123 + html/ws__display__driver_8cpp.html | 83 + html/ws__display__driver_8h.html | 128 + html/ws__display__driver_8h_source.html | 90 + html/ws__display__tooltips_8h.html | 123 + html/ws__display__tooltips_8h_source.html | 77 + html/ws__display__ui__helper_8cpp.html | 119 + html/ws__display__ui__helper_8h.html | 197 + html/ws__display__ui__helper_8h_source.html | 100 + html/ws__ds18x20_8cpp.html | 83 + html/ws__ds18x20_8h.html | 120 + html/ws__ds18x20_8h_source.html | 89 + html/ws__ledc_8cpp.html | 83 + html/ws__ledc_8h.html | 118 + html/ws__ledc_8h_source.html | 88 + html/ws__ledc__servo_8cpp.html | 84 + html/ws__ledc__servo_8h.html | 136 + html/ws__ledc__servo_8h_source.html | 92 + html/ws__networking__pico_8h.html | 84 + html/ws__networking__pico_8h_source.html | 94 + html/ws__pixels_8cpp.html | 109 + html/ws__pixels_8h.html | 130 + html/ws__pixels_8h_source.html | 91 + html/ws__pwm_8cpp.html | 83 + html/ws__pwm_8h_source.html | 90 + html/ws__servo_8cpp.html | 83 + html/ws__servo_8h.html | 135 + html/ws__servo_8h_source.html | 87 + html/ws__uart_8cpp.html | 83 + html/ws__uart_8h.html | 96 + html/ws__uart_8h_source.html | 90 + html/ws__uart__drv_8h.html | 96 + html/ws__uart__drv_8h_source.html | 92 + html/ws__uart__drv__pm25aqi_8h.html | 96 + html/ws__uart__drv__pm25aqi_8h_source.html | 96 + 495 files changed, 67252 insertions(+), 5906 deletions(-) rename html/{_wipper_snapper___i2_c___driver___m_c_p9601_8h.html => _wipper_snapper___i2_c___driver___a_d_t7410_8h.html} (86%) create mode 100644 html/_wipper_snapper___i2_c___driver___a_d_t7410_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___b_h1750_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___b_m_e680_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___b_m_e680_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___b_m_p280_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___b_m_p280_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___b_m_p3_x_x_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___b_m_p3_x_x_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___e_n_s160_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___e_n_s160_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___h_t_s221_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___h_t_s221_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___h_t_u21_d_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___h_t_u21_d_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___h_t_u31_d_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___h_t_u31_d_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___i_n_a219_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___i_n_a219_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_c709203_f_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_c709203_f_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_p_s22_h_b_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_p_s22_h_b_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_p_s25_h_b_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_p_s25_h_b_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_p_s3_x_h_w_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_p_s3_x_h_w_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_t_r329___l_t_r303_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_t_r329___l_t_r303_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_t_r390_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___l_t_r390_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___m_a_x17048_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___m_a_x17048_8h_source.html delete mode 100644 html/_wipper_snapper___i2_c___driver___m_c_p9601_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___m_p_l115_a2_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___m_p_l115_a2_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___m_p_r_l_s_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___m_p_r_l_s_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___m_s8607_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___m_s8607_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___p_c_t2075_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___p_c_t2075_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___p_m25_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___p_m25_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_c_d4_x_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_c_d4_x_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_e_n5_x_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_e_n5_x_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_g_p30_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_g_p40_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_g_p40_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_h_t3_x_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_h_t3_x_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_h_t4_x_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_h_t4_x_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_h_t_c3_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_h_t_c3_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_i7021_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_i7021_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_t_e_m_m_a___soil___sensor_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___s_t_e_m_m_a___soil___sensor_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___t_m_p117_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___t_m_p117_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___v_c_n_l4020_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___v_c_n_l4020_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___v_c_n_l4040_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___v_c_n_l4040_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___v_e_m_l7700_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___v_e_m_l7700_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___v_l53_l0_x_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___v_l53_l0_x_8h_source.html create mode 100644 html/_wipper_snapper___i2_c___driver___v_l6180_x_8h.html create mode 100644 html/_wipper_snapper___i2_c___driver___v_l6180_x_8h_source.html create mode 100644 html/_wippersnapper___status_l_e_d_8h.html create mode 100644 html/_wippersnapper___status_l_e_d_8h_source.html delete mode 100644 html/_wippersnapper___status_l_e_d___colors_8h.html delete mode 100644 html/_wippersnapper___status_l_e_d___colors_8h_source.html create mode 100644 html/class_wipper_snapper___i2_c___driver___a_d_t7410-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___a_d_t7410.html create mode 100644 html/class_wipper_snapper___i2_c___driver___a_d_t7410.png create mode 100644 html/class_wipper_snapper___i2_c___driver___b_h1750-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___b_h1750.html create mode 100644 html/class_wipper_snapper___i2_c___driver___b_h1750.png create mode 100644 html/class_wipper_snapper___i2_c___driver___b_m_e680-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___b_m_e680.html create mode 100644 html/class_wipper_snapper___i2_c___driver___b_m_e680.png create mode 100644 html/class_wipper_snapper___i2_c___driver___b_m_p280-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___b_m_p280.html create mode 100644 html/class_wipper_snapper___i2_c___driver___b_m_p280.png create mode 100644 html/class_wipper_snapper___i2_c___driver___b_m_p3_x_x-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___b_m_p3_x_x.html create mode 100644 html/class_wipper_snapper___i2_c___driver___b_m_p3_x_x.png create mode 100644 html/class_wipper_snapper___i2_c___driver___e_n_s160-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___e_n_s160.html create mode 100644 html/class_wipper_snapper___i2_c___driver___e_n_s160.png create mode 100644 html/class_wipper_snapper___i2_c___driver___h_t_s221-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___h_t_s221.html create mode 100644 html/class_wipper_snapper___i2_c___driver___h_t_s221.png create mode 100644 html/class_wipper_snapper___i2_c___driver___h_t_u21_d-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___h_t_u21_d.html create mode 100644 html/class_wipper_snapper___i2_c___driver___h_t_u21_d.png create mode 100644 html/class_wipper_snapper___i2_c___driver___h_t_u31_d-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___h_t_u31_d.html create mode 100644 html/class_wipper_snapper___i2_c___driver___h_t_u31_d.png create mode 100644 html/class_wipper_snapper___i2_c___driver___i_n_a219-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___i_n_a219.html create mode 100644 html/class_wipper_snapper___i2_c___driver___i_n_a219.png create mode 100644 html/class_wipper_snapper___i2_c___driver___l_c709203_f-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_c709203_f.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_c709203_f.png create mode 100644 html/class_wipper_snapper___i2_c___driver___l_p_s22_h_b-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_p_s22_h_b.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_p_s22_h_b.png create mode 100644 html/class_wipper_snapper___i2_c___driver___l_p_s25_h_b-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_p_s25_h_b.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_p_s25_h_b.png create mode 100644 html/class_wipper_snapper___i2_c___driver___l_p_s3_x_h_w-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_p_s3_x_h_w.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_p_s3_x_h_w.png create mode 100644 html/class_wipper_snapper___i2_c___driver___l_t_r329___l_t_r303-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_t_r329___l_t_r303.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_t_r329___l_t_r303.png create mode 100644 html/class_wipper_snapper___i2_c___driver___l_t_r390-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_t_r390.html create mode 100644 html/class_wipper_snapper___i2_c___driver___l_t_r390.png create mode 100644 html/class_wipper_snapper___i2_c___driver___m_a_x17048-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___m_a_x17048.html create mode 100644 html/class_wipper_snapper___i2_c___driver___m_a_x17048.png delete mode 100644 html/class_wipper_snapper___i2_c___driver___m_c_p9601-members.html delete mode 100644 html/class_wipper_snapper___i2_c___driver___m_c_p9601.html delete mode 100644 html/class_wipper_snapper___i2_c___driver___m_c_p9601.png create mode 100644 html/class_wipper_snapper___i2_c___driver___m_p_l115_a2-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___m_p_l115_a2.html create mode 100644 html/class_wipper_snapper___i2_c___driver___m_p_l115_a2.png create mode 100644 html/class_wipper_snapper___i2_c___driver___m_p_r_l_s-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___m_p_r_l_s.html create mode 100644 html/class_wipper_snapper___i2_c___driver___m_p_r_l_s.png create mode 100644 html/class_wipper_snapper___i2_c___driver___m_s8607-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___m_s8607.html create mode 100644 html/class_wipper_snapper___i2_c___driver___m_s8607.png create mode 100644 html/class_wipper_snapper___i2_c___driver___p_c_t2075-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___p_c_t2075.html create mode 100644 html/class_wipper_snapper___i2_c___driver___p_c_t2075.png create mode 100644 html/class_wipper_snapper___i2_c___driver___p_m25-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___p_m25.html create mode 100644 html/class_wipper_snapper___i2_c___driver___p_m25.png create mode 100644 html/class_wipper_snapper___i2_c___driver___s_c_d4_x-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_c_d4_x.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_c_d4_x.png create mode 100644 html/class_wipper_snapper___i2_c___driver___s_e_n5_x-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_e_n5_x.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_e_n5_x.png create mode 100644 html/class_wipper_snapper___i2_c___driver___s_g_p30-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_g_p30.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_g_p30.png create mode 100644 html/class_wipper_snapper___i2_c___driver___s_g_p40-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_g_p40.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_g_p40.png create mode 100644 html/class_wipper_snapper___i2_c___driver___s_h_t3_x-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_h_t3_x.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_h_t3_x.png create mode 100644 html/class_wipper_snapper___i2_c___driver___s_h_t4_x-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_h_t4_x.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_h_t4_x.png create mode 100644 html/class_wipper_snapper___i2_c___driver___s_h_t_c3-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_h_t_c3.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_h_t_c3.png create mode 100644 html/class_wipper_snapper___i2_c___driver___s_i7021-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_i7021.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_i7021.png create mode 100644 html/class_wipper_snapper___i2_c___driver___s_t_e_m_m_a___soil___sensor-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_t_e_m_m_a___soil___sensor.html create mode 100644 html/class_wipper_snapper___i2_c___driver___s_t_e_m_m_a___soil___sensor.png create mode 100644 html/class_wipper_snapper___i2_c___driver___t_m_p117-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___t_m_p117.html create mode 100644 html/class_wipper_snapper___i2_c___driver___t_m_p117.png create mode 100644 html/class_wipper_snapper___i2_c___driver___v_c_n_l4020-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___v_c_n_l4020.html create mode 100644 html/class_wipper_snapper___i2_c___driver___v_c_n_l4020.png create mode 100644 html/class_wipper_snapper___i2_c___driver___v_c_n_l4040-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___v_c_n_l4040.html create mode 100644 html/class_wipper_snapper___i2_c___driver___v_c_n_l4040.png create mode 100644 html/class_wipper_snapper___i2_c___driver___v_e_m_l7700-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___v_e_m_l7700.html create mode 100644 html/class_wipper_snapper___i2_c___driver___v_e_m_l7700.png create mode 100644 html/class_wipper_snapper___i2_c___driver___v_l53_l0_x-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___v_l53_l0_x.html create mode 100644 html/class_wipper_snapper___i2_c___driver___v_l53_l0_x.png create mode 100644 html/class_wipper_snapper___i2_c___driver___v_l6180_x-members.html create mode 100644 html/class_wipper_snapper___i2_c___driver___v_l6180_x.html create mode 100644 html/class_wipper_snapper___i2_c___driver___v_l6180_x.png create mode 100644 html/class_wippersnapper___e_s_p32-members.html create mode 100644 html/class_wippersnapper___e_s_p32.html create mode 100644 html/class_wippersnapper___e_s_p32.png create mode 100644 html/classws__display__driver-members.html create mode 100644 html/classws__display__driver.html create mode 100644 html/classws__display__ui__helper-members.html create mode 100644 html/classws__display__ui__helper.html create mode 100644 html/classws__ds18x20-members.html create mode 100644 html/classws__ds18x20.html create mode 100644 html/classws__ledc-members.html create mode 100644 html/classws__ledc.html create mode 100644 html/classws__ledc__servo-members.html create mode 100644 html/classws__ledc__servo.html create mode 100644 html/classws__pixels-members.html create mode 100644 html/classws__pixels.html create mode 100644 html/classws__pwm-members.html create mode 100644 html/classws__pwm.html create mode 100644 html/classws__servo-members.html create mode 100644 html/classws__servo.html create mode 100644 html/classws__uart-members.html create mode 100644 html/classws__uart.html create mode 100644 html/classws__uart__drv-members.html create mode 100644 html/classws__uart__drv.html create mode 100644 html/classws__uart__drv.png create mode 100644 html/classws__uart__drv__pm25aqi-members.html create mode 100644 html/classws__uart__drv__pm25aqi.html create mode 100644 html/classws__uart__drv__pm25aqi.png create mode 100644 html/dir_1bf34071b5c34aeb2298e89f81870d46.html create mode 100644 html/dir_25685f9c6d837c57f295dee081495707.html create mode 100644 html/dir_2b98c2593a5154f8393c750678511cb8.html create mode 100644 html/dir_384afa6800dc01af341b7a1d1ac42cdb.html create mode 100644 html/dir_4a9519a49e9051d84f0b3b7a9ac45fe1.html create mode 100644 html/dir_5530f73bcc1d8b92ed43c0b82a3caa25.html create mode 100644 html/dir_59ed2539fffb4b351d4fc696f9094d0c.html create mode 100644 html/dir_64d940c68f440c6677ca2d67056379f6.html create mode 100644 html/dir_67d90efdfbd9abd693dc1a39320da59d.html create mode 100644 html/dir_b0858889b128cdb2e1f9732cd3ebc543.html create mode 100644 html/dir_dd6d0c9df332df1027f85d48991e6e3f.html create mode 100644 html/functions_a.html create mode 100644 html/functions_func_a.html create mode 100644 html/functions_func_t.html create mode 100644 html/functions_o.html create mode 100644 html/functions_vars_b.html create mode 100644 html/functions_vars_d.html create mode 100644 html/functions_vars_e.html create mode 100644 html/functions_vars_i.html create mode 100644 html/functions_vars_l.html create mode 100644 html/functions_vars_m.html create mode 100644 html/functions_vars_n.html create mode 100644 html/functions_vars_o.html create mode 100644 html/functions_vars_p.html create mode 100644 html/functions_vars_r.html create mode 100644 html/functions_vars_s.html create mode 100644 html/functions_vars_t.html create mode 100644 html/functions_vars_u.html create mode 100644 html/globals_eval.html create mode 100644 html/globals_type.html create mode 100644 html/search/classes_3.html create mode 100644 html/search/classes_3.js create mode 100644 html/search/defines_10.html create mode 100644 html/search/defines_10.js create mode 100644 html/search/defines_c.html create mode 100644 html/search/defines_c.js create mode 100644 html/search/defines_d.html create mode 100644 html/search/defines_d.js create mode 100644 html/search/defines_e.html create mode 100644 html/search/defines_e.js create mode 100644 html/search/defines_f.html create mode 100644 html/search/defines_f.js create mode 100644 html/search/enums_2.html create mode 100644 html/search/enums_2.js create mode 100644 html/search/enumvalues_0.html create mode 100644 html/search/enumvalues_0.js create mode 100644 html/search/functions_11.html create mode 100644 html/search/functions_11.js create mode 100644 html/search/functions_12.html create mode 100644 html/search/functions_12.js create mode 100644 html/search/typedefs_0.html create mode 100644 html/search/typedefs_0.js create mode 100644 html/search/variables_a.html create mode 100644 html/search/variables_a.js create mode 100644 html/search/variables_b.html create mode 100644 html/search/variables_b.js create mode 100644 html/search/variables_c.html create mode 100644 html/search/variables_c.js create mode 100644 html/search/variables_d.html create mode 100644 html/search/variables_d.js create mode 100644 html/search/variables_e.html create mode 100644 html/search/variables_e.js create mode 100644 html/struct_servo_pin__t-members.html create mode 100644 html/struct_servo_pin__t.html create mode 100644 html/structds18x20_obj-members.html create mode 100644 html/structds18x20_obj.html create mode 100644 html/structservo__t-members.html create mode 100644 html/structservo__t.html create mode 100644 html/structservo_component-members.html create mode 100644 html/structservo_component.html create mode 100644 html/structstrand__s-members.html create mode 100644 html/structstrand__s.html create mode 100644 html/ws__display__driver_8cpp.html create mode 100644 html/ws__display__driver_8h.html create mode 100644 html/ws__display__driver_8h_source.html create mode 100644 html/ws__display__tooltips_8h.html create mode 100644 html/ws__display__tooltips_8h_source.html create mode 100644 html/ws__display__ui__helper_8cpp.html create mode 100644 html/ws__display__ui__helper_8h.html create mode 100644 html/ws__display__ui__helper_8h_source.html create mode 100644 html/ws__ds18x20_8cpp.html create mode 100644 html/ws__ds18x20_8h.html create mode 100644 html/ws__ds18x20_8h_source.html create mode 100644 html/ws__ledc_8cpp.html create mode 100644 html/ws__ledc_8h.html create mode 100644 html/ws__ledc_8h_source.html create mode 100644 html/ws__ledc__servo_8cpp.html create mode 100644 html/ws__ledc__servo_8h.html create mode 100644 html/ws__ledc__servo_8h_source.html create mode 100644 html/ws__networking__pico_8h.html create mode 100644 html/ws__networking__pico_8h_source.html create mode 100644 html/ws__pixels_8cpp.html create mode 100644 html/ws__pixels_8h.html create mode 100644 html/ws__pixels_8h_source.html create mode 100644 html/ws__pwm_8cpp.html create mode 100644 html/ws__pwm_8h_source.html create mode 100644 html/ws__servo_8cpp.html create mode 100644 html/ws__servo_8h.html create mode 100644 html/ws__servo_8h_source.html create mode 100644 html/ws__uart_8cpp.html create mode 100644 html/ws__uart_8h.html create mode 100644 html/ws__uart_8h_source.html create mode 100644 html/ws__uart__drv_8h.html create mode 100644 html/ws__uart__drv_8h_source.html create mode 100644 html/ws__uart__drv__pm25aqi_8h.html create mode 100644 html/ws__uart__drv__pm25aqi_8h_source.html diff --git a/html/_wipper_snapper___i2_c_8h.html b/html/_wipper_snapper___i2_c_8h.html index a1d10a812..046c71ff5 100644 --- a/html/_wipper_snapper___i2_c_8h.html +++ b/html/_wipper_snapper___i2_c_8h.html @@ -73,13 +73,49 @@
#include "Wippersnapper.h"
#include <Wire.h>
#include "drivers/WipperSnapper_I2C_Driver.h"
+#include "drivers/WipperSnapper_I2C_Driver_ADT7410.h"
#include "drivers/WipperSnapper_I2C_Driver_AHTX0.h"
+#include "drivers/WipperSnapper_I2C_Driver_BH1750.h"
#include "drivers/WipperSnapper_I2C_Driver_BME280.h"
+#include "drivers/WipperSnapper_I2C_Driver_BME680.h"
+#include "drivers/WipperSnapper_I2C_Driver_BMP280.h"
+#include "drivers/WipperSnapper_I2C_Driver_BMP3XX.h"
#include "drivers/WipperSnapper_I2C_Driver_DPS310.h"
-#include "drivers/WipperSnapper_I2C_Driver_MCP9601.h"
+#include "drivers/WipperSnapper_I2C_Driver_ENS160.h"
+#include "drivers/WipperSnapper_I2C_Driver_HTS221.h"
+#include "drivers/WipperSnapper_I2C_Driver_HTU21D.h"
+#include "drivers/WipperSnapper_I2C_Driver_HTU31D.h"
+#include "drivers/WipperSnapper_I2C_Driver_INA219.h"
+#include "drivers/WipperSnapper_I2C_Driver_LC709203F.h"
+#include "drivers/WipperSnapper_I2C_Driver_LPS22HB.h"
+#include "drivers/WipperSnapper_I2C_Driver_LPS25HB.h"
+#include "drivers/WipperSnapper_I2C_Driver_LPS3XHW.h"
+#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_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_PCT2075.h"
+#include "drivers/WipperSnapper_I2C_Driver_PM25.h"
#include "drivers/WipperSnapper_I2C_Driver_SCD30.h"
+#include "drivers/WipperSnapper_I2C_Driver_SCD4X.h"
+#include "drivers/WipperSnapper_I2C_Driver_SEN5X.h"
+#include "drivers/WipperSnapper_I2C_Driver_SGP30.h"
+#include "drivers/WipperSnapper_I2C_Driver_SGP40.h"
+#include "drivers/WipperSnapper_I2C_Driver_SHT3X.h"
+#include "drivers/WipperSnapper_I2C_Driver_SHT4X.h"
+#include "drivers/WipperSnapper_I2C_Driver_SHTC3.h"
+#include "drivers/WipperSnapper_I2C_Driver_SI7021.h"
+#include "drivers/WipperSnapper_I2C_Driver_STEMMA_Soil_Sensor.h"
+#include "drivers/WipperSnapper_I2C_Driver_TMP117.h"
#include "drivers/WipperSnapper_I2C_Driver_TSL2591.h"
+#include "drivers/WipperSnapper_I2C_Driver_VCNL4020.h"
+#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_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 52b9c2c80..45fa4828a 100644 --- a/html/_wipper_snapper___i2_c_8h_source.html +++ b/html/_wipper_snapper___i2_c_8h_source.html @@ -66,36 +66,107 @@
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 
30 
31 #define I2C_TIMEOUT_MS 50
32 
33 // forward decl.
34 class Wippersnapper;
35 
36 /**************************************************************************/
40 /**************************************************************************/
42 public:
44  wippersnapper_i2c_v1_I2CBusInitRequest *msgInitRequest);
46  bool isInitialized();
47  wippersnapper_i2c_v1_BusResponse getBusStatus();
48 
49  wippersnapper_i2c_v1_I2CBusScanResponse scanAddresses();
50  bool
51  initI2CDevice(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq);
52 
54  wippersnapper_i2c_v1_I2CDeviceUpdateRequest *msgDeviceUpdateReq);
55  void deinitI2CDevice(
56  wippersnapper_i2c_v1_I2CDeviceDeinitRequest *msgDeviceDeinitReq);
57 
58  void update();
59  void fillEventMessage(wippersnapper_signal_v1_I2CResponse *msgi2cResponse,
60  float value,
61  wippersnapper_i2c_v1_SensorType sensorType);
62 
64  wippersnapper_signal_v1_I2CResponse *msgi2cResponse,
65  uint32_t sensorAddress);
66 
67 private:
68  bool _isInit = false;
69  int32_t _portNum;
70  TwoWire *_i2c = nullptr;
71  wippersnapper_i2c_v1_BusResponse _busStatusResponse;
72  std::vector<WipperSnapper_I2C_Driver *> drivers;
73  // Sensor driver objects
74  WipperSnapper_I2C_Driver_AHTX0 *_ahtx0 = nullptr;
75  WipperSnapper_I2C_Driver_DPS310 *_dps310 = nullptr;
76  WipperSnapper_I2C_Driver_SCD30 *_scd30 = nullptr;
77  WipperSnapper_I2C_Driver_BME280 *_bme280 = nullptr;
78  WipperSnapper_I2C_Driver_MCP9808 *_mcp9808 = nullptr;
79  WipperSnapper_I2C_Driver_MCP9601 *_mcp9601 = nullptr;
80  WipperSnapper_I2C_Driver_TSL2591 *_tsl2591 = nullptr;
81 };
82 extern Wippersnapper WS;
83 
84 #endif // WipperSnapper_Component_I2C_H
Class that provides an interface with the I2C bus.
Definition: WipperSnapper_I2C.h:41
+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
Class that provides a driver interface for the SCD30 sensor.
Definition: WipperSnapper_I2C_Driver_SCD30.h:27
-
bool isInitialized()
Returns if i2c port is initialized.
Definition: WipperSnapper_I2C.cpp:113
-
wippersnapper_i2c_v1_I2CBusScanResponse scanAddresses()
Scans all I2C addresses on the bus between 0x08 and 0x7F inclusive and returns an array of the device...
Definition: WipperSnapper_I2C.cpp:133
+
Class that provides a sensor driver for the MS8607 PHT sensor.
Definition: WipperSnapper_I2C_Driver_MS8607.h:27
+ + +
bool isInitialized()
Returns if i2c port is initialized.
Definition: WipperSnapper_I2C.cpp:125
+
Class that provides a driver interface for a VCNL4040 sensor.
Definition: WipperSnapper_I2C_Driver_VCNL4040.h:26
+
Class that provides a driver interface for the SCD40 sensor.
Definition: WipperSnapper_I2C_Driver_SCD4X.h:29
+
wippersnapper_i2c_v1_I2CBusScanResponse scanAddresses()
Scans all I2C addresses on the bus between 0x08 and 0x7F inclusive and returns an array of the device...
Definition: WipperSnapper_I2C.cpp:145
+
Class that provides a driver interface for a PCT2075 sensor.
Definition: WipperSnapper_I2C_Driver_PCT2075.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:430
-
bool initI2CDevice(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)
Initializes I2C device driver.
Definition: WipperSnapper_I2C.cpp:201
+
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 VL6180X sensor.
Definition: WipperSnapper_I2C_Driver_VL6180X.h:27
+ +
Class that provides a driver interface for a BH1750 Light sensor.
Definition: WipperSnapper_I2C_Driver_BH1750.h:20
+ +
bool initI2CDevice(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)
Initializes I2C device driver.
Definition: WipperSnapper_I2C.cpp:213
-
Class that provides a driver interface for a MCP9601 sensor.
Definition: WipperSnapper_I2C_Driver_MCP9601.h:26
+
void displayDeviceEventMessage(wippersnapper_signal_v1_I2CResponse *msgi2cResponse, uint32_t sensorAddress)
Displays a sensor event message on the TFT.
Definition: WipperSnapper_I2C.cpp:849
+ +
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
+ + +
Class that provides a sensor driver for the HTU21D humidity and temperature sensor.
Definition: WipperSnapper_I2C_Driver_HTU21D.h:19
Class that provides a driver interface for a TSL2591 sensor.
Definition: WipperSnapper_I2C_Driver_TSL2591.h:26
Class that provides a driver interface for a MCP9808 sensor.
Definition: WipperSnapper_I2C_Driver_MCP9808.h:26
-
bool encodePublishI2CDeviceEventMsg(wippersnapper_signal_v1_I2CResponse *msgi2cResponse, uint32_t sensorAddress)
Encodes an I2C sensor device&#39;s signal message.
Definition: WipperSnapper_I2C.cpp:391
-
Class that provides storage and functions for the Adafruit IO Wippersnapper interface.
Definition: Wippersnapper.h:176
-
WipperSnapper_Component_I2C(wippersnapper_i2c_v1_I2CBusInitRequest *msgInitRequest)
Creates a new WipperSnapper I2C component.
Definition: WipperSnapper_I2C.cpp:26
-
void deinitI2CDevice(wippersnapper_i2c_v1_I2CDeviceDeinitRequest *msgDeviceDeinitReq)
Deinitializes and deletes an I2C device driver object.
Definition: WipperSnapper_I2C.cpp:357
+
Class that provides a driver interface for a LTR329/303 sensor.
Definition: WipperSnapper_I2C_Driver_LTR329_LTR303.h:26
+
Class that provides a sensor driver for the HTS221 humidity and temperature sensor. This implementation uses the 1 Hz data rate.
Definition: WipperSnapper_I2C_Driver_HTS221.h:19
+ +
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
+ + + +
Class that provides a driver interface for a SGP30 sensor.
Definition: WipperSnapper_I2C_Driver_SGP30.h:12
+
Class that provides storage and functions for the Adafruit IO Wippersnapper interface.
Definition: Wippersnapper.h:200
+ +
Class that provides a driver interface for the SEN5X sensor.
Definition: WipperSnapper_I2C_Driver_SEN5X.h:29
+ +
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
+
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
+
Class that provides a sensor driver for the ENS160 temperature and humidity sensor.
Definition: WipperSnapper_I2C_Driver_ENS160.h:30
+ + +
Class that provides a sensor driver for the LPS22HB temperature and pressure sensor.
Definition: WipperSnapper_I2C_Driver_LPS22HB.h:28
+ +
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 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
-
void updateI2CDeviceProperties(wippersnapper_i2c_v1_I2CDeviceUpdateRequest *msgDeviceUpdateReq)
Updates the properties of an I2C device driver.
Definition: WipperSnapper_I2C.cpp:299
+
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
Wippersnapper WS
Definition: Wippersnapper.cpp:36
+
Class that provides a sensor driver for the MPRLS sensor.
Definition: WipperSnapper_I2C_Driver_MPRLS.h:27
+ + -
wippersnapper_i2c_v1_BusResponse getBusStatus()
Returns the state of the I2C bus.
Definition: WipperSnapper_I2C.cpp:121
+ + +
wippersnapper_i2c_v1_BusResponse getBusStatus()
Returns the state of the I2C bus.
Definition: WipperSnapper_I2C.cpp:133
+
Class that provides a sensor driver for the BME680 temperature and humidity sensor.
Definition: WipperSnapper_I2C_Driver_BME680.h:30
+ +
Class that provides a sensor driver for the BME280 temperature and humidity sensor.
Definition: WipperSnapper_I2C_Driver_BME280.h:30
+
Class that provides a sensor driver for the BMP3XX temperature and pressure sensor.
Definition: WipperSnapper_I2C_Driver_BMP3XX.h:30
+
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 sensor driver for the DPS310 barometric pressure sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:28
-
~WipperSnapper_Component_I2C()
Destructor for a WipperSnapper I2C component.
Definition: WipperSnapper_I2C.cpp:102
-
void update()
Queries all I2C device drivers for new values. Fills and sends an I2CSensorEvent with the sensor even...
Definition: WipperSnapper_I2C.cpp:452
+
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
+ +
Class that provides a driver interface for the SHTC3 sensor.
Definition: WipperSnapper_I2C_Driver_SHTC3.h:30
+ + +
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
+Classes | +Macros
WipperSnapper_I2C_Driver.h File Reference
@@ -78,6 +79,13 @@ +
class  WipperSnapper_I2C_Driver
 Base class for I2C Drivers. More...
 
+ + + +

+Macros

+#define PERIOD_24HRS_AGO_MILLIS   (millis() - (24 * 60 * 60 * 1000))
 Used for last sensor read time, initially set 24hrs ago (max period)
 

Detailed Description

Base implementation for I2C device drivers.

diff --git a/html/_wipper_snapper___i2_c___driver_8h_source.html b/html/_wipper_snapper___i2_c___driver_8h_source.html index 369175794..11ac8df04 100644 --- a/html/_wipper_snapper___i2_c___driver_8h_source.html +++ b/html/_wipper_snapper___i2_c___driver_8h_source.html @@ -66,97 +66,153 @@
WipperSnapper_I2C_Driver.h
-Go to the documentation of this file.
1 
16 #ifndef WipperSnapper_I2C_Driver_H
17 #define WipperSnapper_I2C_Driver_H
18 
19 #include <Adafruit_Sensor.h>
20 #include <Arduino.h>
21 
22 /**************************************************************************/
26 /**************************************************************************/
28 
29 public:
30  /*******************************************************************************/
38  /*******************************************************************************/
39  WipperSnapper_I2C_Driver(TwoWire *i2c, uint16_t sensorAddress) {
40  _i2c = i2c;
42  }
43 
44  /*******************************************************************************/
48  /*******************************************************************************/
50 
51  /*******************************************************************************/
56  /*******************************************************************************/
57  bool begin() { return false; }
58 
59  /*******************************************************************************/
66  /*******************************************************************************/
67  void
68  configureDriver(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq) {
69  int propertyIdx = 0;
70  while (propertyIdx < msgDeviceInitReq->i2c_device_properties_count) {
71  switch (
72  msgDeviceInitReq->i2c_device_properties[propertyIdx].sensor_type) {
73  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_AMBIENT_TEMPERATURE:
76  msgDeviceInitReq->i2c_device_properties[propertyIdx].sensor_period);
77  break;
78  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_RELATIVE_HUMIDITY:
81  msgDeviceInitReq->i2c_device_properties[propertyIdx].sensor_period);
82  break;
83  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PRESSURE:
86  msgDeviceInitReq->i2c_device_properties[propertyIdx].sensor_period);
87  break;
88  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_CO2:
91  msgDeviceInitReq->i2c_device_properties[propertyIdx].sensor_period);
92  break;
93  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_GAS_RESISTANCE:
96  msgDeviceInitReq->i2c_device_properties[propertyIdx].sensor_period);
97  break;
98  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_ALTITUDE:
101  msgDeviceInitReq->i2c_device_properties[propertyIdx].sensor_period);
102  break;
103  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_OBJECT_TEMPERATURE:
106  msgDeviceInitReq->i2c_device_properties[propertyIdx].sensor_period);
107  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_LIGHT:
110  msgDeviceInitReq->i2c_device_properties[propertyIdx].sensor_period);
111  default:
112  break;
113  }
114  ++propertyIdx;
115  }
116  }
117 
118  /*******************************************************************************/
123  /*******************************************************************************/
124  uint16_t getI2CAddress() { return _sensorAddress; }
125 
126  /****************************** SENSOR_TYPE: CO2
127  * *******************************/
128  /*******************************************************************************/
132  /*******************************************************************************/
133  virtual void enableSensorCO2() { return; };
134 
135  /*******************************************************************************/
139  /*******************************************************************************/
140  virtual void disableSensorCO2() { _CO2SensorPeriod = 0.0L; }
141 
142  /*******************************************************************************/
149  /*******************************************************************************/
150  virtual void setSensorCO2Period(float period) {
151  if (period == 0.0) {
153  return;
154  }
155  // Period is in seconds, cast it to long and convert it to milliseconds
156  _CO2SensorPeriod = (long)period * 1000;
157  }
158 
159  /*******************************************************************************/
166  /*******************************************************************************/
167  virtual void updateSensorCO2(float period) { setSensorCO2Period(period); }
168 
169  /*********************************************************************************/
175  /*********************************************************************************/
176  virtual long sensorCO2Period() { return _CO2SensorPeriod; }
177 
178  /*********************************************************************************/
184  /*********************************************************************************/
185  virtual long sensorCO2PeriodPrv() { return _CO2SensorPeriodPrv; }
186 
187  /*******************************************************************************/
193  /*******************************************************************************/
194  virtual void setSensorCO2PeriodPrv(long period) {
195  _CO2SensorPeriodPrv = period;
196  }
197 
198  /*******************************************************************************/
206  /*******************************************************************************/
207  virtual bool getEventCO2(sensors_event_t *co2Event) { return false; }
208 
209  /********************** SENSOR_TYPE: AMBIENT TEMPERATURE
210  * ***********************/
211  /*******************************************************************************/
215  /*******************************************************************************/
216  virtual void enableSensorAmbientTemperature() { return; };
217 
218  /*******************************************************************************/
222  /*******************************************************************************/
224 
225  /*********************************************************************************/
231  /*********************************************************************************/
233 
234  /*******************************************************************************/
241  /*******************************************************************************/
242  virtual void setSensorAmbientTemperaturePeriod(float period) {
243  if (period == 0.0) {
245  return;
246  }
247  // Period is in seconds, cast it to long and convert it to milliseconds
248  _tempSensorPeriod = (long)period * 1000;
249  }
250 
251  /*********************************************************************************/
257  /*********************************************************************************/
259  return _tempSensorPeriodPrv;
260  }
261 
262  /*******************************************************************************/
268  /*******************************************************************************/
269  virtual void setSensorAmbientTemperaturePeriodPrv(long periodPrv) {
270  _tempSensorPeriodPrv = periodPrv;
271  }
272 
273  /*******************************************************************************/
282  /*******************************************************************************/
283  virtual bool getEventAmbientTemperature(sensors_event_t *tempEvent) {
284  return false;
285  }
286 
287  /*******************************************************************************/
296  /*******************************************************************************/
297  virtual bool getEventAmbientTemperature(float tempEvent) { return false; }
298 
299  /*******************************************************************************/
306  /*******************************************************************************/
307  virtual void updateSensorAmbientTemperature(float period) {
309  }
310 
311  /************************* SENSOR_TYPE: RELATIVE_HUMIDITY
312  * ***********************/
313  /*******************************************************************************/
317  /*******************************************************************************/
319 
320  /*******************************************************************************/
324  /*******************************************************************************/
326 
327  /*********************************************************************************/
333  /*********************************************************************************/
335 
336  /*******************************************************************************/
343  /*******************************************************************************/
344  virtual void setSensorRelativeHumidityPeriod(float period) {
345  if (period == 0.0) {
347  return;
348  }
349  // Period is in seconds, cast it to long and convert it to milliseconds
350  _humidSensorPeriod = (long)period * 1000;
351  }
352 
353  /*********************************************************************************/
359  /*********************************************************************************/
361  return _humidSensorPeriodPrv;
362  }
363 
364  /*******************************************************************************/
370  /*******************************************************************************/
371  virtual void setSensorRelativeHumidityPeriodPrv(long periodPrv) {
372  _humidSensorPeriodPrv = periodPrv;
373  }
374 
375  /*******************************************************************************/
384  /*******************************************************************************/
385  virtual bool getEventRelativeHumidity(sensors_event_t *humidEvent) {
386  return false;
387  }
388 
389  /*******************************************************************************/
398  /*******************************************************************************/
399  virtual bool getEventRelativeHumidity(float humidEvent) { return false; }
400 
401  /*******************************************************************************/
408  /*******************************************************************************/
409  virtual void updateSensorRelativeHumidity(float period) {
411  }
412 
413  /**************************** SENSOR_TYPE: PRESSURE
414  * ****************************/
415  /*******************************************************************************/
419  /*******************************************************************************/
420  virtual void enableSensorPressure(){};
421 
422  /*******************************************************************************/
426  /*******************************************************************************/
427  virtual void disableSensorPressure() { _pressureSensorPeriod = 0.0L; }
428 
429  /*********************************************************************************/
435  /*********************************************************************************/
436  virtual long sensorPressurePeriod() { return _pressureSensorPeriod; }
437 
438  /*******************************************************************************/
445  /*******************************************************************************/
446  virtual void setSensorPressurePeriod(float period) {
447  if (period == 0.0)
449  // Period is in seconds, cast it to long and convert it to milliseconds
450  _pressureSensorPeriod = (long)period * 1000;
451  }
452 
453  /*********************************************************************************/
459  /*********************************************************************************/
461 
462  /*******************************************************************************/
468  /*******************************************************************************/
469  virtual void setSensorPressurePeriodPrv(long period) {
470  _pressureSensorPeriodPrv = period;
471  }
472 
473  /*******************************************************************************/
482  /*******************************************************************************/
483  virtual bool getEventPressure(sensors_event_t *pressureEvent) {
484  return false;
485  }
486 
487  /*******************************************************************************/
496  /*******************************************************************************/
497  virtual bool getEventPressure(float pressureEvent) { return false; }
498 
499  /*******************************************************************************/
506  /*******************************************************************************/
507  virtual void updateSensorPressure(float period) {
508  setSensorPressurePeriod(period);
509  }
510 
511  /**************************** SENSOR_TYPE: Gas
512  * ****************************/
513  /*******************************************************************************/
517  /*******************************************************************************/
518  virtual void enableSensorGas(){};
519 
520  /*******************************************************************************/
524  /*******************************************************************************/
525  virtual void disableSensorGas() { _gasSensorPeriod = 0.0L; }
526 
527  /*********************************************************************************/
532  /*********************************************************************************/
533  virtual long sensorGasPeriod() { return _gasSensorPeriod; }
534 
535  /*******************************************************************************/
542  /*******************************************************************************/
543  virtual void setSensorGasPeriod(float period) {
544  if (period == 0.0)
546  // Period is in seconds, cast it to long and convert it to milliseconds
547  _gasSensorPeriod = (long)period * 1000;
548  }
549 
550  /*********************************************************************************/
556  /*********************************************************************************/
557  virtual long sensorGasPeriodPrv() { return _gasSensorPeriodPrv; }
558 
559  /*******************************************************************************/
565  /*******************************************************************************/
566  virtual void setSensorGasPeriodPrv(long period) {
567  _gasSensorPeriodPrv = period;
568  }
569 
570  /*******************************************************************************/
579  /*******************************************************************************/
580  virtual bool getEventGas(uint32_t gas_resistance) { return gas_resistance; }
581 
582  /*******************************************************************************/
589  /*******************************************************************************/
590  virtual void updateSensorGas(float period) { setSensorGasPeriod(period); }
591 
592  /**************************** SENSOR_TYPE: Altitude
593  * ****************************/
594  /*******************************************************************************/
598  /*******************************************************************************/
599  virtual void enableSensorAltitude(){};
600 
601  /*******************************************************************************/
605  /*******************************************************************************/
606  virtual void disableSensorAltitude() { _altitudeSensorPeriod = 0.0L; }
607 
608  /*********************************************************************************/
614  /*********************************************************************************/
615  virtual long sensorAltitudePeriod() { return _altitudeSensorPeriod; }
616 
617  /*******************************************************************************/
624  /*******************************************************************************/
625  virtual void setSensorAltitudePeriod(float period) {
626  if (period == 0)
628  // Period is in seconds, cast it to long and convert it to milliseconds
629  _altitudeSensorPeriod = (long)period * 1000;
630  }
631 
632  /*********************************************************************************/
638  /*********************************************************************************/
640 
641  /*******************************************************************************/
647  /*******************************************************************************/
648  virtual void setSensorAltitudePeriodPrv(long period) {
649  _altitudeSensorPeriodPrv = period;
650  }
651 
652  /*******************************************************************************/
661  /*******************************************************************************/
662  virtual bool getEventAltitude(sensors_event_t *altitudeEvent) {
663  return false;
664  }
665 
666  /*******************************************************************************/
673  /*******************************************************************************/
674  virtual void updateSensorAltitude(float period) {
675  setSensorAltitudePeriod(period);
676  }
677 
678  /**************************** SENSOR_TYPE: Object_Temperature
679  * ****************************/
680  /*******************************************************************************/
684  /*******************************************************************************/
685  virtual void enableSensorObjectTemp(){};
686 
687  /*******************************************************************************/
691  /*******************************************************************************/
693 
694  /*********************************************************************************/
701  /*********************************************************************************/
703 
704  /*******************************************************************************/
711  /*******************************************************************************/
712  virtual void setSensorObjectTempPeriod(float period) {
713  if (period == 0)
715  // Period is in seconds, cast it to long and convert it to milliseconds
716  _objectTempSensorPeriod = (long)period * 1000;
717  }
718 
719  /*********************************************************************************/
726  /*********************************************************************************/
727  virtual long sensorObjectTempPeriodPrv() {
729  }
730 
731  /*******************************************************************************/
738  /*******************************************************************************/
739  virtual void setSensorObjectTempPeriodPrv(long period) {
741  }
742 
743  /*******************************************************************************/
752  /*******************************************************************************/
753  virtual bool getEventObjectTemp(sensors_event_t *objectTempEvent) {
754  return false;
755  }
756 
757  /*******************************************************************************/
764  /*******************************************************************************/
765  virtual void updateSensorObjectTemp(float period) {
767  }
768 
769  /**************************** SENSOR_TYPE: LIGHT
770  * ****************************/
771  /*******************************************************************************/
775  /*******************************************************************************/
776  virtual void enableSensorLight(){};
777 
778  /*******************************************************************************/
782  /*******************************************************************************/
783  virtual void disableSensorLight() { _lightSensorPeriod = 0.0L; }
784 
785  /*********************************************************************************/
792  /*********************************************************************************/
793  virtual long sensorLightPeriod() { return _lightSensorPeriod; }
794 
795  /*******************************************************************************/
802  /*******************************************************************************/
803  virtual void setSensorLightPeriod(float period) {
804  if (period == 0)
806  // Period is in seconds, cast it to long and convert it to milliseconds
807  _lightSensorPeriod = (long)period * 1000;
808  }
809 
810  /*********************************************************************************/
817  /*********************************************************************************/
818  virtual long SensorLightPeriodPrv() { return _lightSensorPeriodPrv; }
819 
820  /*******************************************************************************/
827  /*******************************************************************************/
828  virtual void setSensorLightPeriodPrv(long period) {
829  _lightSensorPeriodPrv = period;
830  }
831 
832  /*******************************************************************************/
841  /*******************************************************************************/
842  virtual bool getEventLight(sensors_event_t *lightEvent) { return false; }
843 
844  /*******************************************************************************/
851  /*******************************************************************************/
852  virtual void updateSensorLight(float period) { setSensorLightPeriod(period); }
853 
854 protected:
855  TwoWire *_i2c;
856  uint16_t _sensorAddress;
858  0L;
860  0L;
862  0L;
864  long _pressureSensorPeriod =
866  0L;
868  long _CO2SensorPeriod =
870  0L;
872  long _gasSensorPeriod =
874  0L;
876  long _altitudeSensorPeriod =
878  0L;
880  long _objectTempSensorPeriod = 0L;
882  long _objectTempSensorPeriodPrv = 0L;
884  long _lightSensorPeriod = 0L;
886  long _lightSensorPeriodPrv = 0L;
888 };
890 
891 #endif // WipperSnapper_I2C_Driver_H
uint16_t getI2CAddress()
Gets the I2C device&#39;s address.
Definition: WipperSnapper_I2C_Driver.h:124
-
virtual long sensorObjectTempPeriod()
Base implementation - Returns the object temperature sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:702
-
virtual void disableSensorGas()
Disables the device&#39;s gas sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:525
-
long _gasSensorPeriod
The time period between reading the CO2 sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:873
-
virtual void setSensorAmbientTemperaturePeriodPrv(long periodPrv)
Sets a timestamp for when the temperature sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:269
-
virtual void setSensorAmbientTemperaturePeriod(float period)
Set the temperature sensor&#39;s return frequency.
Definition: WipperSnapper_I2C_Driver.h:242
-
long _altitudeSensorPeriod
The time period between reading the altitude sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:877
-
virtual void enableSensorCO2()
Enables the device&#39;s CO2 sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:133
-
virtual void enableSensorAmbientTemperature()
Enables the device&#39;s temperature sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:216
-
virtual bool getEventCO2(sensors_event_t *co2Event)
Gets a sensor&#39;s CO2 value.
Definition: WipperSnapper_I2C_Driver.h:207
-
virtual long SensorLightPeriodPrv()
Base implementation - Returns the previous time interval at which the light sensor was queried last...
Definition: WipperSnapper_I2C_Driver.h:818
-
virtual long sensorAltitudePeriodPrv()
Base implementation - Returns the previous time interval at which the Altitude sensor was queried las...
Definition: WipperSnapper_I2C_Driver.h:639
-
virtual long sensorAmbientTemperaturePeriod()
Base implementation - Returns the humidity sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:232
-
long _objectTempSensorPeriod
Definition: WipperSnapper_I2C_Driver.h:881
-
virtual void disableSensorLight()
Disables the device&#39;s object light sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:783
-
virtual void setSensorCO2Period(float period)
Set the co2 sensor&#39;s return frequency.
Definition: WipperSnapper_I2C_Driver.h:150
-
virtual void setSensorAltitudePeriodPrv(long period)
Sets a timestamp for when the Altitude sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:648
-
virtual bool getEventAmbientTemperature(sensors_event_t *tempEvent)
Base implementation - Reads a temperature sensor. Expects value to return in the proper SI unit...
Definition: WipperSnapper_I2C_Driver.h:283
-
virtual void updateSensorPressure(float period)
Updates the properties of a pressure sensor.
Definition: WipperSnapper_I2C_Driver.h:507
-
virtual long sensorAltitudePeriod()
Base implementation - Returns the Altitude sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:615
-
virtual void enableSensorObjectTemp()
Enables the device&#39;s object temperature sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:685
-
long _tempSensorPeriod
The time period between reading the temperature sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:857
-
virtual bool getEventRelativeHumidity(sensors_event_t *humidEvent)
Base implementation - Reads a humidity sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:385
-
long _gasSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:875
-
virtual void updateSensorGas(float period)
Updates the properties of a gas sensor.
Definition: WipperSnapper_I2C_Driver.h:590
-
bool begin()
Initializes the I2C sensor and begins I2C.
Definition: WipperSnapper_I2C_Driver.h:57
-
WipperSnapper_I2C_Driver(TwoWire *i2c, uint16_t sensorAddress)
Instanciates an I2C sensor.
Definition: WipperSnapper_I2C_Driver.h:39
-
virtual long sensorLightPeriod()
Base implementation - Returns the object light sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:793
-
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:27
-
virtual bool getEventAltitude(sensors_event_t *altitudeEvent)
Base implementation - Reads a Altitude sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:662
-
long _pressureSensorPeriod
The time period between reading the pressure sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:865
-
virtual long sensorRelativeHumidityPeriod()
Base implementation - Returns the humidity sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:334
-
long _humidSensorPeriod
The time period between reading the humidity sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:861
-
virtual void enableSensorRelativeHumidity()
Enables the device&#39;s relative humidity sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:318
-
virtual void updateSensorAmbientTemperature(float period)
Base implementation - Update the properties of a temperature sensor, provided sensor_period.
Definition: WipperSnapper_I2C_Driver.h:307
-
virtual void setSensorLightPeriod(float period)
Set the object light sensor&#39;s return frequency.
Definition: WipperSnapper_I2C_Driver.h:803
-
virtual bool getEventAmbientTemperature(float tempEvent)
Base implementation - Reads a temperature sensor. Expects value to return in the proper SI unit...
Definition: WipperSnapper_I2C_Driver.h:297
-
virtual void enableSensorLight()
Enables the device&#39;s object light sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:776
-
virtual long sensorCO2Period()
Base implementation - Returns the co2 sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:176
-
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:856
-
virtual long sensorObjectTempPeriodPrv()
Base implementation - Returns the previous time interval at which the object temperature sensor was q...
Definition: WipperSnapper_I2C_Driver.h:727
-
virtual void enableSensorAltitude()
Enables the device&#39;s Altitude sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:599
-
virtual bool getEventGas(uint32_t gas_resistance)
Base implementation - Reads a gas sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:580
-
virtual long sensorAmbientTemperaturePeriodPrv()
Base implementation - Returns the previous time interval at which the temperature sensor was queried ...
Definition: WipperSnapper_I2C_Driver.h:258
-
long _humidSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:863
-
virtual void enableSensorGas()
Enables the device&#39;s gas sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:518
-
virtual void setSensorRelativeHumidityPeriod(float period)
Set the humidity sensor&#39;s return frequency.
Definition: WipperSnapper_I2C_Driver.h:344
-
virtual void setSensorPressurePeriod(float period)
Set the pressure sensor&#39;s return frequency.
Definition: WipperSnapper_I2C_Driver.h:446
-
virtual void disableSensorCO2()
Disables the device&#39;s CO2 sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:140
-
virtual long sensorPressurePeriod()
Base implementation - Returns the pressure sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:436
-
long _objectTempSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:883
-
virtual void disableSensorAltitude()
Disables the device&#39;s Altitude sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:606
-
long _lightSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:887
-
virtual void setSensorObjectTempPeriodPrv(long period)
Sets a timestamp for when the object temperature sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:739
-
virtual void updateSensorObjectTemp(float period)
Updates the properties of a object temperature sensor.
Definition: WipperSnapper_I2C_Driver.h:765
-
virtual void setSensorGasPeriodPrv(long period)
Sets a timestamp for when the gas sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:566
-
virtual void disableSensorRelativeHumidity()
Disables the device&#39;s relative humidity sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:325
-
virtual void setSensorGasPeriod(float period)
Set the gas sensor&#39;s return frequency.
Definition: WipperSnapper_I2C_Driver.h:543
-
virtual void setSensorPressurePeriodPrv(long period)
Sets a timestamp for when the pressure sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:469
-
virtual void setSensorRelativeHumidityPeriodPrv(long periodPrv)
Sets a timestamp for when the temperature sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:371
-
virtual void updateSensorLight(float period)
Updates the properties of a object light sensor.
Definition: WipperSnapper_I2C_Driver.h:852
-
virtual bool getEventPressure(sensors_event_t *pressureEvent)
Base implementation - Reads a pressure sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:483
-
virtual void disableSensorObjectTemp()
Disables the device&#39;s object temperature sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:692
-
virtual void updateSensorCO2(float period)
Updates the properties of a CO2 sensor.
Definition: WipperSnapper_I2C_Driver.h:167
-
~WipperSnapper_I2C_Driver()
Destructor for an I2C sensor.
Definition: WipperSnapper_I2C_Driver.h:49
-
virtual bool getEventLight(sensors_event_t *lightEvent)
Base implementation - Reads a object light sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:842
-
virtual void disableSensorAmbientTemperature()
Disables the device&#39;s temperature sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:223
-
long _CO2SensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:871
-
long _lightSensorPeriod
Definition: WipperSnapper_I2C_Driver.h:885
-
void configureDriver(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)
Uses an I2CDeviceInitRequest message to configure the sensors belonging to the driver.
Definition: WipperSnapper_I2C_Driver.h:68
-
virtual void setSensorCO2PeriodPrv(long period)
Sets a timestamp for when the co2 sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:194
-
virtual long sensorCO2PeriodPrv()
Base implementation - Returns the previous time interval at which the co2 sensor was queried last...
Definition: WipperSnapper_I2C_Driver.h:185
-
virtual long sensorPressurePeriodPrv()
Base implementation - Returns the previous time interval at which the pressure sensor was queried las...
Definition: WipperSnapper_I2C_Driver.h:460
-
virtual bool getEventPressure(float pressureEvent)
Base implementation - Reads a pressure sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:497
-
long _tempSensorPeriodPrv
The time when the temperature sensor was last read.
Definition: WipperSnapper_I2C_Driver.h:859
-
long _CO2SensorPeriod
The time period between reading the CO2 sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:869
-
virtual void setSensorAltitudePeriod(float period)
Set the Altitude sensor&#39;s return frequency.
Definition: WipperSnapper_I2C_Driver.h:625
-
virtual bool getEventObjectTemp(sensors_event_t *objectTempEvent)
Base implementation - Reads a object temperature sensor and converts the reading into the expected SI...
Definition: WipperSnapper_I2C_Driver.h:753
-
virtual void disableSensorPressure()
Disables the device&#39;s pressure sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:427
-
long _altitudeSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:879
-
virtual long sensorGasPeriodPrv()
Base implementation - Returns the previous time interval at which the gas sensor was queried last...
Definition: WipperSnapper_I2C_Driver.h:557
-
virtual void updateSensorAltitude(float period)
Updates the properties of a Altitude sensor.
Definition: WipperSnapper_I2C_Driver.h:674
-
virtual void setSensorObjectTempPeriod(float period)
Set the object temperature sensor&#39;s return frequency.
Definition: WipperSnapper_I2C_Driver.h:712
-
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:855
-
virtual bool getEventRelativeHumidity(float humidEvent)
Base implementation - Reads a humidity sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:399
-
long _pressureSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:867
-
virtual long sensorRelativeHumidityPeriodPrv()
Base implementation - Returns the previous time interval at which the humidity sensor was queried las...
Definition: WipperSnapper_I2C_Driver.h:360
-
virtual void updateSensorRelativeHumidity(float period)
Updates the properties of a relative humidity sensor.
Definition: WipperSnapper_I2C_Driver.h:409
-
virtual void enableSensorPressure()
Enables the device&#39;s pressure sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:420
-
virtual void setSensorLightPeriodPrv(long period)
Sets a timestamp for when the light sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:828
-
virtual long sensorGasPeriod()
Base implementation - Returns the gas sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:533
+Go to the documentation of this file.
1 
16 #ifndef WipperSnapper_I2C_Driver_H
17 #define WipperSnapper_I2C_Driver_H
18 
19 #include <Adafruit_Sensor.h>
20 #include <Arduino.h>
21 
22 #define PERIOD_24HRS_AGO_MILLIS (millis() - (24 * 60 * 60 * 1000))
23 
25 /**************************************************************************/
29 /**************************************************************************/
31 
32 public:
33  /*******************************************************************************/
41  /*******************************************************************************/
42  WipperSnapper_I2C_Driver(TwoWire *i2c, uint16_t sensorAddress) {
43  _i2c = i2c;
44  _sensorAddress = sensorAddress;
45  }
46 
47  /*******************************************************************************/
51  /*******************************************************************************/
53 
54  /*******************************************************************************/
59  /*******************************************************************************/
60  bool begin() { return false; }
61 
62  /*******************************************************************************/
70  /*******************************************************************************/
71  void setSensorPeriod(float period,
72  wippersnapper_i2c_v1_SensorType sensorType) {
73  long sensorPeriod = (long)period * 1000;
74 
75  switch (sensorType) {
76  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_AMBIENT_TEMPERATURE:
77  _tempSensorPeriod = sensorPeriod;
78  break;
79  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_RELATIVE_HUMIDITY:
80  _humidSensorPeriod = sensorPeriod;
81  break;
82  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PRESSURE:
83  _pressureSensorPeriod = sensorPeriod;
84  break;
85  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_CO2:
86  _CO2SensorPeriod = sensorPeriod;
87  break;
88  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_ECO2:
89  _ECO2SensorPeriod = sensorPeriod;
90  break;
91  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_TVOC:
92  _TVOCSensorPeriod = sensorPeriod;
93  break;
94  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_ALTITUDE:
95  _altitudeSensorPeriod = sensorPeriod;
96  break;
97  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_OBJECT_TEMPERATURE:
98  _objectTempSensorPeriod = sensorPeriod;
99  break;
100  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_LIGHT:
101  _lightSensorPeriod = sensorPeriod;
102  break;
103  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM10_STD:
104  _PM10SensorPeriod = sensorPeriod;
105  break;
106  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM25_STD:
107  _PM25SensorPeriod = sensorPeriod;
108  break;
109  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PM100_STD:
110  _PM100SensorPeriod = sensorPeriod;
111  break;
112  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_UNITLESS_PERCENT:
113  _unitlessPercentPeriod = sensorPeriod;
114  break;
115  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_VOLTAGE:
116  _voltagePeriod = sensorPeriod;
117  break;
118  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_CURRENT:
119  _currentPeriod = sensorPeriod;
120  break;
121  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PROXIMITY:
122  _proximitySensorPeriod = sensorPeriod;
123  break;
124  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_RAW:
125  _rawSensorPeriod = sensorPeriod;
126  break;
127  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_AMBIENT_TEMPERATURE_FAHRENHEIT:
128  _ambientTempFPeriod = sensorPeriod;
129  break;
130  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_OBJECT_TEMPERATURE_FAHRENHEIT:
131  _objectTempFPeriod = sensorPeriod;
132  break;
133  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_GAS_RESISTANCE:
134  _gasResistancePeriod = sensorPeriod;
135  break;
136  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_NOX_INDEX:
137  _NOxIndexPeriod = sensorPeriod;
138  break;
139  case wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_VOC_INDEX:
140  _VOCIndexPeriod = sensorPeriod;
141  break;
142  default:
143  break;
144  }
145  }
146 
147  /*******************************************************************************/
154  /*******************************************************************************/
155  void
156  configureDriver(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq) {
157  int propertyIdx = 0; // contains the amount of i2c sensors in the
158  // msgDeviceInitReq to configure
159  while (propertyIdx < msgDeviceInitReq->i2c_device_properties_count) {
161  msgDeviceInitReq->i2c_device_properties[propertyIdx].sensor_period,
162  msgDeviceInitReq->i2c_device_properties[propertyIdx].sensor_type);
163  ++propertyIdx;
164  }
165  }
166 
167  /*******************************************************************************/
172  /*******************************************************************************/
173  uint16_t getI2CAddress() { return _sensorAddress; }
174 
175  /****************************** SENSOR_TYPE: CO2
176  * *******************************/
177  /*********************************************************************************/
183  /*********************************************************************************/
184  virtual long getSensorCO2Period() { return _CO2SensorPeriod; }
185 
186  /*********************************************************************************/
192  /*********************************************************************************/
193  virtual long getSensorCO2PeriodPrv() { return _CO2SensorPeriodPrv; }
194 
195  /*******************************************************************************/
201  /*******************************************************************************/
202  virtual void setSensorCO2PeriodPrv(long period) {
203  _CO2SensorPeriodPrv = period;
204  }
205 
206  /*******************************************************************************/
214  /*******************************************************************************/
215  virtual bool getEventCO2(sensors_event_t *co2Event) {
216  (void)
217  co2Event; // Parameter is intentionally unused in this virtual function.
218  return false;
219  }
220 
221  /****************************** SENSOR_TYPE: ECO2
222  * *******************************/
223  /*********************************************************************************/
229  /*********************************************************************************/
230  virtual long getSensorECO2Period() { return _ECO2SensorPeriod; }
231 
232  /*********************************************************************************/
238  /*********************************************************************************/
239  virtual long getSensorECO2PeriodPrv() { return _ECO2SensorPeriodPrv; }
240 
241  /*******************************************************************************/
247  /*******************************************************************************/
248  virtual void setSensorECO2PeriodPrv(long period) {
249  _ECO2SensorPeriodPrv = period;
250  }
251 
252  /*******************************************************************************/
260  /*******************************************************************************/
261  virtual bool getEventECO2(sensors_event_t *eco2Event) {
262  (void)eco2Event; // Parameter is intentionally unused in this virtual
263  // function.
264  return false;
265  }
266 
267  /****************************** SENSOR_TYPE: TVOC
268  * *******************************/
269  /*********************************************************************************/
275  /*********************************************************************************/
276  virtual long getSensorTVOCPeriod() { return _TVOCSensorPeriod; }
277 
278  /*********************************************************************************/
284  /*********************************************************************************/
285  virtual long getSensorTVOCPeriodPrv() { return _TVOCSensorPeriodPrv; }
286 
287  /*******************************************************************************/
293  /*******************************************************************************/
294  virtual void setSensorTVOCPeriodPrv(long period) {
295  _TVOCSensorPeriodPrv = period;
296  }
297 
298  /*******************************************************************************/
306  /*******************************************************************************/
307  virtual bool getEventTVOC(sensors_event_t *tvocEvent) {
308  (void)tvocEvent; // Parameter is intentionally unused in this virtual
309  // function.
310  return false;
311  }
312 
313  /********************** SENSOR_TYPE: AMBIENT TEMPERATURE (°C)
314  * ***********************/
315  /*********************************************************************************/
321  /*********************************************************************************/
323 
324  /*********************************************************************************/
331  /*********************************************************************************/
333 
334  /*******************************************************************************/
342  /*******************************************************************************/
343  virtual void setSensorAmbientTempPeriodPrv(long periodPrv) {
344  _tempSensorPeriodPrv = periodPrv;
345  }
346 
347  /*******************************************************************************/
356  /*******************************************************************************/
357  virtual bool getEventAmbientTemp(sensors_event_t *tempEvent) {
358  (void)tempEvent; // Parameter is intentionally unused in this virtual
359  // function.
360  return false;
361  }
362 
363  /************************* SENSOR_TYPE: RELATIVE_HUMIDITY
364  * ***********************/
365  /*********************************************************************************/
371  /*********************************************************************************/
373 
374  /*********************************************************************************/
380  /*********************************************************************************/
382  return _humidSensorPeriodPrv;
383  }
384 
385  /*******************************************************************************/
391  /*******************************************************************************/
392  virtual void setSensorRelativeHumidityPeriodPrv(long periodPrv) {
393  _humidSensorPeriodPrv = periodPrv;
394  }
395 
396  /*******************************************************************************/
405  /*******************************************************************************/
406  virtual bool getEventRelativeHumidity(sensors_event_t *humidEvent) {
407  (void)humidEvent; // Parameter is intentionally unused in this virtual
408  // function.
409  return false;
410  }
411 
412  /**************************** SENSOR_TYPE: PRESSURE
413  * ****************************/
414  /*********************************************************************************/
420  /*********************************************************************************/
422 
423  /*********************************************************************************/
429  /*********************************************************************************/
431 
432  /*******************************************************************************/
438  /*******************************************************************************/
439  virtual void setSensorPressurePeriodPrv(long period) {
440  _pressureSensorPeriodPrv = period;
441  }
442 
443  /*******************************************************************************/
452  /*******************************************************************************/
453  virtual bool getEventPressure(sensors_event_t *pressureEvent) {
454  (void)pressureEvent; // Parameter is intentionally unused in this virtual
455  // function.
456  return false;
457  }
458 
459  /**************************** SENSOR_TYPE: Altitude
460  * ****************************/
461  /*********************************************************************************/
467  /*********************************************************************************/
469 
470  /*********************************************************************************/
476  /*********************************************************************************/
478 
479  /*******************************************************************************/
485  /*******************************************************************************/
486  virtual void setSensorAltitudePeriodPrv(long period) {
487  _altitudeSensorPeriodPrv = period;
488  }
489 
490  /*******************************************************************************/
499  /*******************************************************************************/
500  virtual bool getEventAltitude(sensors_event_t *altitudeEvent) {
501  (void)altitudeEvent; // Parameter is intentionally unused in this virtual
502  // function.
503  return false;
504  }
505 
506  /**************************** SENSOR_TYPE: Object_Temperature
507  * ****************************/
508  /*********************************************************************************/
515  /*********************************************************************************/
517 
518  /*********************************************************************************/
525  /*********************************************************************************/
528  }
529 
530  /*******************************************************************************/
537  /*******************************************************************************/
538  virtual void setSensorObjectTempPeriodPrv(long period) {
540  }
541 
542  /*******************************************************************************/
551  /*******************************************************************************/
552  virtual bool getEventObjectTemp(sensors_event_t *objectTempEvent) {
553  (void)objectTempEvent; // Parameter is intentionally unused in this virtual
554  // function.
555  return false;
556  }
557 
558  /**************************** SENSOR_TYPE: LIGHT
559  * ****************************/
560  /*********************************************************************************/
567  /*********************************************************************************/
568  virtual long getSensorLightPeriod() { return _lightSensorPeriod; }
569 
570  /*********************************************************************************/
577  /*********************************************************************************/
579 
580  /*******************************************************************************/
587  /*******************************************************************************/
588  virtual void setSensorLightPeriodPrv(long period) {
589  _lightSensorPeriodPrv = period;
590  }
591 
592  /*******************************************************************************/
601  /*******************************************************************************/
602  virtual bool getEventLight(sensors_event_t *lightEvent) {
603  (void)lightEvent; // Parameter is intentionally unused in this virtual
604  // function.
605  return false;
606  }
607 
608  /**************************** SENSOR_TYPE: PM10_STD
609  * ****************************/
610  /*********************************************************************************/
617  /*********************************************************************************/
618  virtual long getSensorPM10_STDPeriod() { return _PM10SensorPeriod; }
619 
620  /*********************************************************************************/
627  /*********************************************************************************/
629 
630  /*******************************************************************************/
637  /*******************************************************************************/
638  virtual void setSensorPM10_STDPeriodPrv(long period) {
639  _PM10SensorPeriodPrv = period;
640  }
641 
642  /*******************************************************************************/
651  /*******************************************************************************/
652  virtual bool getEventPM10_STD(sensors_event_t *pm10StdEvent) {
653  (void)pm10StdEvent; // Parameter is intentionally unused in this virtual
654  // function.
655  return false;
656  }
657 
658  /**************************** SENSOR_TYPE: PM25_STD
659  * ****************************/
660  /*********************************************************************************/
667  /*********************************************************************************/
668  virtual long getSensorPM25_STDPeriod() { return _PM25SensorPeriod; }
669 
670  /*********************************************************************************/
677  /*********************************************************************************/
679 
680  /*******************************************************************************/
687  /*******************************************************************************/
688  virtual void setSensorPM25_STDPeriodPrv(long period) {
689  _PM25SensorPeriodPrv = period;
690  }
691 
692  /*******************************************************************************/
701  /*******************************************************************************/
702  virtual bool getEventPM25_STD(sensors_event_t *pm25StdEvent) {
703  (void)pm25StdEvent; // Parameter is intentionally unused in this virtual
704  // function.
705  return false;
706  }
707 
708  /**************************** SENSOR_TYPE: PM100_STD
709  * ****************************/
710  /*********************************************************************************/
717  /*********************************************************************************/
718  virtual long getSensorPM100_STDPeriod() { return _PM100SensorPeriod; }
719 
720  /*********************************************************************************/
727  /*********************************************************************************/
729 
730  /*******************************************************************************/
737  /*******************************************************************************/
738  virtual void setSensorPM100_STDPeriodPrv(long period) {
739  _PM100SensorPeriodPrv = period;
740  }
741 
742  /*******************************************************************************/
751  /*******************************************************************************/
752  virtual bool getEventPM100_STD(sensors_event_t *pm100StdEvent) {
753  (void)pm100StdEvent; // Parameter is intentionally unused in this virtual
754  // function.
755  return false;
756  }
757 
758  /**************************** SENSOR_TYPE: UNITLESS_PERCENT
759  * ****************************/
760  /*********************************************************************************/
767  /*********************************************************************************/
769  return _unitlessPercentPeriod;
770  }
771 
772  /*********************************************************************************/
779  /*********************************************************************************/
782  }
783 
784  /*******************************************************************************/
791  /*******************************************************************************/
792  virtual void setSensorUnitlessPercentPeriodPrv(long period) {
793  _unitlessPercentPeriodPrv = period;
794  }
795 
796  /*******************************************************************************/
805  /*******************************************************************************/
806  virtual bool getEventUnitlessPercent(sensors_event_t *unitlessPercentEvent) {
807  (void)unitlessPercentEvent; // Parameter is intentionally unused in this
808  // virtual function.
809  return false;
810  }
811 
812  /**************************** SENSOR_TYPE: VOLTAGE
813  * ****************************/
814  /*********************************************************************************/
820  /*********************************************************************************/
821  virtual long getSensorVoltagePeriod() { return _voltagePeriod; }
822 
823  /*********************************************************************************/
829  /*********************************************************************************/
830  virtual long getSensorVoltagePeriodPrv() { return _voltagePeriodPrv; }
831 
832  /*******************************************************************************/
838  /*******************************************************************************/
839  virtual void setSensorVoltagePeriodPrv(long period) {
840  _voltagePeriodPrv = period;
841  }
842 
843  /*******************************************************************************/
852  /*******************************************************************************/
853  virtual bool getEventVoltage(sensors_event_t *voltageEvent) {
854  (void)voltageEvent; // Parameter is intentionally unused in this virtual
855  // function.
856  return false;
857  }
858 
859  /**************************** SENSOR_TYPE: CURRENT
860  * ****************************/
861  /*********************************************************************************/
867  /*********************************************************************************/
868  virtual long getSensorCurrentPeriod() { return _currentPeriod; }
869 
870  /*********************************************************************************/
876  /*********************************************************************************/
877  virtual long getSensorCurrentPeriodPrv() { return _currentPeriodPrv; }
878 
879  /*******************************************************************************/
885  /*******************************************************************************/
886  virtual void setSensorCurrentPeriodPrv(long period) {
887  _currentPeriodPrv = period;
888  }
889 
890  /*******************************************************************************/
899  /*******************************************************************************/
900  virtual bool getEventCurrent(sensors_event_t *currentEvent) {
901  (void)currentEvent; // Parameter is intentionally unused in this virtual
902  // function.
903  return false;
904  }
905 
906  /****************************** SENSOR_TYPE: Raw
907  * *******************************/
908  /*********************************************************************************/
914  /*********************************************************************************/
915  virtual long getSensorRawPeriod() { return _rawSensorPeriod; }
916 
917  /*********************************************************************************/
923  /*********************************************************************************/
924  virtual long getSensorRawPeriodPrv() { return _rawSensorPeriodPrv; }
925 
926  /*******************************************************************************/
932  /*******************************************************************************/
933  virtual void setSensorRawPeriodPrv(long period) {
934  _rawSensorPeriodPrv = period;
935  }
936 
937  /*******************************************************************************/
945  /*******************************************************************************/
946  virtual bool getEventRaw(sensors_event_t *rawEvent) {
947  (void)
948  rawEvent; // Parameter is intentionally unused in this virtual function.
949  return false;
950  }
951 
952  /****************************** SENSOR_TYPE: Ambient Temp (°F)
953  * *******************************/
954 
955  /*******************************************************************************/
960  /*******************************************************************************/
961  virtual void disableAmbientTempF() { _ambientTempFPeriod = 0.0L; }
962 
963  /*********************************************************************************/
970  /*********************************************************************************/
972 
973  /*********************************************************************************/
980  /*********************************************************************************/
982  return _ambientTempFPeriodPrv;
983  }
984 
985  /*******************************************************************************/
993  /*******************************************************************************/
994  virtual void setSensorAmbientTempFPeriodPrv(long period) {
995  _ambientTempFPeriodPrv = period;
996  }
997 
998  /*******************************************************************************/
1008  /*******************************************************************************/
1009  virtual bool getEventAmbientTempF(sensors_event_t *AmbientTempFEvent) {
1010  // obtain ambient temp. in °C
1011  if (!getEventAmbientTemp(AmbientTempFEvent))
1012  return false;
1013  // convert event from °C to °F
1014  AmbientTempFEvent->temperature =
1015  (AmbientTempFEvent->temperature * 9.0) / 5.0 + 32;
1016  return true;
1017  }
1018 
1019  /****************************** SENSOR_TYPE: Object Temp (°F)
1020  * *******************************/
1021  /*********************************************************************************/
1028  /*********************************************************************************/
1030 
1031  /*********************************************************************************/
1038  /*********************************************************************************/
1040 
1041  /*******************************************************************************/
1049  /*******************************************************************************/
1050  virtual void setSensorObjectTempFPeriodPrv(long period) {
1051  _objectTempFPeriodPrv = period;
1052  }
1053 
1054  /*******************************************************************************/
1064  /*******************************************************************************/
1065  virtual bool getEventObjectTempF(sensors_event_t *objectTempFEvent) {
1066  // obtain ambient temp. in °C
1067  if (!getEventObjectTemp(objectTempFEvent))
1068  return false;
1069  // convert event from °C to °F
1070  objectTempFEvent->temperature =
1071  (objectTempFEvent->temperature * 9.0) / 5.0 + 32.0;
1072  return true;
1073  }
1074 
1075  /****************************** SENSOR_TYPE: Gas Resistance (ohms)
1076  * *******************************/
1077  /*********************************************************************************/
1084  /*********************************************************************************/
1086 
1087  /*********************************************************************************/
1094  /*********************************************************************************/
1096  return _gasResistancePeriodPrv;
1097  }
1098 
1099  /*******************************************************************************/
1107  /*******************************************************************************/
1108  virtual void setSensorGasResistancePeriodPrv(long period) {
1109  _gasResistancePeriodPrv = period;
1110  }
1111 
1112  /*******************************************************************************/
1121  /*******************************************************************************/
1122  virtual bool getEventGasResistance(sensors_event_t *gasEvent) {
1123  (void)
1124  gasEvent; // Parameter is intentionally unused in this virtual function.
1125  return false;
1126  }
1127 
1128  /****************************** SENSOR_TYPE: NOx Index (index)
1129  * *******************************/
1130  /*********************************************************************************/
1137  /*********************************************************************************/
1138  virtual long getSensorNOxIndexPeriod() { return _NOxIndexPeriod; }
1139 
1140  /*********************************************************************************/
1147  /*********************************************************************************/
1149 
1150  /*******************************************************************************/
1158  /*******************************************************************************/
1159  virtual void setSensorNOxIndexPeriodPrv(long period) {
1160  _NOxIndexPeriodPrv = period;
1161  }
1162 
1163  /*******************************************************************************/
1172  /*******************************************************************************/
1173  virtual bool getEventNOxIndex(sensors_event_t *gasEvent) {
1174  (void)
1175  gasEvent; // Parameter is intentionally unused in this virtual function.
1176  return false;
1177  }
1178 
1179  /****************************** SENSOR_TYPE: VOC Index (index)
1180  * *******************************/
1181  /*********************************************************************************/
1188  /*********************************************************************************/
1189  virtual long getSensorVOCIndexPeriod() { return _VOCIndexPeriod; }
1190 
1191  /*********************************************************************************/
1198  /*********************************************************************************/
1200 
1201  /*******************************************************************************/
1209  /*******************************************************************************/
1210  virtual void setSensorVOCIndexPeriodPrv(long period) {
1211  _VOCIndexPeriodPrv = period;
1212  }
1213 
1214  /*******************************************************************************/
1223  /*******************************************************************************/
1224  virtual bool getEventVOCIndex(sensors_event_t *gasEvent) {
1225  (void)
1226  gasEvent; // Parameter is intentionally unused in this virtual function.
1227  return false;
1228  }
1229 
1230  /**************************** SENSOR_TYPE: PROXIMITY
1231  * ****************************/
1232  /*******************************************************************************/
1236  /*******************************************************************************/
1237  virtual void enableSensorProximity(){};
1238 
1239  /*******************************************************************************/
1243  /*******************************************************************************/
1245 
1246  /*********************************************************************************/
1253  /*********************************************************************************/
1255 
1256  /*******************************************************************************/
1263  /*******************************************************************************/
1264  virtual void setSensorProximityPeriod(long period) {
1265  if (period == 0)
1267  _proximitySensorPeriod = period;
1268  }
1269 
1270  /*********************************************************************************/
1277  /*********************************************************************************/
1279 
1280  /*******************************************************************************/
1287  /*******************************************************************************/
1288  virtual void setSensorProximityPeriodPrv(long period) {
1289  _proximitySensorPeriodPrv = period;
1290  }
1291 
1292  /*******************************************************************************/
1301  /*******************************************************************************/
1302  virtual bool getEventProximity(sensors_event_t *proximityEvent) {
1303  (void)proximityEvent; // Parameter is intentionally unused in this virtual
1304  // function.
1305  return false;
1306  }
1307 
1308  /*******************************************************************************/
1315  /*******************************************************************************/
1316  virtual void updateSensorProximity(float period) {
1317  setSensorProximityPeriod(period);
1318  }
1319 
1320 protected:
1321  TwoWire *_i2c;
1322  uint16_t _sensorAddress;
1324  0L;
1327  long _humidSensorPeriod =
1329  0L;
1332  long _pressureSensorPeriod =
1334  0L;
1337  long _CO2SensorPeriod =
1339  0L;
1343  0L;
1347  0L;
1351  0L;
1354  long _objectTempSensorPeriod = 0L;
1359  long _lightSensorPeriod =
1361  0L;
1364  long _PM10SensorPeriod =
1366  0L;
1370  0L;
1374  0L;
1377  long _unitlessPercentPeriod =
1379  0L;
1382  long _voltagePeriod =
1384  0L;
1387  long _currentPeriod =
1389  0L;
1392  long _rawSensorPeriod =
1394  0L;
1398  long _ambientTempFPeriodPrv =
1401  long _objectTempFPeriod = 0L;
1403  long _objectTempFPeriodPrv =
1406  long _gasResistancePeriod = 0L;
1411  long _NOxIndexPeriod =
1413  0L;
1416  long _VOCIndexPeriod =
1418  0L;
1421  long _proximitySensorPeriod =
1423  0L;
1426 };
1428 
1429 #endif // WipperSnapper_I2C_Driver_H
long _unitlessPercentPeriod
The time period between reading the unitless % sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1378
+
virtual long getSensorUnitlessPercentPeriodPrv()
Base implementation - Returns the previous time interval at which the unitless % sensor was queried l...
Definition: WipperSnapper_I2C_Driver.h:780
+
virtual long getSensorLightPeriodPrv()
Base implementation - Returns the previous time interval at which the light sensor was queried last...
Definition: WipperSnapper_I2C_Driver.h:578
+
virtual long getSensorObjectTempPeriodPrv()
Base implementation - Returns the previous time interval at which the object temperature sensor was q...
Definition: WipperSnapper_I2C_Driver.h:526
+
virtual bool getEventPM10_STD(sensors_event_t *pm10StdEvent)
Base implementation - Reads a object pm10 std. sensor and converts the reading into the expected SI u...
Definition: WipperSnapper_I2C_Driver.h:652
+
virtual void updateSensorProximity(float period)
Updates the properties of a proximity sensor.
Definition: WipperSnapper_I2C_Driver.h:1316
+
long _PM10SensorPeriod
The time period between reading the pm25 sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1365
+
uint16_t getI2CAddress()
Gets the I2C device&#39;s address.
Definition: WipperSnapper_I2C_Driver.h:173
+
virtual long getSensorPM25_STDPeriod()
Base implementation - Returns the object pm25 standard sensors&#39; period, if set.
Definition: WipperSnapper_I2C_Driver.h:668
+
virtual void setSensorObjectTempFPeriodPrv(long period)
Sets a timestamp for when the object temperature sensor (°F) was queried.
Definition: WipperSnapper_I2C_Driver.h:1050
+
long _PM100SensorPeriod
The time period between reading the pm100_std sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1373
+
#define PERIOD_24HRS_AGO_MILLIS
Used for last sensor read time, initially set 24hrs ago (max period)
Definition: WipperSnapper_I2C_Driver.h:22
+
virtual void setSensorVOCIndexPeriodPrv(long period)
Sets a timestamp for when the object VOC Index sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:1210
+
long _currentPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1390
+
virtual long getSensorPressurePeriod()
Base implementation - Returns the pressure sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:421
+
virtual long getSensorTVOCPeriodPrv()
Base implementation - Returns the previous time interval at which the TVOC sensor was queried last...
Definition: WipperSnapper_I2C_Driver.h:285
+
virtual void setSensorAmbientTempFPeriodPrv(long period)
Sets a timestamp for when the ambient temperature sensor (°F) was queried.
Definition: WipperSnapper_I2C_Driver.h:994
+
virtual bool getEventPM100_STD(sensors_event_t *pm100StdEvent)
Base implementation - Reads a object pm100 std. sensor and converts the reading into the expected SI ...
Definition: WipperSnapper_I2C_Driver.h:752
+
virtual long getSensorCurrentPeriod()
Base implementation - Returns the current sensor&#39;s period.
Definition: WipperSnapper_I2C_Driver.h:868
+
virtual long getSensorRelativeHumidityPeriodPrv()
Base implementation - Returns the previous time interval at which the humidity sensor was queried las...
Definition: WipperSnapper_I2C_Driver.h:381
+
long _altitudeSensorPeriod
The time period between reading the altitude sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1350
+
virtual long getSensorVOCIndexPeriod()
Base implementation - Returns the VOC Index sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:1189
+
virtual long getSensorTVOCPeriod()
Base implementation - Returns the TVOC sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:276
+
virtual void setSensorProximityPeriodPrv(long period)
Sets a timestamp for when the proximity sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:1288
+
virtual bool getEventCO2(sensors_event_t *co2Event)
Gets a sensor&#39;s CO2 value.
Definition: WipperSnapper_I2C_Driver.h:215
+
virtual long getSensorAmbientTempPeriod()
Base implementation - Returns the ambient temperature (°C) sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:322
+
virtual long getSensorPM100_STDPeriodPrv()
Base implementation - Returns the previous time interval at which the pm100 std. sensor was queried l...
Definition: WipperSnapper_I2C_Driver.h:728
+
virtual long getSensorAmbientTempPeriodPrv()
Base implementation - Returns the previous time interval at which the ambient temperature sensor (°C)...
Definition: WipperSnapper_I2C_Driver.h:332
+
virtual bool getEventPM25_STD(sensors_event_t *pm25StdEvent)
Base implementation - Reads a object pm25 std. sensor and converts the reading into the expected SI u...
Definition: WipperSnapper_I2C_Driver.h:702
+
virtual bool getEventNOxIndex(sensors_event_t *gasEvent)
Base implementation - Reads a NOx Index sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:1173
+
virtual long getSensorECO2PeriodPrv()
Base implementation - Returns the previous time interval at which the eCO2 sensor was queried last...
Definition: WipperSnapper_I2C_Driver.h:239
+
long _currentPeriod
The time period between reading the current sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1388
+
long _NOxIndexPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1414
+
long _objectTempSensorPeriod
Definition: WipperSnapper_I2C_Driver.h:1355
+
long _TVOCSensorPeriod
The time period between reading the TVOC sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1346
+
long _ambientTempFPeriod
Definition: WipperSnapper_I2C_Driver.h:1397
+
virtual long getSensorUnitlessPercentPeriod()
Base implementation - Returns the object unitless % sensor period, if set.
Definition: WipperSnapper_I2C_Driver.h:768
+
virtual long getSensorCO2Period()
Base implementation - Returns the co2 sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:184
+
virtual void setSensorTVOCPeriodPrv(long period)
Sets a timestamp for when the TVOC sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:294
+
long _VOCIndexPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1419
+
virtual void setSensorVoltagePeriodPrv(long period)
Sets a timestamp for when the voltage sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:839
+
virtual void setSensorAltitudePeriodPrv(long period)
Sets a timestamp for when the Altitude sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:486
+
virtual bool getEventProximity(sensors_event_t *proximityEvent)
Base implementation - Reads a proximity sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:1302
+
long _tempSensorPeriod
The time period between reading the temperature sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1323
+
virtual bool getEventRelativeHumidity(sensors_event_t *humidEvent)
Base implementation - Reads a humidity sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:406
+
virtual void setSensorNOxIndexPeriodPrv(long period)
Sets a timestamp for when the object NOx Index sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:1159
+
virtual ~WipperSnapper_I2C_Driver()
Destructor for an I2C sensor.
Definition: WipperSnapper_I2C_Driver.h:52
+
long _unitlessPercentPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1380
+
virtual long getSensorAmbientTempFPeriodPrv()
Base implementation - Returns the previous time interval at which the ambient temperature sensor (°F)...
Definition: WipperSnapper_I2C_Driver.h:981
+
long _voltagePeriod
The time period between reading the voltage sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1383
+
bool begin()
Initializes the I2C sensor and begins I2C.
Definition: WipperSnapper_I2C_Driver.h:60
+
virtual long getSensorAmbientTempFPeriod()
Base implementation - Returns the ambient temperature (°F) sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:971
+
virtual bool getEventAmbientTempF(sensors_event_t *AmbientTempFEvent)
Helper function to obtain a sensor&#39;s ambient temperature value in °F. Requires getEventAmbientTemp() ...
Definition: WipperSnapper_I2C_Driver.h:1009
+
long _TVOCSensorPeriodPrv
The time when the TVOC sensor was last read.
Definition: WipperSnapper_I2C_Driver.h:1348
+
WipperSnapper_I2C_Driver(TwoWire *i2c, uint16_t sensorAddress)
Instanciates an I2C sensor.
Definition: WipperSnapper_I2C_Driver.h:42
+
virtual void disableAmbientTempF()
Disables the device&#39;s ambient temperature (°F) sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:961
+
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:30
+
virtual bool getEventAltitude(sensors_event_t *altitudeEvent)
Base implementation - Reads a Altitude sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:500
+
long _pressureSensorPeriod
The time period between reading the pressure sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1333
+
virtual bool getEventVOCIndex(sensors_event_t *gasEvent)
Base implementation - Reads a VOC Index sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:1224
+
long _objectTempFPeriod
Definition: WipperSnapper_I2C_Driver.h:1402
+
long _ambientTempFPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1399
+
long _ECO2SensorPeriodPrv
The time when the eCO2 sensor was last read.
Definition: WipperSnapper_I2C_Driver.h:1344
+
long _gasResistancePeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1409
+
long _humidSensorPeriod
The time period between reading the humidity sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1328
+
virtual void setSensorPM100_STDPeriodPrv(long period)
Sets a timestamp for when the light sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:738
+
virtual long getSensorLightPeriod()
Base implementation - Returns the object light sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:568
+
long _PM100SensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1375
+
virtual long getSensorRelativeHumidityPeriod()
Base implementation - Returns the humidity sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:372
+
virtual bool getEventUnitlessPercent(sensors_event_t *unitlessPercentEvent)
Base implementation - Reads a object unitless % std. sensor and converts the reading into the expecte...
Definition: WipperSnapper_I2C_Driver.h:806
+
virtual long getSensorPM25_STDPeriodPrv()
Base implementation - Returns the previous time interval at which the pm25 std. sensor was queried la...
Definition: WipperSnapper_I2C_Driver.h:678
+
virtual bool getEventTVOC(sensors_event_t *tvocEvent)
Gets a sensor&#39;s TVOC value.
Definition: WipperSnapper_I2C_Driver.h:307
+
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:1322
+
virtual long getSensorAltitudePeriodPrv()
Base implementation - Returns the previous time interval at which the Altitude sensor was queried las...
Definition: WipperSnapper_I2C_Driver.h:477
+
virtual void setSensorECO2PeriodPrv(long period)
Sets a timestamp for when the eCO2 sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:248
+
virtual long getSensorGasResistancePeriodPrv()
Base implementation - Returns the previous time interval at which the gas resistance sensor (ohms) wa...
Definition: WipperSnapper_I2C_Driver.h:1095
+
long _gasResistancePeriod
Definition: WipperSnapper_I2C_Driver.h:1407
+
virtual long SensorProximityPeriodPrv()
Base implementation - Returns the previous time interval at which the proximity sensor was queried la...
Definition: WipperSnapper_I2C_Driver.h:1278
+
virtual long getSensorPM100_STDPeriod()
Base implementation - Returns the object pm100 standard sensors&#39; period, if set.
Definition: WipperSnapper_I2C_Driver.h:718
+
long _humidSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1330
+
virtual long getSensorVoltagePeriod()
Base implementation - Returns the voltage sensor&#39;s period.
Definition: WipperSnapper_I2C_Driver.h:821
+
virtual void setSensorPM10_STDPeriodPrv(long period)
Sets a timestamp for when the light sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:638
+
long _objectTempSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1357
+
virtual long getSensorPM10_STDPeriodPrv()
Base implementation - Returns the previous time interval at which the pm10 std. sensor was queried la...
Definition: WipperSnapper_I2C_Driver.h:628
+
long _objectTempFPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1404
+
long _lightSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1362
+
virtual bool getEventECO2(sensors_event_t *eco2Event)
Gets a sensor&#39;s eCO2 value.
Definition: WipperSnapper_I2C_Driver.h:261
+
virtual void setSensorPM25_STDPeriodPrv(long period)
Sets a timestamp for when the light sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:688
+
void setSensorPeriod(float period, wippersnapper_i2c_v1_SensorType sensorType)
Sets the sensor&#39;s period, provided a wippersnapper_i2c_v1_SensorType.
Definition: WipperSnapper_I2C_Driver.h:71
+
virtual void setSensorObjectTempPeriodPrv(long period)
Sets a timestamp for when the object temperature sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:538
+
virtual long getSensorPressurePeriodPrv()
Base implementation - Returns the previous time interval at which the pressure sensor was queried las...
Definition: WipperSnapper_I2C_Driver.h:430
+
virtual void setSensorPressurePeriodPrv(long period)
Sets a timestamp for when the pressure sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:439
+
virtual void setSensorRelativeHumidityPeriodPrv(long periodPrv)
Sets a timestamp for when the temperature sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:392
+
virtual bool getEventPressure(sensors_event_t *pressureEvent)
Base implementation - Reads a pressure sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:453
+
virtual long getSensorCurrentPeriodPrv()
Base implementation - Returns the previous time interval at which the current sensor was queried last...
Definition: WipperSnapper_I2C_Driver.h:877
+
virtual long getSensorGasResistancePeriod()
Base implementation - Returns the gas resistance (ohms) sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:1085
+
virtual long getSensorAltitudePeriod()
Base implementation - Returns the Altitude sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:468
+
virtual bool getEventLight(sensors_event_t *lightEvent)
Base implementation - Reads a object light sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:602
+
long _VOCIndexPeriod
The time period between reading the VOC Index sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1417
+
virtual bool getEventGasResistance(sensors_event_t *gasEvent)
Base implementation - Reads a gas resistance sensor and converts the reading into the expected SI uni...
Definition: WipperSnapper_I2C_Driver.h:1122
+
virtual bool getEventAmbientTemp(sensors_event_t *tempEvent)
Base implementation - Reads an ambient temperature sensor (°C). Expects value to return in the proper...
Definition: WipperSnapper_I2C_Driver.h:357
+
virtual long getSensorObjectTempFPeriod()
Base implementation - Returns the object temperature (°F) sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:1029
+
long _CO2SensorPeriodPrv
The time when the CO2 sensor was last read.
Definition: WipperSnapper_I2C_Driver.h:1340
+
long _lightSensorPeriod
The time period between reading the light sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1360
+
void configureDriver(wippersnapper_i2c_v1_I2CDeviceInitRequest *msgDeviceInitReq)
Uses an I2CDeviceInitRequest message to configure the sensors belonging to the driver.
Definition: WipperSnapper_I2C_Driver.h:156
+
virtual void enableSensorProximity()
Enables the device&#39;s proximity sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:1237
+
virtual long getSensorNOxIndexPeriodPrv()
Base implementation - Returns the previous time interval at which the NOx Index sensor was queried la...
Definition: WipperSnapper_I2C_Driver.h:1148
+
virtual void setSensorUnitlessPercentPeriodPrv(long period)
Sets a timestamp for when the unitless % sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:792
+
virtual void setSensorCO2PeriodPrv(long period)
Sets a timestamp for when the co2 sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:202
+
virtual long getSensorRawPeriod()
Base implementation - Returns the raw sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:915
+
virtual void setSensorRawPeriodPrv(long period)
Sets a timestamp for when the raw sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:933
+
virtual long getSensorObjectTempPeriod()
Base implementation - Returns the object temperature sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:516
+
virtual void setSensorAmbientTempPeriodPrv(long periodPrv)
Sets a timestamp for when the ambient temperature sensor (°C) was queried.
Definition: WipperSnapper_I2C_Driver.h:343
+
long _voltagePeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1385
+
long _rawSensorPeriod
The time period between reading the Raw sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1393
+
virtual long getSensorCO2PeriodPrv()
Base implementation - Returns the previous time interval at which the co2 sensor was queried last...
Definition: WipperSnapper_I2C_Driver.h:193
+
virtual long getSensorECO2Period()
Base implementation - Returns the eCO2 sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:230
+
virtual void disableSensorProximity()
Disables the device&#39;s object proximity sensor, if it exists.
Definition: WipperSnapper_I2C_Driver.h:1244
+
virtual bool getEventObjectTempF(sensors_event_t *objectTempFEvent)
Helper function to obtain a sensor&#39;s object temperature value in °F. Requires getEventObjectTemp() to...
Definition: WipperSnapper_I2C_Driver.h:1065
+
long _rawSensorPeriodPrv
The time when the Raw sensor was last read.
Definition: WipperSnapper_I2C_Driver.h:1395
+
long _PM25SensorPeriod
The time period between reading the pm25 sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1369
+
long _tempSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1325
+
long _PM10SensorPeriodPrv
The time when the pm25 sensor was last read.
Definition: WipperSnapper_I2C_Driver.h:1367
+
long _CO2SensorPeriod
The time period between reading the CO2 sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1338
+
virtual long getSensorPM10_STDPeriod()
Base implementation - Returns the object pm10 standard sensors&#39; period, if set.
Definition: WipperSnapper_I2C_Driver.h:618
+
virtual long getSensorObjectTempFPeriodPrv()
Base implementation - Returns the previous time interval at which the object temperature sensor (°F) ...
Definition: WipperSnapper_I2C_Driver.h:1039
+
long _proximitySensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1424
+
virtual bool getEventObjectTemp(sensors_event_t *objectTempEvent)
Base implementation - Reads a object temperature sensor and converts the reading into the expected SI...
Definition: WipperSnapper_I2C_Driver.h:552
+
virtual long getSensorVoltagePeriodPrv()
Base implementation - Returns the previous time interval at which the voltage sensor was queried last...
Definition: WipperSnapper_I2C_Driver.h:830
+
long _ECO2SensorPeriod
The time period between reading the eCO2 sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1342
+
long _proximitySensorPeriod
The time period between reading the proximity sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1422
+
virtual long getSensorRawPeriodPrv()
Base implementation - Returns the previous time interval at which the raw sensor was queried last...
Definition: WipperSnapper_I2C_Driver.h:924
+
virtual void setSensorCurrentPeriodPrv(long period)
Sets a timestamp for when the current sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:886
+
long _PM25SensorPeriodPrv
The time when the pm25 sensor was last read.
Definition: WipperSnapper_I2C_Driver.h:1371
+
virtual bool getEventRaw(sensors_event_t *rawEvent)
Gets a sensor&#39;s Raw value.
Definition: WipperSnapper_I2C_Driver.h:946
+
virtual long sensorProximityPeriod()
Base implementation - Returns the proximity sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:1254
+
virtual bool getEventCurrent(sensors_event_t *currentEvent)
Base implementation - Reads a current sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:900
+
virtual void setSensorGasResistancePeriodPrv(long period)
Sets a timestamp for when the object gas resistance sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:1108
+
long _altitudeSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1352
+
virtual long getSensorVOCIndexPeriodPrv()
Base implementation - Returns the previous time interval at which the VOC Index sensor was queried la...
Definition: WipperSnapper_I2C_Driver.h:1199
+
long _NOxIndexPeriod
The time period between reading the NOx Index sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1412
+
virtual bool getEventVoltage(sensors_event_t *voltageEvent)
Base implementation - Reads a voltage sensor and converts the reading into the expected SI unit...
Definition: WipperSnapper_I2C_Driver.h:853
+
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:1321
+
long _pressureSensorPeriodPrv
Definition: WipperSnapper_I2C_Driver.h:1335
+
virtual long getSensorNOxIndexPeriod()
Base implementation - Returns the NOx Index sensor&#39;s period, if set.
Definition: WipperSnapper_I2C_Driver.h:1138
+
virtual void setSensorLightPeriodPrv(long period)
Sets a timestamp for when the light sensor was queried.
Definition: WipperSnapper_I2C_Driver.h:588
+
virtual void setSensorProximityPeriod(long period)
Set the proximity sensor&#39;s return frequency.
Definition: WipperSnapper_I2C_Driver.h:1264
#include "WipperSnapper_I2C_Driver.h"
-#include <Adafruit_MCP9601.h>
+#include <Adafruit_ADT7410.h>
-

Go to the source code of this file.

+

Go to the source code of this file.

- - + +

Classes

class  WipperSnapper_I2C_Driver_MCP9601
 Class that provides a driver interface for a MCP9601 sensor. More...
class  WipperSnapper_I2C_Driver_ADT7410
 Class that provides a driver interface for a ADT7410 sensor. More...
 

Detailed Description

-

Device driver for the MCP9601 Temperature sensor.

+

Device driver for the ADT7410 Temperature sensor.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

-

Copyright (c) Brent Rubell 2022 for Adafruit Industries.

+

Copyright (c) Brent Rubell 2023 for Adafruit Industries.

MIT license, all text here must be included in any redistribution.

diff --git a/html/_wipper_snapper___i2_c___driver___a_d_t7410_8h_source.html b/html/_wipper_snapper___i2_c___driver___a_d_t7410_8h_source.html new file mode 100644 index 000000000..3984b5de8 --- /dev/null +++ b/html/_wipper_snapper___i2_c___driver___a_d_t7410_8h_source.html @@ -0,0 +1,87 @@ + + + + + + + +Adafruit Library: src/components/i2c/drivers/WipperSnapper_I2C_Driver_ADT7410.h Source File + + + + + + + + + +
+
+ + + + + + +
+
Adafruit Library +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
WipperSnapper_I2C_Driver_ADT7410.h
+
+
+Go to the documentation of this file.
1 
15 #ifndef WipperSnapper_I2C_Driver_ADT7410_H
16 #define WipperSnapper_I2C_Driver_ADT7410_H
17 
19 #include <Adafruit_ADT7410.h>
20 
21 /**************************************************************************/
25 /**************************************************************************/
27 public:
28  /*******************************************************************************/
36  /*******************************************************************************/
37  WipperSnapper_I2C_Driver_ADT7410(TwoWire *i2c, uint16_t sensorAddress)
38  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
39  _i2c = i2c;
40  _sensorAddress = sensorAddress;
41  }
42 
43  /*******************************************************************************/
47  /*******************************************************************************/
49  // Called when a ADT7410 component is deleted.
50  delete _ADT7410;
51  }
52 
53  /*******************************************************************************/
58  /*******************************************************************************/
59  bool begin() {
60  _ADT7410 = new Adafruit_ADT7410();
61  return _ADT7410->begin((uint8_t)_sensorAddress, _i2c);
62  }
63 
64  /*******************************************************************************/
72  /*******************************************************************************/
73  bool getEventAmbientTemp(sensors_event_t *tempEvent) {
74  tempEvent->temperature = _ADT7410->readTempC();
75  return true;
76  }
77 
78 protected:
79  Adafruit_ADT7410 *_ADT7410;
80 };
81 
82 #endif // WipperSnapper_I2C_Driver_ADT7410
bool begin()
Initializes the ADT7410 sensor and begins I2C.
Definition: WipperSnapper_I2C_Driver_ADT7410.h:59
+
Class that provides a driver interface for a ADT7410 sensor.
Definition: WipperSnapper_I2C_Driver_ADT7410.h:26
+
WipperSnapper_I2C_Driver_ADT7410(TwoWire *i2c, uint16_t sensorAddress)
Constructor for a ADT7410 sensor.
Definition: WipperSnapper_I2C_Driver_ADT7410.h:37
+
Adafruit_ADT7410 * _ADT7410
Pointer to ADT7410 temperature sensor object.
Definition: WipperSnapper_I2C_Driver_ADT7410.h:79
+
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:30
+
bool getEventAmbientTemp(sensors_event_t *tempEvent)
Gets the ADT7410&#39;s current temperature.
Definition: WipperSnapper_I2C_Driver_ADT7410.h:73
+
~WipperSnapper_I2C_Driver_ADT7410()
Destructor for an ADT7410 sensor.
Definition: WipperSnapper_I2C_Driver_ADT7410.h:48
+
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:1322
+ +
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:1321
+
+ + + + diff --git a/html/_wipper_snapper___i2_c___driver___a_h_t_x0_8h_source.html b/html/_wipper_snapper___i2_c___driver___a_h_t_x0_8h_source.html index 6d483dd29..112baaa49 100644 --- a/html/_wipper_snapper___i2_c___driver___a_h_t_x0_8h_source.html +++ b/html/_wipper_snapper___i2_c___driver___a_h_t_x0_8h_source.html @@ -66,25 +66,19 @@
WipperSnapper_I2C_Driver_AHTX0.h
-Go to the documentation of this file.
1 
16 #ifndef WipperSnapper_I2C_Driver_AHTX0_H
17 #define WipperSnapper_I2C_Driver_AHTX0_H
18 
20 #include <Adafruit_AHTX0.h>
21 
22 /**************************************************************************/
27 /**************************************************************************/
29 
30 public:
31  /*******************************************************************************/
39  /*******************************************************************************/
40  WipperSnapper_I2C_Driver_AHTX0(TwoWire *i2c, uint16_t sensorAddress)
41  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
42  _i2c = i2c;
43  _sensorAddress = sensorAddress;
44  }
45 
46  /*******************************************************************************/
50  /*******************************************************************************/
52 
53  /*******************************************************************************/
59  /*******************************************************************************/
60  bool begin() {
61  _aht = new Adafruit_AHTX0();
62  bool isInit = _aht->begin(_i2c, (int32_t)_sensorAddress);
63  return isInit;
64  }
65 
66  /*******************************************************************************/
70  /*******************************************************************************/
72  _aht_temp = _aht->getTemperatureSensor();
73  }
74 
75  /*******************************************************************************/
79  /*******************************************************************************/
81  _aht_humidity = _aht->getHumiditySensor();
82  }
83 
84  /*******************************************************************************/
88  /*******************************************************************************/
90  _aht_temp = NULL; // TODO: change to nullptr instead!
91  _tempSensorPeriod = 0L;
92  }
93 
94  /*******************************************************************************/
98  /*******************************************************************************/
100  _aht_humidity = NULL; // TODO: change to nullptr instead!
101  _humidSensorPeriod = 0L;
102  }
103 
104  /*******************************************************************************/
112  /*******************************************************************************/
113  bool getEventAmbientTemperature(sensors_event_t *tempEvent) {
114  // update temp, if sensor enabled
115  if (_aht_temp != NULL) {
116  _aht_temp->getEvent(tempEvent);
117  return true;
118  }
119  return false;
120  }
121 
122  /*******************************************************************************/
130  /*******************************************************************************/
131  bool getEventRelativeHumidity(sensors_event_t *humidEvent) {
132  // update humidity, if sensor enabled
133  if (_aht_humidity != NULL) {
134  _aht_humidity->getEvent(humidEvent);
135  return true;
136  }
137  return false;
138  }
139 
140 protected:
141  Adafruit_AHTX0 *_aht;
142  Adafruit_Sensor *_aht_temp =
143  NULL;
144  Adafruit_Sensor *_aht_humidity =
145  NULL;
146 };
147 
148 #endif // WipperSnapper_I2C_Driver_AHTX0
bool getEventRelativeHumidity(sensors_event_t *humidEvent)
Gets the AHTX0&#39;s current humidity.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:131
+Go to the documentation of this file.
1 
16 #ifndef WipperSnapper_I2C_Driver_AHTX0_H
17 #define WipperSnapper_I2C_Driver_AHTX0_H
18 
20 #include <Adafruit_AHTX0.h>
21 
22 /**************************************************************************/
27 /**************************************************************************/
29 
30 public:
31  /*******************************************************************************/
39  /*******************************************************************************/
40  WipperSnapper_I2C_Driver_AHTX0(TwoWire *i2c, uint16_t sensorAddress)
41  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
42  _i2c = i2c;
43  _sensorAddress = sensorAddress;
44  }
45 
46  /*******************************************************************************/
50  /*******************************************************************************/
52 
53  /*******************************************************************************/
59  /*******************************************************************************/
60  bool begin() {
61  // attempt
62  _aht = new Adafruit_AHTX0();
63  if (!_aht->begin(_i2c, (int32_t)_sensorAddress))
64  return false;
65 
66  // get temperature and humidity sensor
67  _aht_temp = _aht->getTemperatureSensor();
68  _aht_humidity = _aht->getHumiditySensor();
69 
70  return true;
71  }
72 
73  /*******************************************************************************/
81  /*******************************************************************************/
82  bool getEventAmbientTemp(sensors_event_t *tempEvent) {
83  // is sensor enabled correctly?
84  if (_aht_temp == NULL)
85  return false;
86  // get event
87  _aht_temp->getEvent(tempEvent);
88  return true;
89  }
90 
91  /*******************************************************************************/
99  /*******************************************************************************/
100  bool getEventRelativeHumidity(sensors_event_t *humidEvent) {
101  // is sensor enabled correctly?
102  if (_aht_humidity == NULL)
103  return false;
104  // get humidity
105  _aht_humidity->getEvent(humidEvent);
106  return true;
107  }
108 
109 protected:
110  Adafruit_AHTX0 *_aht;
111  Adafruit_Sensor *_aht_temp =
112  NULL;
113  Adafruit_Sensor *_aht_humidity =
114  NULL;
115 };
116 
117 #endif // WipperSnapper_I2C_Driver_AHTX0
bool getEventRelativeHumidity(sensors_event_t *humidEvent)
Gets the AHTX0&#39;s current humidity.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:100
WipperSnapper_I2C_Driver_AHTX0(TwoWire *i2c, uint16_t sensorAddress)
Constructor for an AHTX0 sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:40
~WipperSnapper_I2C_Driver_AHTX0()
Destructor for an AHTX0 sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:51
-
long _tempSensorPeriod
The time period between reading the temperature sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:857
-
void enableSensorAmbientTemperature()
Enables the AHTX0&#39;s temperature sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:71
-
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:27
-
long _humidSensorPeriod
The time period between reading the humidity sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:861
-
Adafruit_Sensor * _aht_temp
Holds data for the AHTX0&#39;s temperature sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:142
-
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:856
-
Adafruit_AHTX0 * _aht
Pointer to an AHTX0 object.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:141
-
void disableSensorAmbientTemperature()
Disables the AHTX0&#39;s temperature sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:89
+
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:30
+
Adafruit_Sensor * _aht_temp
Holds data for the AHTX0&#39;s temperature sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:111
+
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:1322
+
Adafruit_AHTX0 * _aht
Pointer to an AHTX0 object.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:110
bool begin()
Initializes the AHTX0 sensor and begins I2C.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:60
-
Adafruit_Sensor * _aht_humidity
Holds data for the AHTX0&#39;s humidity sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:144
+
Adafruit_Sensor * _aht_humidity
Holds data for the AHTX0&#39;s humidity sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:113
Class that provides a sensor driver for the AHTX0 temperature and humidity sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:28
-
void enableSensorRelativeHumidity()
Enables the AHTX0&#39;s humidity sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:80
-
bool getEventAmbientTemperature(sensors_event_t *tempEvent)
Gets the AHTX0&#39;s current temperature.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:113
-
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:855
-
void disableSensorRelativeHumidity()
Disables the AHTX0&#39;s humidity sensor.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:99
+
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:1321
+
bool getEventAmbientTemp(sensors_event_t *tempEvent)
Gets the AHTX0&#39;s current temperature.
Definition: WipperSnapper_I2C_Driver_AHTX0.h:82
-Go to the documentation of this file.
1 
16 #ifndef WipperSnapper_I2C_Driver_DPS310_H
17 #define WipperSnapper_I2C_Driver_DPS310_H
18 
20 #include <Adafruit_DPS310.h>
21 
22 /**************************************************************************/
27 /**************************************************************************/
29 
30 public:
31  /*******************************************************************************/
39  /*******************************************************************************/
40  WipperSnapper_I2C_Driver_DPS310(TwoWire *i2c, uint16_t sensorAddress)
41  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
42  _i2c = i2c;
43  _sensorAddress = sensorAddress;
44  }
45 
46  /*******************************************************************************/
50  /*******************************************************************************/
52 
53  /*******************************************************************************/
58  /*******************************************************************************/
59  bool begin() {
60  _dps310 = new Adafruit_DPS310();
61  bool isInit = _dps310->begin_I2C((uint8_t)_sensorAddress, _i2c);
62  return isInit;
63  }
64 
65  /*******************************************************************************/
70  /*******************************************************************************/
72  _dps310->configureTemperature(DPS310_64HZ, DPS310_64SAMPLES);
73  _dps_temp = _dps310->getTemperatureSensor();
74  }
75 
76  /*******************************************************************************/
80  /*******************************************************************************/
82  _dps310->configurePressure(DPS310_64HZ, DPS310_64SAMPLES);
83  _dps_pressure = _dps310->getPressureSensor();
84  }
85 
86  /*******************************************************************************/
90  /*******************************************************************************/
92  _dps_temp = NULL;
93  _tempSensorPeriod = 0L;
94  }
95 
96  /*******************************************************************************/
100  /*******************************************************************************/
102  _dps_pressure = NULL;
104  }
105 
106  /*******************************************************************************/
113  /*******************************************************************************/
114  void updateSensorAmbientTemperature(float period) {
115  // disable the sensor
116  if (period == 0)
118  // enable a previously disabled sensor
119  if (period > 0 && _dps_temp == NULL)
121 
123  }
124 
125  /*******************************************************************************/
132  /*******************************************************************************/
133  void updateSensorPressure(float period) {
134  // disable the sensor
135  if (period == 0)
137  // enable a previously disabled sensor
138  if (period > 0 && _dps_pressure == NULL)
140 
141  setSensorPressurePeriod(period);
142  }
143 
144  /*******************************************************************************/
152  /*******************************************************************************/
153  bool getEventAmbientTemperature(sensors_event_t *tempEvent) {
154  if (_dps_temp != NULL && _dps310->temperatureAvailable()) {
155  _dps_temp->getEvent(tempEvent);
156  return true;
157  }
158  return false;
159  }
160 
161  /*******************************************************************************/
169  /*******************************************************************************/
170  bool getEventPressure(sensors_event_t *pressureEvent) {
171  if (_dps_pressure != NULL && _dps310->pressureAvailable()) {
172  _dps_pressure->getEvent(pressureEvent);
173  return true;
174  }
175  return false;
176  }
177 
178 protected:
179  Adafruit_DPS310 *_dps310;
180  Adafruit_Sensor *_dps_temp =
181  NULL;
182  Adafruit_Sensor *_dps_pressure =
183  NULL;
184 };
185 
186 #endif // WipperSnapper_I2C_Driver_DPS310
~WipperSnapper_I2C_Driver_DPS310()
Destructor for an DPS310 sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:51
-
bool getEventPressure(sensors_event_t *pressureEvent)
Gets the DPS310&#39;s pressure reading.
Definition: WipperSnapper_I2C_Driver_DPS310.h:170
-
virtual void setSensorAmbientTemperaturePeriod(float period)
Set the temperature sensor&#39;s return frequency.
Definition: WipperSnapper_I2C_Driver.h:242
-
Adafruit_Sensor * _dps_pressure
Holds data for the DPS310&#39;s pressure sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:182
-
long _tempSensorPeriod
The time period between reading the temperature sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:857
-
void enableSensorAmbientTemperature()
Enables the DPS310&#39;s temperature sensor. Sets highest precision options.
Definition: WipperSnapper_I2C_Driver_DPS310.h:71
+Go to the documentation of this file.
1 
16 #ifndef WipperSnapper_I2C_Driver_DPS310_H
17 #define WipperSnapper_I2C_Driver_DPS310_H
18 
20 #include <Adafruit_DPS310.h>
21 
22 /**************************************************************************/
27 /**************************************************************************/
29 
30 public:
31  /*******************************************************************************/
39  /*******************************************************************************/
40  WipperSnapper_I2C_Driver_DPS310(TwoWire *i2c, uint16_t sensorAddress)
41  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
42  _i2c = i2c;
43  _sensorAddress = sensorAddress;
44  }
45 
46  /*******************************************************************************/
50  /*******************************************************************************/
52 
53  /*******************************************************************************/
58  /*******************************************************************************/
59  bool begin() {
60  // initialize DPS310
61  _dps310 = new Adafruit_DPS310();
62  if (!_dps310->begin_I2C((uint8_t)_sensorAddress, _i2c))
63  return false;
64 
65  // init OK, perform sensor configuration
66  _dps310->configureTemperature(DPS310_64HZ, DPS310_64SAMPLES);
67  _dps310->configurePressure(DPS310_64HZ, DPS310_64SAMPLES);
68  _dps_temp = _dps310->getTemperatureSensor();
69  _dps_pressure = _dps310->getPressureSensor();
70  // check if sensors are configured properly
71  if (_dps_temp == NULL || _dps_pressure == NULL)
72  return false;
73 
74  return true;
75  }
76 
77  /*******************************************************************************/
85  /*******************************************************************************/
86  bool getEventAmbientTemp(sensors_event_t *tempEvent) {
87  if (!_dps310->temperatureAvailable())
88  return false;
89 
90  _dps_temp->getEvent(tempEvent);
91  return true;
92  }
93 
94  /*******************************************************************************/
102  /*******************************************************************************/
103  bool getEventPressure(sensors_event_t *pressureEvent) {
104  if (!_dps310->pressureAvailable())
105  return false;
106 
107  _dps_pressure->getEvent(pressureEvent);
108  return true;
109  }
110 
111 protected:
112  Adafruit_DPS310 *_dps310;
113  Adafruit_Sensor *_dps_temp =
114  NULL;
115  Adafruit_Sensor *_dps_pressure =
116  NULL;
117 };
118 
119 #endif // WipperSnapper_I2C_Driver_DPS310
~WipperSnapper_I2C_Driver_DPS310()
Destructor for an DPS310 sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:51
+
bool getEventPressure(sensors_event_t *pressureEvent)
Gets the DPS310&#39;s pressure reading.
Definition: WipperSnapper_I2C_Driver_DPS310.h:103
+
Adafruit_Sensor * _dps_pressure
Holds data for the DPS310&#39;s pressure sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:115
+
bool getEventAmbientTemp(sensors_event_t *tempEvent)
Gets the DPS310&#39;s current temperature.
Definition: WipperSnapper_I2C_Driver_DPS310.h:86
bool begin()
Initializes the DPS310 sensor and begins I2C.
Definition: WipperSnapper_I2C_Driver_DPS310.h:59
-
Adafruit_Sensor * _dps_temp
Holds data for the DPS310&#39;s temperature sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:180
-
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:27
-
long _pressureSensorPeriod
The time period between reading the pressure sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:865
-
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:856
+
Adafruit_Sensor * _dps_temp
Holds data for the DPS310&#39;s temperature sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:113
+
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:30
+
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:1322
WipperSnapper_I2C_Driver_DPS310(TwoWire *i2c, uint16_t sensorAddress)
Constructor for a DPS310 sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:40
-
void updateSensorAmbientTemperature(float period)
Updates the properties of an ambient temperature sensor, provided sensor_period.
Definition: WipperSnapper_I2C_Driver_DPS310.h:114
-
void disableSensorAmbientTemperature()
Disables the DPS310&#39;s pressure sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:91
-
Adafruit_DPS310 * _dps310
DPS310 driver object.
Definition: WipperSnapper_I2C_Driver_DPS310.h:179
-
virtual void setSensorPressurePeriod(float period)
Set the pressure sensor&#39;s return frequency.
Definition: WipperSnapper_I2C_Driver.h:446
-
void disableSensorPressure()
Disables the DPS310&#39;s pressure sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:101
+
Adafruit_DPS310 * _dps310
DPS310 driver object.
Definition: WipperSnapper_I2C_Driver_DPS310.h:112
-
bool getEventAmbientTemperature(sensors_event_t *tempEvent)
Gets the DPS310&#39;s current temperature.
Definition: WipperSnapper_I2C_Driver_DPS310.h:153
Class that provides a sensor driver for the DPS310 barometric pressure sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:28
-
void updateSensorPressure(float period)
Updates the properties of a pressure sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:133
-
void enableSensorPressure()
Enables the DPS310&#39;s pressure sensor.
Definition: WipperSnapper_I2C_Driver_DPS310.h:81
-
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:855
+
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:1321
-Go to the documentation of this file.
1 
15 #ifndef WipperSnapper_I2C_Driver_MCP9808_H
16 #define WipperSnapper_I2C_Driver_MCP9808_H
17 
19 #include <Adafruit_MCP9808.h>
20 
21 /**************************************************************************/
25 /**************************************************************************/
27 public:
28  /*******************************************************************************/
36  /*******************************************************************************/
37  WipperSnapper_I2C_Driver_MCP9808(TwoWire *i2c, uint16_t sensorAddress)
38  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
39  _i2c = i2c;
40  _sensorAddress = sensorAddress;
41  }
42 
43  /*******************************************************************************/
47  /*******************************************************************************/
49  // Called when a MCP9808 component is deleted.
50  delete _mcp9808;
51  }
52 
53  /*******************************************************************************/
58  /*******************************************************************************/
59  bool begin() {
60  _mcp9808 = new Adafruit_MCP9808();
61  bool isInit = _mcp9808->begin((uint8_t)_sensorAddress, _i2c);
62  return isInit;
63  }
64 
65  /*******************************************************************************/
73  /*******************************************************************************/
74  bool getEventAmbientTemperature(sensors_event_t *tempEvent) {
75  tempEvent->temperature = _mcp9808->readTempC();
76  return true;
77  }
78 
79 protected:
80  Adafruit_MCP9808 *_mcp9808;
81 };
82 
83 #endif // WipperSnapper_I2C_Driver_MCP9808
Adafruit_MCP9808 * _mcp9808
Pointer to MCP9808 temperature sensor object.
Definition: WipperSnapper_I2C_Driver_MCP9808.h:80
+Go to the documentation of this file.
1 
15 #ifndef WipperSnapper_I2C_Driver_MCP9808_H
16 #define WipperSnapper_I2C_Driver_MCP9808_H
17 
19 #include <Adafruit_MCP9808.h>
20 
21 /**************************************************************************/
25 /**************************************************************************/
27 public:
28  /*******************************************************************************/
36  /*******************************************************************************/
37  WipperSnapper_I2C_Driver_MCP9808(TwoWire *i2c, uint16_t sensorAddress)
38  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
39  _i2c = i2c;
40  _sensorAddress = sensorAddress;
41  }
42 
43  /*******************************************************************************/
47  /*******************************************************************************/
49  // Called when a MCP9808 component is deleted.
50  delete _mcp9808;
51  }
52 
53  /*******************************************************************************/
58  /*******************************************************************************/
59  bool begin() {
60  _mcp9808 = new Adafruit_MCP9808();
61  return _mcp9808->begin((uint8_t)_sensorAddress, _i2c);
62  }
63 
64  /*******************************************************************************/
72  /*******************************************************************************/
73  bool getEventAmbientTemp(sensors_event_t *tempEvent) {
74  tempEvent->temperature = _mcp9808->readTempC();
75  return true;
76  }
77 
78 protected:
79  Adafruit_MCP9808 *_mcp9808;
80 };
81 
82 #endif // WipperSnapper_I2C_Driver_MCP9808
Adafruit_MCP9808 * _mcp9808
Pointer to MCP9808 temperature sensor object.
Definition: WipperSnapper_I2C_Driver_MCP9808.h:79
Class that provides a driver interface for a MCP9808 sensor.
Definition: WipperSnapper_I2C_Driver_MCP9808.h:26
-
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:27
+
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:30
~WipperSnapper_I2C_Driver_MCP9808()
Destructor for an MCP9808 sensor.
Definition: WipperSnapper_I2C_Driver_MCP9808.h:48
-
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:856
+
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:1322
bool begin()
Initializes the MCP9808 sensor and begins I2C.
Definition: WipperSnapper_I2C_Driver_MCP9808.h:59
-
bool getEventAmbientTemperature(sensors_event_t *tempEvent)
Gets the MCP9808&#39;s current temperature.
Definition: WipperSnapper_I2C_Driver_MCP9808.h:74
+
bool getEventAmbientTemp(sensors_event_t *tempEvent)
Gets the MCP9808&#39;s current temperature.
Definition: WipperSnapper_I2C_Driver_MCP9808.h:73
WipperSnapper_I2C_Driver_MCP9808(TwoWire *i2c, uint16_t sensorAddress)
Constructor for a MCP9808 sensor.
Definition: WipperSnapper_I2C_Driver_MCP9808.h:37
-
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:855
+
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:1321
-Go to the documentation of this file.
1 
16 #ifndef WipperSnapper_I2C_Driver_SCD30_H
17 #define WipperSnapper_I2C_Driver_SCD30_H
18 
20 #include <Adafruit_SCD30.h>
21 
22 /**************************************************************************/
26 /**************************************************************************/
28 
29 public:
30  /*******************************************************************************/
38  /*******************************************************************************/
39  WipperSnapper_I2C_Driver_SCD30(TwoWire *i2c, uint16_t sensorAddress)
40  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
41  _i2c = i2c;
42  _sensorAddress = sensorAddress;
43  }
44 
45  /*******************************************************************************/
49  /*******************************************************************************/
51 
52  /*******************************************************************************/
57  /*******************************************************************************/
58  bool begin() {
59  _scd30 = new Adafruit_SCD30();
60  bool isInit = _scd30->begin((uint8_t)_sensorAddress, _i2c);
61  return isInit;
62  }
63 
64  /*******************************************************************************/
72  /*******************************************************************************/
73  bool getEventAmbientTemperature(sensors_event_t *tempEvent) {
74  // check if sensor is enabled and data is available
75  if (_tempSensorPeriod != 0 && (!_scd30->dataReady()))
76  return false;
77 
78  // attempt to get temperature data
79  sensors_event_t humidEvent;
80  if (!_scd30->getEvent(&humidEvent, tempEvent))
81  return false;
82 
83  return true;
84  }
85 
86  /*******************************************************************************/
94  /*******************************************************************************/
95  bool getEventRelativeHumidity(sensors_event_t *humidEvent) {
96  // check if sensor is enabled and data is available
97  if (_humidSensorPeriod != 0 && (!_scd30->dataReady()))
98  return false;
99 
100  // attempt to get temperature data
101  sensors_event_t tempEvent;
102  if (!_scd30->getEvent(humidEvent, &tempEvent))
103  return false;
104 
105  return true;
106  }
107 
108  /*******************************************************************************/
116  /*******************************************************************************/
117  bool getEventCO2(sensors_event_t *co2Event) {
118  // check if sensor is enabled and data is available
119  if (_CO2SensorPeriod != 0 && (!_scd30->dataReady()))
120  return false;
121  // TODO: This is a TEMPORARY HACK, we need to add CO2 type to
122  // adafruit_sensor
123  co2Event->data[0] = _scd30->CO2;
124  return true;
125  }
126 
127 protected:
128  Adafruit_SCD30 *_scd30;
129 };
130 
131 #endif // WipperSnapper_I2C_Driver_SCD30
Class that provides a driver interface for the SCD30 sensor.
Definition: WipperSnapper_I2C_Driver_SCD30.h:27
-
bool getEventCO2(sensors_event_t *co2Event)
Gets the SCD30&#39;s current CO2 reading.
Definition: WipperSnapper_I2C_Driver_SCD30.h:117
-
bool begin()
Initializes the SCD30 sensor and begins I2C.
Definition: WipperSnapper_I2C_Driver_SCD30.h:58
+Go to the documentation of this file.
1 
16 #ifndef WipperSnapper_I2C_Driver_SCD30_H
17 #define WipperSnapper_I2C_Driver_SCD30_H
18 
20 #include <Adafruit_SCD30.h>
21 
22 /**************************************************************************/
26 /**************************************************************************/
28 
29 public:
30  /*******************************************************************************/
38  /*******************************************************************************/
39  WipperSnapper_I2C_Driver_SCD30(TwoWire *i2c, uint16_t sensorAddress)
40  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
41  _i2c = i2c;
42  _sensorAddress = sensorAddress;
43  }
44 
45  /*******************************************************************************/
50  /*******************************************************************************/
51  bool begin() {
52  _scd = new Adafruit_SCD30();
53  return _scd->begin((uint8_t)_sensorAddress, _i2c);
54  }
55 
56  /*******************************************************************************/
64  /*******************************************************************************/
65  bool getEventAmbientTemp(sensors_event_t *tempEvent) {
66  // check if sensor is enabled and data is available
67  if (_tempSensorPeriod != 0 && (!_scd->dataReady()))
68  return false;
69 
70  // attempt to get temperature data
71  sensors_event_t humidEvent;
72  if (!_scd->getEvent(&humidEvent, tempEvent))
73  return false;
74 
75  return true;
76  }
77 
78  /*******************************************************************************/
86  /*******************************************************************************/
87  bool getEventRelativeHumidity(sensors_event_t *humidEvent) {
88  // check if sensor is enabled and data is available
89  if (_humidSensorPeriod != 0 && (!_scd->dataReady()))
90  return false;
91 
92  // attempt to get temperature data
93  sensors_event_t tempEvent;
94  if (!_scd->getEvent(humidEvent, &tempEvent))
95  return false;
96 
97  return true;
98  }
99 
100  /*******************************************************************************/
108  /*******************************************************************************/
109  bool getEventCO2(sensors_event_t *co2Event) {
110  // check if sensor is enabled and data is available
111  if (_CO2SensorPeriod != 0 && (!_scd->dataReady()))
112  return false;
113 
114  co2Event->CO2 = _scd->CO2;
115  return true;
116  }
117 
118 protected:
119  Adafruit_SCD30 *_scd;
120 };
121 
122 #endif // WipperSnapper_I2C_Driver_SCD30
Class that provides a driver interface for the SCD30 sensor.
Definition: WipperSnapper_I2C_Driver_SCD30.h:27
+
bool getEventCO2(sensors_event_t *co2Event)
Gets the SCD30&#39;s current CO2 reading.
Definition: WipperSnapper_I2C_Driver_SCD30.h:109
+
bool begin()
Initializes the SCD30 sensor and begins I2C.
Definition: WipperSnapper_I2C_Driver_SCD30.h:51
WipperSnapper_I2C_Driver_SCD30(TwoWire *i2c, uint16_t sensorAddress)
Constructor for a SCD30 sensor.
Definition: WipperSnapper_I2C_Driver_SCD30.h:39
-
bool getEventAmbientTemperature(sensors_event_t *tempEvent)
Gets the SCD30&#39;s current temperature.
Definition: WipperSnapper_I2C_Driver_SCD30.h:73
-
long _tempSensorPeriod
The time period between reading the temperature sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:857
-
bool getEventRelativeHumidity(sensors_event_t *humidEvent)
Gets the SCD30&#39;s current relative humidity reading.
Definition: WipperSnapper_I2C_Driver_SCD30.h:95
-
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:27
-
long _humidSensorPeriod
The time period between reading the humidity sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:861
-
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:856
-
Adafruit_SCD30 * _scd30
SCD30 driver object.
Definition: WipperSnapper_I2C_Driver_SCD30.h:128
+
long _tempSensorPeriod
The time period between reading the temperature sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1323
+
bool getEventRelativeHumidity(sensors_event_t *humidEvent)
Gets the SCD30&#39;s current relative humidity reading.
Definition: WipperSnapper_I2C_Driver_SCD30.h:87
+
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:30
+
long _humidSensorPeriod
The time period between reading the humidity sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1328
+
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:1322
-
long _CO2SensorPeriod
The time period between reading the CO2 sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:869
-
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:855
-
~WipperSnapper_I2C_Driver_SCD30()
Destructor for an SCD30 sensor.
Definition: WipperSnapper_I2C_Driver_SCD30.h:50
+
long _CO2SensorPeriod
The time period between reading the CO2 sensor&#39;s value.
Definition: WipperSnapper_I2C_Driver.h:1338
+
Adafruit_SCD30 * _scd
SCD30 driver object.
Definition: WipperSnapper_I2C_Driver_SCD30.h:119
+
bool getEventAmbientTemp(sensors_event_t *tempEvent)
Gets the SCD30&#39;s current temperature.
Definition: WipperSnapper_I2C_Driver_SCD30.h:65
+
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:1321
-Go to the documentation of this file.
1 
15 #ifndef WipperSnapper_I2C_Driver_TSL2591_H
16 #define WipperSnapper_I2C_Driver_TSL2591_H
17 
19 #include <Adafruit_TSL2591.h>
20 
21 /**************************************************************************/
25 /**************************************************************************/
27 public:
28  /*******************************************************************************/
36  /*******************************************************************************/
37  WipperSnapper_I2C_Driver_TSL2591(TwoWire *i2c, uint16_t sensorAddress)
38  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
39  _i2c = i2c;
40  _sensorAddress = sensorAddress;
41  }
42 
43  /*******************************************************************************/
47  /*******************************************************************************/
49 
50  /*******************************************************************************/
55  /*******************************************************************************/
56  bool begin() {
57  _tsl = new Adafruit_TSL2591();
58  // Attempt to initialize TSL2591
59  if (!_tsl->begin())
60  return false;
61 
62  // Configure TSL2591 sensor
63  // Note: This driver uses the default configuration from
64  // https://github.com/adafruit/Adafruit_TSL2591_Library/blob/master/examples/tsl2591/tsl2591.ino
65  _tsl->setGain(TSL2591_GAIN_MED); // 25x gain
66  _tsl->setTiming(TSL2591_INTEGRATIONTIME_300MS); // 300ms integration time
67  return true;
68  }
69 
70  /*******************************************************************************/
79  /*******************************************************************************/
80  bool getEventLight(sensors_event_t *lightEvent) {
81  // Get sensor event
82  _tsl->getEvent(lightEvent);
83 
84  // If lightEvent->light = 0 lux the sensor is probably saturated and no
85  // reliable data could be generated! or if lightEvent->light is +/-
86  // 4294967040 there was a float over/underflow
87  if ((lightEvent->light == 0) | (lightEvent->light > 4294966000.0) |
88  (lightEvent->light < -4294966000.0))
89  return false;
90 
91  return true;
92  }
93 
94 protected:
95  Adafruit_TSL2591 *_tsl;
96 };
97 
98 #endif // WipperSnapper_I2C_Driver_TSL2591
WipperSnapper_I2C_Driver_TSL2591(TwoWire *i2c, uint16_t sensorAddress)
Constructor for a TSL2591 sensor.
Definition: WipperSnapper_I2C_Driver_TSL2591.h:37
+Go to the documentation of this file.
1 
15 #ifndef WipperSnapper_I2C_Driver_TSL2591_H
16 #define WipperSnapper_I2C_Driver_TSL2591_H
17 
19 #include <Adafruit_TSL2591.h>
20 
21 /**************************************************************************/
25 /**************************************************************************/
27 public:
28  /*******************************************************************************/
36  /*******************************************************************************/
37  WipperSnapper_I2C_Driver_TSL2591(TwoWire *i2c, uint16_t sensorAddress)
38  : WipperSnapper_I2C_Driver(i2c, sensorAddress) {
39  _i2c = i2c;
40  _sensorAddress = sensorAddress;
41  }
42 
43  /*******************************************************************************/
47  /*******************************************************************************/
49 
50  /*******************************************************************************/
55  /*******************************************************************************/
56  bool begin() {
57  _tsl = new Adafruit_TSL2591(2591);
58  // Attempt to initialize TSL2591
59  if (!_tsl->begin(_i2c, TSL2591_ADDR))
60  return false;
61 
62  // Configure TSL2591 sensor
63  // Note: This driver uses the default configuration from
64  // https://github.com/adafruit/Adafruit_TSL2591_Library/blob/master/examples/tsl2591/tsl2591.ino
65  _tsl->setGain(TSL2591_GAIN_MED); // 25x gain
66  _tsl->setTiming(TSL2591_INTEGRATIONTIME_300MS); // 300ms integration time
67  return true;
68  }
69 
70  /*******************************************************************************/
79  /*******************************************************************************/
80  bool getEventLight(sensors_event_t *lightEvent) {
81  // Get sensor event
82  _tsl->getEvent(lightEvent);
83 
84  // If lightEvent->light = 0 lux the sensor is probably saturated and no
85  // reliable data could be generated! or if lightEvent->light is +/-
86  // 4294967040 there was a float over/underflow
87  if ((lightEvent->light == 0) | (lightEvent->light > 4294966000.0) |
88  (lightEvent->light < -4294966000.0))
89  return false;
90 
91  return true;
92  }
93 
94 protected:
95  Adafruit_TSL2591 *_tsl;
96 };
97 
98 #endif // WipperSnapper_I2C_Driver_TSL2591
WipperSnapper_I2C_Driver_TSL2591(TwoWire *i2c, uint16_t sensorAddress)
Constructor for a TSL2591 sensor.
Definition: WipperSnapper_I2C_Driver_TSL2591.h:37
Adafruit_TSL2591 * _tsl
Pointer to TSL2591 light sensor object.
Definition: WipperSnapper_I2C_Driver_TSL2591.h:95
Class that provides a driver interface for a TSL2591 sensor.
Definition: WipperSnapper_I2C_Driver_TSL2591.h:26
-
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:27
-
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:856
+
Base class for I2C Drivers.
Definition: WipperSnapper_I2C_Driver.h:30
+
uint16_t _sensorAddress
The I2C driver&#39;s unique I2C address.
Definition: WipperSnapper_I2C_Driver.h:1322
~WipperSnapper_I2C_Driver_TSL2591()
Destructor for an TSL2591 sensor.
Definition: WipperSnapper_I2C_Driver_TSL2591.h:48
bool getEventLight(sensors_event_t *lightEvent)
Performs a light sensor read using the Adafruit Unified Sensor API.
Definition: WipperSnapper_I2C_Driver_TSL2591.h:80
bool begin()
Initializes the TSL2591 sensor and begins I2C.
Definition: WipperSnapper_I2C_Driver_TSL2591.h:56
-
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:855
+
TwoWire * _i2c
Pointer to the I2C driver&#39;s Wire object.
Definition: WipperSnapper_I2C_Driver.h:1321
@@ -382,7 +402,6 @@

Parameters
-
msgInitRequestA pointer to an i2c bus initialization message.
i2cPortDesired I2C port to initialize.
@@ -515,6 +534,416 @@

+

◆ cbDecodeServoMsg()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool cbDecodeServoMsg (pb_istream_t * stream,
const pb_field_t * field,
void ** arg 
)
+
+ +

Decodes a servo message and dispatches to the servo component.

+
Parameters
+ + + + +
streamIncoming data stream from buffer.
fieldProtobuf message's tag type.
argOptional arguments from decoder calling function.
+
+
+
Returns
True if decoded and executed successfully, False otherwise.
+ +
+
+ +

◆ cbServoMsg()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbServoMsg (char * data,
uint16_t len 
)
+
+ +

Called when the device recieves a new message from the /servo/ topic.

+
Parameters
+ + + +
dataIncoming data from MQTT broker.
lenLength of incoming data.
+
+
+ +
+
+ +

◆ cbPWMDecodeMsg()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool cbPWMDecodeMsg (pb_istream_t * stream,
const pb_field_t * field,
void ** arg 
)
+
+ +

Decodes a servo message and dispatches to the servo component.

+
Parameters
+ + + + +
streamIncoming data stream from buffer.
fieldProtobuf message's tag type.
argOptional arguments from decoder calling function.
+
+
+
Returns
True if decoded and executed successfully, False otherwise.
+ +
+
+ +

◆ cbPWMMsg()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbPWMMsg (char * data,
uint16_t len 
)
+
+ +

Called when the device recieves a new message from the /pwm/ topic.

+
Parameters
+ + + +
dataIncoming data from MQTT broker.
lenLength of incoming data.
+
+
+ +
+
+ +

◆ cbDecodeDs18x20Msg()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool cbDecodeDs18x20Msg (pb_istream_t * stream,
const pb_field_t * field,
void ** arg 
)
+
+ +

Decodes a Dallas Sensor (ds18x20) signal request message and executes the callback based on the message's tag.

+
Parameters
+ + + + +
streamIncoming data stream from buffer.
fieldProtobuf message's tag type.
argOptional arguments from decoder calling function.
+
+
+
Returns
True if decoded successfully, False otherwise.
+ +
+
+ +

◆ cbSignalDSReq()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbSignalDSReq (char * data,
uint16_t len 
)
+
+ +

Called when DallasSensor (DS) signal sub-topic receives a new message and attempts to decode the message.

+
Parameters
+ + + +
dataIncoming data from MQTT broker.
lenLength of incoming data.
+
+
+ +
+
+ +

◆ cbDecodePixelsMsg()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool cbDecodePixelsMsg (pb_istream_t * stream,
const pb_field_t * field,
void ** arg 
)
+
+ +

Decodes a pixel strand request message and executes the callback based on the message's tag.

+
Parameters
+ + + + +
streamIncoming data stream from buffer.
fieldProtobuf message's tag type.
argOptional arguments from decoder calling function.
+
+
+
Returns
True if decoded successfully, False otherwise.
+ +
+
+ +

◆ cbPixelsMsg()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbPixelsMsg (char * data,
uint16_t len 
)
+
+ +

Called when the device recieves a new message from the /pixels/ topic.

+
Parameters
+ + + +
dataIncoming data from MQTT broker.
lenLength of incoming data.
+
+
+ +
+
+ +

◆ cbDecodeUARTMessage()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
bool cbDecodeUARTMessage (pb_istream_t * stream,
const pb_field_t * field,
void ** arg 
)
+
+ +

Decodes a UART message and executes the callback based on the message's tag.

+
Parameters
+ + + + +
streamIncoming data stream from buffer.
fieldProtobuf message's tag type.
argOptional arguments from decoder calling function.
+
+
+
Returns
True if decoded successfully, False otherwise.
+ +
+
+ +

◆ cbSignalUARTReq()

+ +
+
+ + + + + + + + + + + + + + + + + + +
void cbSignalUARTReq (char * data,
uint16_t len 
)
+
+ +

Called when the signal UART sub-topic receives a new message. Performs decoding.

+
Parameters
+ + + +
dataIncoming data from MQTT broker.
lenLength of incoming data.
+
+
+
@@ -628,23 +1057,44 @@

-

◆ validateAppCreds()

+ +

◆ print_reset_reason()

- + - + +
bool validateAppCreds void print_reset_reason ()int reason)
-

Checks validity of WipperSnapper application credentials.

-
Returns
True if WipperSnapper application credentials exist and are valid, False otherwise.
+

Prints last reset reason of ESP32.

+
Parameters
+ + +
reasonThe return code of rtc_get_reset_reason(coreNum)
+
+
+

<1, Vbat power on reset

+

<3, Software reset digital core

+

<4, Legacy watch dog reset digital core

+

<5, Deep Sleep reset digital core

+

<6, Reset by SLC module, reset digital core

+

<7, Timer Group0 Watch dog reset digital core

+

<8, Timer Group1 Watch dog reset digital core

+

<9, RTC Watch dog Reset digital core

+

<10, Instrusion tested to reset CPU

+

<11, Time Group reset CPU

+

<12, Software reset CPU

+

<13, RTC Watch dog Reset CPU

+

<14, for APP CPU, reseted by PRO CPU

+

<15, Reset when the vdd voltage is not stable

+

<16, RTC Watch dog reset digital core and rtc module

diff --git a/html/_wippersnapper_8h.html b/html/_wippersnapper_8h.html index fa0fe6cf4..7ab562fa0 100644 --- a/html/_wippersnapper_8h.html +++ b/html/_wippersnapper_8h.html @@ -77,19 +77,26 @@ #include <nanopb/pb_encode.h>
#include <pb.h>
#include <wippersnapper/description/v1/description.pb.h>
-#include <wippersnapper/pin/v1/pin.pb.h>
#include <wippersnapper/signal/v1/signal.pb.h>
+#include "Adafruit_MQTT.h"
+#include "Adafruit_SleepyDog.h"
+#include "Arduino.h"
+#include <SPI.h>
#include "Wippersnapper_Boards.h"
-#include "components/statusLED/Wippersnapper_StatusLED_Colors.h"
+#include "components/statusLED/Wippersnapper_StatusLED.h"
+#include "provisioning/ConfigJson.h"
#include "components/analogIO/Wippersnapper_AnalogIO.h"
#include "components/digitalIO/Wippersnapper_DigitalGPIO.h"
#include "components/i2c/WipperSnapper_I2C.h"
-#include "Adafruit_MQTT.h"
-#include "Arduino.h"
-#include <Adafruit_DotStar.h>
-#include <Adafruit_NeoPixel.h>
-#include <SPI.h>
-#include "Adafruit_SleepyDog.h"
+#include "components/ledc/ws_ledc.h"
+#include "display/ws_display_driver.h"
+#include "display/ws_display_ui_helper.h"
+#include "components/ds18x20/ws_ds18x20.h"
+#include "components/pixels/ws_pixels.h"
+#include "components/pwm/ws_pwm.h"
+#include "components/servo/ws_servo.h"
+#include "components/uart/ws_uart.h"
+#include "provisioning/tinyusb/Wippersnapper_FS.h"

Go to the source code of this file.

@@ -101,8 +108,28 @@
+ + + + + + + + + + + + + + + +#define  - - - - - - - - - - - - - - - + + + + + + - - - +#define 

Macros

+#define WS_DEBUG
 Define to enable debugging to serial terminal.
 
+#define WS_PRINTER   Serial
 Where debug messages will be printed.
 
+#define WS_DEBUG_PRINT(...)   { WS_PRINTER.print(__VA_ARGS__); }
 Prints debug output.
 
+#define WS_DEBUG_PRINTLN(...)   { WS_PRINTER.println(__VA_ARGS__); }
 Prints line from debug output.
 
+#define WS_DEBUG_PRINTHEX(...)   { WS_PRINTER.print(__VA_ARGS__, HEX); }
 Prints debug output.
 
-#define WS_VERSION   "1.0.0-beta.30"
WS_VERSION   "1.0.0-beta.78"
 WipperSnapper app. version (semver-formatted)
 
@@ -129,36 +156,20 @@ #define TOPIC_I2C   "/i2c"
 I2C sub-topic.
 
-#define WS_DEBUG
 Define to enable debugging to serial terminal.
 
-#define WS_PRINTER   Serial
 Where debug messages will be printed.
 
-#define WS_DEBUG_PRINT(...)   { WS_PRINTER.print(__VA_ARGS__); }
 Prints debug output.
 
-#define WS_DEBUG_PRINTLN(...)   { WS_PRINTER.println(__VA_ARGS__); }
 Prints line from debug output.
 
-#define WS_DEBUG_PRINTHEX(...)   { WS_PRINTER.print(__VA_ARGS__, HEX); }
 Prints debug output.
 
+#define MQTT_TOPIC_PIXELS_DEVICE   "/signals/device/pixel"
 Pixels device->broker topic.
 
+#define MQTT_TOPIC_PIXELS_BROKER   "/signals/broker/pixel"
 Pixels broker->device topic.
 
#define WS_WDT_TIMEOUT   60000
 WDT timeout.
 
-#define WS_KEEPALIVE_INTERVAL   4
 Session keepalive interval time, in seconds.
 
-#define WS_KEEPALIVE_INTERVAL_MS   4000
WS_KEEPALIVE_INTERVAL_MS   5000
 Session keepalive interval time, in milliseconds.
 
@@ -237,7 +248,7 @@

Detailed Description

This is the documentation for Adafruit's Wippersnapper firmware for the Arduino platform. It is designed specifically to work with Adafruit IO Wippersnapper IoT platform.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

-

Copyright (c) Brent Rubell 2020-2021 for Adafruit Industries.

+

Copyright (c) Brent Rubell 2020-2024 for Adafruit Industries.

BSD license, all text here must be included in any redistribution.

Enumeration Type Documentation

diff --git a/html/_wippersnapper_8h_source.html b/html/_wippersnapper_8h_source.html index fac0df845..d2f9e076c 100644 --- a/html/_wippersnapper_8h_source.html +++ b/html/_wippersnapper_8h_source.html @@ -66,114 +66,151 @@
Wippersnapper.h
-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/pin/v1/pin.pb.h> // pin.proto
32 #include <wippersnapper/signal/v1/signal.pb.h> // signal.proto
33 
34 // Wippersnapper API Helpers
35 #include "Wippersnapper_Boards.h"
37 
38 // Wippersnapper components
42 
43 // External libraries
44 #include "Adafruit_MQTT.h" // MQTT Client
45 #include "Arduino.h" // Wiring
46 
47 // Note: These might be better off in their respective wrappers
48 #include <Adafruit_DotStar.h>
49 #include <Adafruit_NeoPixel.h>
50 #include <SPI.h>
51 
52 #ifndef ESP8266
53 #include "Adafruit_SleepyDog.h"
54 #endif
55 
56 #if defined(USE_TINYUSB)
57 #include "provisioning/tinyusb/Wippersnapper_FS.h"
58 #endif
59 
60 #if defined(USE_LITTLEFS)
61 #include "provisioning/littlefs/WipperSnapper_LittleFS.h"
62 #endif
63 
64 #define WS_VERSION \
65  "1.0.0-beta.30"
66 
67 // Reserved Adafruit IO MQTT topics
68 #define TOPIC_IO_THROTTLE "/throttle"
69 #define TOPIC_IO_ERRORS "/errors"
70 
71 // Reserved Wippersnapper topics
72 #define TOPIC_WS "/wprsnpr/"
73 #define TOPIC_INFO "/info/"
74 #define TOPIC_SIGNALS "/signals/"
75 #define TOPIC_I2C "/i2c"
76 
77 #define WS_DEBUG
78 #define WS_PRINTER Serial
79 
80 // Define actual debug output functions when necessary.
81 #ifdef WS_DEBUG
82 #define WS_DEBUG_PRINT(...) \
83  { WS_PRINTER.print(__VA_ARGS__); }
84 #define WS_DEBUG_PRINTLN(...) \
85  { WS_PRINTER.println(__VA_ARGS__); }
86 #define WS_DEBUG_PRINTHEX(...) \
87  { WS_PRINTER.print(__VA_ARGS__, HEX); }
88 #else
89 #define WS_DEBUG_PRINT(...) \
90  {}
91 #define WS_DEBUG_PRINTLN(...) \
92  {}
93 #endif
94 
96 typedef enum {
97  WS_IDLE = 0, // Waiting for connection establishement
98  WS_NET_DISCONNECTED = 1, // Network disconnected
99  WS_DISCONNECTED = 2, // Disconnected from Adafruit IO
100  WS_FINGERPRINT_UNKOWN = 3, // Unknown WS_SSL_FINGERPRINT
101 
102  WS_NET_CONNECT_FAILED = 10, // Failed to connect to network
103  WS_CONNECT_FAILED = 11, // Failed to connect to Adafruit IO
104  WS_FINGERPRINT_INVALID = 12, // Unknown WS_SSL_FINGERPRINT
105  WS_AUTH_FAILED = 13, // Invalid Adafruit IO login credentials provided.
106  WS_SSID_INVALID =
107  14, // SSID is "" or otherwise invalid, connection not attempted
108 
109  WS_NET_CONNECTED = 20, // Connected to Adafruit IO
110  WS_CONNECTED = 21, // Connected to network
111  WS_CONNECTED_INSECURE = 22, // Insecurely (non-SSL) connected to network
112  WS_FINGERPRINT_UNSUPPORTED = 23, // Unsupported WS_SSL_FINGERPRINT
113  WS_FINGERPRINT_VALID = 24, // Valid WS_SSL_FINGERPRINT
114  WS_BOARD_DESC_INVALID = 25, // Unable to send board description
115  WS_BOARD_RESYNC_FAILED = 26 // Board sync failure
116 } ws_status_t;
117 
119 typedef enum {
120  WS_MQTT_CONNECTED = 0, // Connected
121  WS_MQTT_INVALID_PROTOCOL = 1, // Invalid mqtt protocol
122  WS_MQTT_INVALID_CID = 2, // Client id rejected
123  WS_MQTT_SERVICE_UNAVALIABLE = 3, // Malformed user/pass
124  WS_MQTT_INVALID_USER_PASS = 4, // Unauthorized access to resource
125  WS_MQTT_UNAUTHORIZED = 5, // MQTT service unavailable
126  WS_MQTT_THROTTLED = 6, // Account throttled
127  WS_MQTT_BANNED = 7 // Account banned
129 
131 typedef enum {
132  WS_BOARD_DEF_IDLE,
133  WS_BOARD_DEF_SEND_FAILED,
134  WS_BOARD_DEF_SENT,
135  WS_BOARD_DEF_OK,
136  WS_BOARD_DEF_INVALID,
137  WS_BOARD_DEF_UNSPECIFIED
139 
141 typedef enum {
142  FSM_NET_IDLE,
143  FSM_NET_CONNECTED,
144  FSM_MQTT_CONNECTED,
145  FSM_NET_CHECK_MQTT,
146  FSM_NET_CHECK_NETWORK,
147  FSM_NET_ESTABLISH_NETWORK,
148  FSM_NET_ESTABLISH_MQTT,
149 } fsm_net_t;
150 
151 #define WS_WDT_TIMEOUT 60000
152 /* MQTT Configuration */
153 // TODO: Redundant, we should reference keepalive_interval_ms and just do math
154 #define WS_KEEPALIVE_INTERVAL 4
155 #define WS_KEEPALIVE_INTERVAL_MS \
156  4000
158 #define WS_MQTT_MAX_PAYLOAD_SIZE \
159  512
160 
163 class Wippersnapper_FS;
164 class WipperSnapper_LittleFS;
166 
167 /**************************************************************************/
172 /**************************************************************************/
173 class Wippersnapper {
174 public:
175  Wippersnapper();
176  virtual ~Wippersnapper();
177 
178  void provision();
179 
180  // Status LED
181  bool statusLEDInit();
182  void statusLEDDeinit();
183  void setStatusLEDColor(uint32_t color);
184  void statusLEDBlink(ws_led_status_t statusState);
185  bool lockStatusNeoPixel =
186  false;
187  bool lockStatusDotStar =
188  false;
189  bool lockStatusLED = false;
191  virtual void set_user_key();
192  virtual void set_ssid_pass(const char *ssid, const char *ssidPassword);
193  virtual void set_ssid_pass();
194 
195  virtual void _connect();
196  virtual void _disconnect();
197  void connect();
198  void disconnect();
199 
200  virtual void getMacAddr();
201  virtual void setupMQTTClient(const char *clientID);
202 
203  virtual ws_status_t networkStatus();
205 
206  bool buildWSTopics();
207  void subscribeWSTopics();
208  bool buildErrorTopics();
209  void subscribeErrorTopics();
210 
211  // Registration API
212  bool registerBoard();
214  void decodeRegistrationResp(char *data, uint16_t len);
215  void pollRegistrationResp();
216  // Configuration API
218 
219  // run() loop
220  ws_status_t run();
221  void processPackets();
222  void publish(const char *topic, uint8_t *payload, uint16_t bLen,
223  uint8_t qos = 0);
224 
225  // Networking helpers
226  void pingBroker();
227  void runNetFSM();
228 
229  // WDT helpers
230  void enableWDT(int timeoutMS = 0);
231  void feedWDT();
232 
233  // Error handling helpers
234  void haltError(String error);
235  void errorWriteHang(String error);
236 
237  // MQTT topic callbacks //
238  // Decodes a signal message
239  bool decodeSignalMsg(
240  wippersnapper_signal_v1_CreateSignalRequest *encodedSignalMsg);
241 
242  // Encodes a pin event message
243  bool
244  encodePinEvent(wippersnapper_signal_v1_CreateSignalRequest *outgoingSignalMsg,
245  uint8_t pinName, int pinVal);
246 
247  // Pin configure message
248  bool configurePinRequest(wippersnapper_pin_v1_ConfigurePinRequest *pinMsg);
249 
250  // I2C
251  std::vector<WipperSnapper_Component_I2C *>
252  i2cComponents;
254  NULL;
256  NULL;
257  bool _isI2CPort0Init =
258  false;
259  bool _isI2CPort1Init =
260  false;
261 
264  uint8_t
267  uint16_t bufSize;
273  Wippersnapper_FS *_fileSystem;
274  WipperSnapper_LittleFS
277  uint8_t _macAddr[6];
278  char sUID[13];
279  const char *_boardId;
280  Adafruit_MQTT *_mqtt;
282  const char *_mqttBrokerURL = nullptr;
283  uint16_t _mqtt_port = 8883;
285  // AIO credentials
286  const char *_username = NULL;
287  const char *_key = NULL;
289  // WiFi credentials
290  const char *_network_ssid = NULL;
291  const char *_network_pass = NULL;
295  char *_topic_description =
296  NULL;
297  char *_topic_signal_device = NULL;
298  char *_topic_signal_i2c_brkr = NULL;
303  wippersnapper_signal_v1_CreateSignalRequest
306  // i2c signal msg
307  wippersnapper_signal_v1_I2CRequest msgSignalI2C =
308  wippersnapper_signal_v1_I2CRequest_init_zero;
309 
311  char *throttleMessage;
312  int throttleTime;
315  bool pinCfgCompleted = false;
317 private:
318  void _init();
319 
320 protected:
321  ws_status_t _status = WS_IDLE;
322  uint32_t _last_mqtt_connect = 0;
324  uint32_t _prv_ping = 0;
326  uint32_t _prvKATBlink = 0;
329  // Device information
330  const char *_deviceId;
331  char *_device_uid;
333  // MQTT topics
335  NULL;
341  NULL;
344  char *_topic_signal_brkr = NULL;
345  char *_err_topic = NULL;
346  char *_throttle_topic = NULL;
348  Adafruit_MQTT_Subscribe
350  Adafruit_MQTT_Publish
352  Adafruit_MQTT_Subscribe
354  Adafruit_MQTT_Subscribe
357  Adafruit_MQTT_Subscribe
359  Adafruit_MQTT_Subscribe
360  *_throttle_sub;
362  wippersnapper_signal_v1_CreateSignalRequest
364 };
365 
367 
368 #endif // ADAFRUIT_WIPPERSNAPPER_H
-
Class that provides an interface with the I2C bus.
Definition: WipperSnapper_I2C.h:41
-
const char * _network_pass
Definition: Wippersnapper.h:294
-
void disconnect()
Disconnects from Adafruit IO+ Wippersnapper.
Definition: Wippersnapper.cpp:100
-
virtual void setupMQTTClient(const char *clientID)
Sets up the MQTT client session.
Definition: Wippersnapper.cpp:139
-
void subscribeErrorTopics()
Subscribes to user-specific Adafruit IO MQTT topics.
Definition: Wippersnapper.cpp:1043
-
const char * _boardId
Definition: Wippersnapper.h:282
-
ws_mqtt_status_t
Definition: Wippersnapper.h:122
+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.78"
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
+
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
+
char * _topic_signal_uart_brkr
Definition: Wippersnapper.h:346
+
virtual void setupMQTTClient(const char *clientID)
Sets up the MQTT client session.
Definition: Wippersnapper.cpp:192
+
const char * _boardId
Definition: Wippersnapper.h:318
+ +
ws_mqtt_status_t
Definition: Wippersnapper.h:136
-
Adafruit_MQTT_Subscribe * _throttle_sub
Definition: Wippersnapper.h:363
-
bool _isI2CPort1Init
True if I2C port 1 has been initialized, False otherwise.
Definition: Wippersnapper.h:262
-
void statusLEDBlink(ws_led_status_t statusState)
Blinks a status LED a specific color depending on the hardware&#39;s state.
Definition: Wippersnapper_StatusLED.cpp:152
+
Adafruit_MQTT_Subscribe * _throttle_sub
Definition: Wippersnapper.h:438
+
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
+
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:1488
-
void processPackets()
Process all incoming packets from the Adafruit IO MQTT broker. Handles network connectivity.
Definition: Wippersnapper.cpp:1466
-
void setStatusLEDColor(uint32_t color)
Sets a status RGB LED&#39;s color.
Definition: Wippersnapper_StatusLED.cpp:114
-
const char * _deviceId
Definition: Wippersnapper.h:333
-
char * _device_uid
Definition: Wippersnapper.h:334
-
virtual ~Wippersnapper()
Wippersnapper destructor.
Definition: Wippersnapper.cpp:61
-
bool buildWSTopics()
Generates device-specific Wippersnapper control topics.
Definition: Wippersnapper.cpp:1062
-
#define WS_MQTT_MAX_PAYLOAD_SIZE
MAXIMUM expected payload size, in bytes.
Definition: Wippersnapper.h:161
-
void connect()
Connects to Adafruit IO+ Wippersnapper broker.
Definition: Wippersnapper.cpp:1520
-
bool encodePinEvent(wippersnapper_signal_v1_CreateSignalRequest *outgoingSignalMsg, uint8_t pinName, int pinVal)
Handles MQTT messages on signal topic until timeout.
Definition: Wippersnapper.cpp:828
-
char * _topic_description_status
Definition: Wippersnapper.h:337
-
const char * _username
Definition: Wippersnapper.h:289
-
Class that provides an interface for reading and controlling analog pins. Stores information about an...
Definition: Wippersnapper_AnalogIO.h:40
-
WipperSnapper_LittleFS * _littleFS
Instance of LittleFS Filesystem (non-native USB)
Definition: Wippersnapper.h:278
-
uint8_t _buffer_outgoing[WS_MQTT_MAX_PAYLOAD_SIZE]
Definition: Wippersnapper.h:268
-
void statusLEDDeinit()
De-initializes status LED. The usingStatus flag is also reset.
Definition: Wippersnapper_StatusLED.cpp:86
-
void errorWriteHang(String error)
Writes an error message to the serial and the filesystem, blinks WS_LED_STATUS_ERROR pattern and hang...
Definition: Wippersnapper.cpp:1260
-
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:404
-
void provision()
Provisions a WipperSnapper device with its network configuration and Adafruit IO credentials.
Definition: Wippersnapper.cpp:76
-
Adafruit_MQTT_Subscribe * _topic_signal_i2c_sub
Definition: Wippersnapper.h:358
-
char * _topic_signal_device
Definition: Wippersnapper.h:300
-
uint8_t _buffer[WS_MQTT_MAX_PAYLOAD_SIZE]
Definition: Wippersnapper.h:265
-
uint16_t _mqtt_port
Definition: Wippersnapper.h:286
-
uint32_t _last_mqtt_connect
Definition: Wippersnapper.h:325
-
char * _topic_signal_i2c_device
Definition: Wippersnapper.h:303
-
wippersnapper_signal_v1_I2CRequest msgSignalI2C
Definition: Wippersnapper.h:310
-
Wippersnapper_DigitalGPIO * _digitalGPIO
Instance of digital gpio class.
Definition: Wippersnapper.h:274
-
bool statusLEDInit()
Initializes board-specific status LED.
Definition: Wippersnapper_StatusLED.cpp:37
-
ws_status_t
Definition: Wippersnapper.h:99
-
WipperSnapper_Component_I2C * _i2cPort1
WipperSnapper I2C Component for I2C port #1.
Definition: Wippersnapper.h:258
-
wippersnapper_signal_v1_CreateSignalRequest _incomingSignalMsg
Definition: Wippersnapper.h:307
-
Class that provides storage and functions for the Adafruit IO Wippersnapper interface.
Definition: Wippersnapper.h:176
-
const char * _mqttBrokerURL
Definition: Wippersnapper.h:285
-
ws_status_t run()
Processes incoming commands and handles network connection.
Definition: Wippersnapper.cpp:1640
-
virtual void _connect()
Connects to wireless network.
Definition: Wippersnapper.cpp:109
-
wippersnapper_signal_v1_CreateSignalRequest _outgoingSignalMsg
Definition: Wippersnapper.h:366
+
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
+
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
+
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
+
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
+
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
+
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
+
Adafruit_MQTT_Subscribe * _topic_signal_i2c_sub
Definition: Wippersnapper.h:423
+
char * _topic_signal_device
Definition: Wippersnapper.h:327
+
uint8_t _buffer[WS_MQTT_MAX_PAYLOAD_SIZE]
Definition: Wippersnapper.h:287
+
secretsConfig _config
Definition: Wippersnapper.h:321
+
uint32_t _last_mqtt_connect
Definition: Wippersnapper.h:390
+ +
char * _topic_signal_i2c_device
Definition: Wippersnapper.h:330
+
char * _topic_signal_pixels_device
Definition: Wippersnapper.h:345
+
ws_display_ui_helper * _ui_helper
Instance of display UI helper class.
Definition: Wippersnapper.h:306
+
wippersnapper_signal_v1_I2CRequest msgSignalI2C
Definition: Wippersnapper.h:351
+
Wippersnapper_DigitalGPIO * _digitalGPIO
Instance of digital gpio class.
Definition: Wippersnapper.h:299
+
ws_status_t
Definition: Wippersnapper.h:113
+
WipperSnapper_Component_I2C * _i2cPort1
WipperSnapper I2C Component for I2C port #1.
Definition: Wippersnapper.h:280
+
wippersnapper_signal_v1_CreateSignalRequest _incomingSignalMsg
Definition: Wippersnapper.h:350
+
virtual bool check_valid_ssid()
Performs a scan of local WiFi networks.
Definition: Wippersnapper.cpp:237
+
Class that provides storage and functions for the Adafruit IO Wippersnapper interface.
Definition: Wippersnapper.h:200
+
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
+
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
bool encodePubRegistrationReq()
Encodes hardware registration request message and publishes the message to the Adafruit IO broker...
Definition: Wippersnapper_Register.cpp:27
-
char * throttleMessage
Definition: Wippersnapper.h:314
-
uint32_t _prv_ping
Definition: Wippersnapper.h:327
-
virtual void getMacAddr()
Sets the network interface&#39;s unique identifer, typically the MAC address.
Definition: Wippersnapper.cpp:128
+
char * throttleMessage
Definition: Wippersnapper.h:374
+
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
-
Adafruit_MQTT_Subscribe * _topic_description_sub
Definition: Wippersnapper.h:352
-
bool buildErrorTopics()
Builds MQTT topics for handling errors returned from the Adafruit IO broker.
Definition: Wippersnapper.cpp:1010
-
char sUID[13]
Definition: Wippersnapper.h:281
+
bool generateDeviceUID()
Attempts to generate unique device identifier.
Definition: Wippersnapper.cpp:1804
+
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
-
bool configurePinRequest(wippersnapper_pin_v1_ConfigurePinRequest *pinMsg)
Configures a pin according to a wippersnapper_pin_v1_ConfigurePinRequest message. ...
Definition: Wippersnapper.cpp:198
-
virtual void set_ssid_pass()
Sets the device&#39;s wireless network credentials from the secrets.json configuration file...
Definition: Wippersnapper.cpp:174
-
char * _err_topic
Definition: Wippersnapper.h:348
-
void feedWDT()
Feeds the WDT to prevent hardware reset.
Definition: Wippersnapper.cpp:1432
-
uint32_t _prvKATBlink
Definition: Wippersnapper.h:329
- -
ws_board_status_t _boardStatus
Hardware&#39;s registration status.
Definition: Wippersnapper.h:272
-
void runNetFSM()
Checks network and MQTT connectivity. Handles network re-connection and mqtt re-establishment.
Definition: Wippersnapper.cpp:1280
-
bool pinCfgCompleted
Definition: Wippersnapper.h:318
-
void pingBroker()
Pings the MQTT broker within the keepalive interval to keep the connection alive. Blinks the keepaliv...
Definition: Wippersnapper.cpp:1413
-
const char * _network_ssid
Definition: Wippersnapper.h:293
-
void enableWDT(int timeoutMS=0)
Enables the watchdog timer.
Definition: Wippersnapper.cpp:1446
-
const char * _key
Definition: Wippersnapper.h:290
-
void subscribeWSTopics()
Subscribes to device-specific MQTT control topics.
Definition: Wippersnapper.cpp:1232
-
void publishPinConfigComplete()
Publishes an ACK to the broker that the device has completed its hardware configuration.
Definition: Wippersnapper.cpp:1606
-
std::vector< WipperSnapper_Component_I2C * > i2cComponents
Vector containing all I2C components.
Definition: Wippersnapper.h:255
-
uint16_t bufSize
Definition: Wippersnapper.h:270
-
char * _topic_signal_i2c_brkr
Definition: Wippersnapper.h:301
-
Adafruit_MQTT_Subscribe * _topic_signal_brkr_sub
Definition: Wippersnapper.h:356
-
char * _topic_signal_brkr
Definition: Wippersnapper.h:347
-
int32_t totalDigitalPins
Definition: Wippersnapper.h:296
-
ws_status_t _status
Definition: Wippersnapper.h:324
-
ws_board_status_t
Definition: Wippersnapper.h:134
-
uint8_t _macAddr[6]
Definition: Wippersnapper.h:280
-
ws_led_status_t
Definition: Wippersnapper_StatusLED_Colors.h:36
-
fsm_net_t
Definition: Wippersnapper.h:144
-
bool lockStatusLED
True if status LED is using the built-in LED.
Definition: Wippersnapper.h:192
-
Wippersnapper_FS * _fileSystem
Instance of Filesystem (native USB)
Definition: Wippersnapper.h:276
-
Adafruit_MQTT * _mqtt
Definition: Wippersnapper.h:283
-
virtual ws_status_t networkStatus()
Returns the network&#39;s connection status.
Definition: Wippersnapper.cpp:149
-
char * _topic_device_pin_config_complete
Definition: Wippersnapper.h:343
-
Wippersnapper_AnalogIO * _analogIO
Instance of analog io class.
Definition: Wippersnapper.h:275
-
char * _topic_description_status_complete
Definition: Wippersnapper.h:340
+
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
+
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
+
Adafruit_MQTT_Subscribe * _topic_signal_pixels_sub
Definition: Wippersnapper.h:431
+ +
ws_ds18x20 * _ds18x20Component
Instance of DS18x20 class.
Definition: Wippersnapper.h:312
+
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
+
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
+
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
+
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
+
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
+
char * _topic_signal_i2c_brkr
Definition: Wippersnapper.h:328
+
Adafruit_MQTT_Subscribe * _topic_signal_brkr_sub
Definition: Wippersnapper.h:420
+
char * _topic_signal_brkr
Definition: Wippersnapper.h:412
+
int32_t totalDigitalPins
Definition: Wippersnapper.h:324
+
Interface for WipperSnapper PWM.
Definition: ws_pwm.h:34
+
ws_status_t _status
Definition: Wippersnapper.h:389
+
ws_board_status_t
Definition: Wippersnapper.h:148
+
uint8_t _macAddr[6]
Definition: Wippersnapper.h:316
+
ws_pwm * _pwmComponent
Instance of pwm class.
Definition: Wippersnapper.h:310
+
fsm_net_t
Definition: Wippersnapper.h:158
+
bool lockStatusLED
True if status LED is using the built-in LED.
Definition: Wippersnapper.h:209
+
Wippersnapper_FS * _fileSystem
Instance of Filesystem (native USB)
Definition: Wippersnapper.h:301
+
Adafruit_MQTT_Subscribe * _topic_signal_uart_sub
Definition: Wippersnapper.h:433
+
Adafruit_MQTT * _mqtt
Definition: Wippersnapper.h:319
+
#define STATUS_PIXEL_BRIGHTNESS_DEFAULT
Default status pixel brightness.
Definition: Wippersnapper_StatusLED.h:59
+
virtual ws_status_t networkStatus()
Returns the network&#39;s connection status.
Definition: Wippersnapper.cpp:202
+
char * _topic_device_pin_config_complete
Definition: Wippersnapper.h:408
+
char * _topic_signal_servo_brkr
Definition: Wippersnapper.h:332
+
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:1404
-
bool lockStatusDotStar
True if status LED is using the status dotstar.
Definition: Wippersnapper.h:190
-
void haltError(String error)
Prints an error to the serial and halts the hardware until the WDT bites.
Definition: Wippersnapper.cpp:1364
-
char * _throttle_topic
Definition: Wippersnapper.h:349
-
void decodeRegistrationResp(char *data, uint16_t len)
Decodes hardware registration response message from the Adafruit IO MQTT broker and initializes hardw...
Definition: Wippersnapper_Register.cpp:97
-
bool lockStatusNeoPixel
True if status LED is using the status neopixel.
Definition: Wippersnapper.h:188
-
WipperSnapper_Component_I2C * _i2cPort0
WipperSnapper I2C Component for I2C port #0.
Definition: Wippersnapper.h:256
-
bool registerBoard()
Attempts to register hardware with Adafruit.io WipperSnapper.
Definition: Wippersnapper.cpp:1380
-
int throttleTime
Definition: Wippersnapper.h:315
-
Adafruit_MQTT_Subscribe * _err_sub
Definition: Wippersnapper.h:361
-
bool _isI2CPort0Init
True if I2C port 0 has been initialized, False otherwise.
Definition: Wippersnapper.h:260
-
virtual void _disconnect()
Disconnect Wippersnapper MQTT session and network.
Definition: Wippersnapper.cpp:118
+
ws_board_status_t getBoardStatus()
Returns the board definition status.
Definition: Wippersnapper.cpp:2516
+
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
+
char * _throttle_topic
Definition: Wippersnapper.h:414
+
void decodeRegistrationResp(char *data, uint16_t len)
Decodes hardware registration response message from the Adafruit IO MQTT broker and initializes hardw...
Definition: Wippersnapper_Register.cpp:98
+
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
+
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
+
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
+
virtual void _disconnect()
Disconnect Wippersnapper MQTT session and network.
Definition: Wippersnapper.cpp:171
+ +
ws_servo * _servoComponent
Instance of servo class.
Definition: Wippersnapper.h:311
-
Adafruit_MQTT_Publish * _topic_signal_device_pub
Definition: Wippersnapper.h:354
-
char * _topic_description
Definition: Wippersnapper.h:298
-
virtual void set_user_key()
Configures the device&#39;s Adafruit IO credentials. This method should be used only if filesystem-backed...
Definition: Wippersnapper.cpp:184
+
Adafruit_MQTT_Publish * _topic_signal_device_pub
Definition: Wippersnapper.h:418
+
ws_uart * _uartComponent
Instance of UART class.
Definition: Wippersnapper.h:313
+
char * _topic_description
Definition: Wippersnapper.h:326
+
Class that provides an interface between WipperSnapper&#39;s app and the device&#39;s UART bus...
Definition: ws_uart.h:29
+
virtual void set_user_key()
Configures the device&#39;s Adafruit IO credentials. This method should be used only if filesystem-backed...
Definition: Wippersnapper.cpp:249
-Go to the documentation of this file.
1 
20 #ifndef WIPPERSNAPPER_AIRLIFT_H
21 #define WIPPERSNAPPER_AIRLIFT_H
22 
23 #include "Adafruit_MQTT.h"
24 #include "Adafruit_MQTT_Client.h"
25 #include "Arduino.h"
26 #include "SPI.h"
27 #include "WiFiNINA.h"
28 #include "Wippersnapper.h"
29 
30 #define NINAFWVER \
31  "1.6.0"
33 #define SPIWIFI SPI
35 extern Wippersnapper WS;
36 /****************************************************************************/
40 /****************************************************************************/
42 
43 public:
44  /**************************************************************************/
48  /**************************************************************************/
50  _ssPin = 10;
51  _ackPin = 7;
52  _rstPin = 5;
53  _gpio0Pin = -1;
54  _wifi = &SPIWIFI;
55  _ssid = 0;
56  _pass = 0;
57  _mqtt_client = new WiFiSSLClient;
58 
59  // setup ESP32 co-processor pins during init.
60  WiFi.setPins(_ssPin, _ackPin, _rstPin, _gpio0Pin, _wifi);
61  }
62 
63  /**************************************************************************/
67  /**************************************************************************/
69  if (_mqtt)
70  delete _mqtt;
71  }
72 
73  /**********************************************************/
81  /**********************************************************/
82  void set_ssid_pass(const char *ssid, const char *ssidPassword) {
83  _ssid = ssid;
84  _pass = ssidPassword;
85  }
86 
87  /**********************************************************/
92  /**********************************************************/
93  void set_ssid_pass() {
96  }
97 
98  /********************************************************/
104  /********************************************************/
105  void set_wifi(SPIClass *wifi) {
106  _wifi = wifi;
107  _mqtt_client = new WiFiSSLClient;
108  }
109 
110  /********************************************************/
122  /********************************************************/
123  void set_airlift_pins(int ssPin, int ackPin, int rstPin, int gpio0Pin) {
124  _ssPin = ssPin;
125  _ackPin = ackPin;
126  _rstPin = rstPin;
127  _gpio0Pin = gpio0Pin;
128  }
129 
130  /********************************************************/
137  /********************************************************/
138  bool firmwareCheck() {
139  _fv = WiFi.firmwareVersion();
140  if (_fv < NINAFWVER)
141  return false;
142  return true;
143  }
144 
145  /********************************************************/
150  /********************************************************/
151  void getMacAddr() {
152  uint8_t mac[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
153  WiFi.macAddress(mac);
154  memcpy(WS._macAddr, mac, sizeof(mac));
155  }
156 
157  /********************************************************/
163  /********************************************************/
164  void setupMQTTClient(const char *clientID) {
165  if (WS._mqttBrokerURL == nullptr)
166  WS._mqttBrokerURL = "io.adafruit.com";
167 
168  WS._mqtt =
169  new Adafruit_MQTT_Client(_mqtt_client, WS._mqttBrokerURL, WS._mqtt_port,
170  clientID, WS._username, WS._key);
171  }
172 
173  /********************************************************/
178  /********************************************************/
180  switch (WiFi.status()) {
181  case WL_CONNECTED:
182  return WS_NET_CONNECTED;
183  case WL_CONNECT_FAILED:
184  return WS_NET_CONNECT_FAILED;
185  case WL_IDLE_STATUS:
186  return WS_IDLE;
187  default:
188  return WS_NET_DISCONNECTED;
189  }
190  }
191 
192  /*******************************************************************/
197  /*******************************************************************/
198  const char *connectionType() { return "AIRLIFT"; }
199 
200 protected:
201  const char *_ssid;
202  const char *_pass;
203  const char *_mqttBrokerURL;
204  String _fv;
205  int _ssPin = -1;
206  int _ackPin = -1;
207  int _rstPin = -1;
208  int _gpio0Pin = -1;
209  WiFiSSLClient *_mqtt_client;
210  SPIClass *_wifi;
212  /**************************************************************************/
216  /**************************************************************************/
217  void _connect() {
218  if (strlen(_ssid) == 0) {
219  _status = WS_SSID_INVALID;
220  } else {
221 
222  // validate co-processor is physically connected connection
223  if (WiFi.status() == WL_NO_MODULE) {
224  WS_DEBUG_PRINT("No ESP32 module detected!");
225  return;
226  }
227 
228  // validate co-processor's firmware version
229  if (!firmwareCheck())
230  WS_DEBUG_PRINTLN("Please upgrade the firmware on the ESP module to the "
231  "latest version.");
232 
233  // disconnect from possible previous connection
234  _disconnect();
235 
236  WiFi.begin(_ssid, _pass);
237  _status = WS_NET_DISCONNECTED;
238  }
239  }
240 
241  /**************************************************************************/
245  /**************************************************************************/
246  void _disconnect() {
247  WiFi.disconnect();
248  delay(500);
249  }
250 };
251 
252 #endif // WIPPERSNAPPER_AIRLIFT_H
const char * _network_pass
Definition: Wippersnapper.h:294
-
#define WS_DEBUG_PRINT(...)
Prints debug output.
Definition: Wippersnapper.h:82
-
int _rstPin
Definition: Wippersnapper_AIRLIFT.h:207
-
void _disconnect()
Disconnects from the wireless network.
Definition: Wippersnapper_AIRLIFT.h:246
-
void setupMQTTClient(const char *clientID)
Initializes the MQTT client.
Definition: Wippersnapper_AIRLIFT.h:164
-
int _ackPin
Definition: Wippersnapper_AIRLIFT.h:206
-
void set_airlift_pins(int ssPin, int ackPin, int rstPin, int gpio0Pin)
Configures ESP32 "AirLift" pins.
Definition: Wippersnapper_AIRLIFT.h:123
+Go to the documentation of this file.
1 
20 #ifndef WIPPERSNAPPER_AIRLIFT_H
21 #define WIPPERSNAPPER_AIRLIFT_H
22 
23 #include "Adafruit_MQTT.h"
24 #include "Adafruit_MQTT_Client.h"
25 #include "Arduino.h"
26 #include "SPI.h"
27 #include "WiFiNINA.h"
28 #include "Wippersnapper.h"
29 
30 #define NINAFWVER \
31  "1.6.0"
33 #define SPIWIFI SPI
35 extern Wippersnapper WS;
36 /****************************************************************************/
40 /****************************************************************************/
42 
43 public:
44  /**************************************************************************/
48  /**************************************************************************/
50  _ssPin = 10;
51  _ackPin = 7;
52  _rstPin = 5;
53  _gpio0Pin = -1;
54  _wifi = &SPIWIFI;
55  _ssid = 0;
56  _pass = 0;
57  _mqtt_client = new WiFiSSLClient;
58 
59  // setup ESP32 co-processor pins during init.
60  WiFi.setPins(_ssPin, _ackPin, _rstPin, _gpio0Pin, _wifi);
61  }
62 
63  /**************************************************************************/
67  /**************************************************************************/
69  if (_mqtt)
70  delete _mqtt;
71  }
72 
73  /**********************************************************/
81  /**********************************************************/
82  void set_ssid_pass(const char *ssid, const char *ssidPassword) {
83  _ssid = ssid;
84  _pass = ssidPassword;
85  }
86 
87  /**********************************************************/
92  /**********************************************************/
93  void set_ssid_pass() {
94  _ssid = WS._config.network.ssid;
95  _pass = WS._config.network.pass;
96  }
97 
98  /***********************************************************/
103  /***********************************************************/
105  // Disconnect WiFi from an AP if it was previously connected
106  WiFi.disconnect();
107  delay(100);
108 
109  // Perform a network scan
110  int n = WiFi.scanNetworks();
111  if (n == 0) {
112  WS_DEBUG_PRINTLN("ERROR: No WiFi networks found!");
113  return false;
114  }
115 
116  // Was the network within secrets.json found?
117  for (int i = 0; i < n; ++i) {
118  if (strcmp(_ssid, WiFi.SSID(i)) == 0)
119  return true;
120  }
121 
122  // User-set network not found, print scan results to serial console
123  WS_DEBUG_PRINTLN("ERROR: Your requested WiFi network was not found!");
124  WS_DEBUG_PRINTLN("WipperSnapper found these WiFi networks: ");
125  for (int i = 0; i < n; ++i) {
126  WS_DEBUG_PRINT(WiFi.SSID(i));
127  WS_DEBUG_PRINT(" ");
128  WS_DEBUG_PRINT(WiFi.RSSI(i));
129  WS_DEBUG_PRINTLN("dB");
130  }
131 
132  return false;
133  }
134 
135  /********************************************************/
141  /********************************************************/
142  void set_wifi(SPIClass *wifi) {
143  _wifi = wifi;
144  _mqtt_client = new WiFiSSLClient;
145  }
146 
147  /********************************************************/
159  /********************************************************/
160  void set_airlift_pins(int ssPin, int ackPin, int rstPin, int gpio0Pin) {
161  _ssPin = ssPin;
162  _ackPin = ackPin;
163  _rstPin = rstPin;
164  _gpio0Pin = gpio0Pin;
165  }
166 
167  /********************************************************/
174  /********************************************************/
175  bool firmwareCheck() {
176  _fv = WiFi.firmwareVersion();
177  if (_fv < NINAFWVER)
178  return false;
179  return true;
180  }
181 
182  /********************************************************/
187  /********************************************************/
188  void getMacAddr() {
189  uint8_t mac[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
190  WiFi.macAddress(mac);
191  memcpy(WS._macAddr, mac, sizeof(mac));
192  }
193 
194  /********************************************************/
200  /********************************************************/
201  void setupMQTTClient(const char *clientID) {
202  WS._mqtt = new Adafruit_MQTT_Client(
203  _mqtt_client, WS._config.aio_url, WS._config.io_port, clientID,
204  WS._config.aio_user, WS._config.aio_key);
205  }
206 
207  /********************************************************/
212  /********************************************************/
214  switch (WiFi.status()) {
215  case WL_CONNECTED:
216  return WS_NET_CONNECTED;
217  case WL_CONNECT_FAILED:
218  return WS_NET_CONNECT_FAILED;
219  case WL_IDLE_STATUS:
220  return WS_IDLE;
221  default:
222  return WS_NET_DISCONNECTED;
223  }
224  }
225 
226  /*******************************************************************/
231  /*******************************************************************/
232  const char *connectionType() { return "AIRLIFT"; }
233 
234 protected:
235  const char *_ssid;
236  const char *_pass;
237  String _fv;
238  int _ssPin = -1;
239  int _ackPin = -1;
240  int _rstPin = -1;
241  int _gpio0Pin = -1;
242  WiFiSSLClient *_mqtt_client;
243  SPIClass *_wifi;
245  /**************************************************************************/
249  /**************************************************************************/
250  void _connect() {
251  if (strlen(_ssid) == 0) {
252  _status = WS_SSID_INVALID;
253  } else {
254 
255  // validate co-processor is physically connected connection
256  if (WiFi.status() == WL_NO_MODULE) {
257  WS_DEBUG_PRINT("No ESP32 module detected!");
258  return;
259  }
260 
261  // validate co-processor's firmware version
262  if (!firmwareCheck())
263  WS_DEBUG_PRINTLN("Please upgrade the firmware on the ESP module to the "
264  "latest version.");
265 
266  // disconnect from possible previous connection
267  _disconnect();
268 
269  WiFi.begin(_ssid, _pass);
270  _status = WS_NET_DISCONNECTED;
271  }
272  }
273 
274  /**************************************************************************/
278  /**************************************************************************/
279  void _disconnect() {
280  WiFi.disconnect();
281  delay(500);
282  }
283 };
284 
285 #endif // WIPPERSNAPPER_AIRLIFT_H
#define WS_DEBUG_PRINT(...)
Prints debug output.
Definition: Wippersnapper.h:49
+
int _rstPin
Definition: Wippersnapper_AIRLIFT.h:240
+
void _disconnect()
Disconnects from the wireless network.
Definition: Wippersnapper_AIRLIFT.h:279
+
void setupMQTTClient(const char *clientID)
Initializes the MQTT client.
Definition: Wippersnapper_AIRLIFT.h:201
+
int _ackPin
Definition: Wippersnapper_AIRLIFT.h:239
+
void set_airlift_pins(int ssPin, int ackPin, int rstPin, int gpio0Pin)
Configures ESP32 "AirLift" pins.
Definition: Wippersnapper_AIRLIFT.h:160
Class for using the AirLift Co-Processor network iface.
Definition: Wippersnapper_AIRLIFT.h:41
-
const char * connectionType()
Returns the type of network connection used by Wippersnapper.
Definition: Wippersnapper_AIRLIFT.h:198
+
const char * connectionType()
Returns the type of network connection used by Wippersnapper.
Definition: Wippersnapper_AIRLIFT.h:232
#define SPIWIFI
Definition: Wippersnapper_AIRLIFT.h:33
-
void set_wifi(SPIClass *wifi)
Sets the WiFi client.
Definition: Wippersnapper_AIRLIFT.h:105
-
const char * _pass
Definition: Wippersnapper_AIRLIFT.h:202
-
int _gpio0Pin
Definition: Wippersnapper_AIRLIFT.h:208
-
const char * _username
Definition: Wippersnapper.h:289
+
void set_wifi(SPIClass *wifi)
Sets the WiFi client.
Definition: Wippersnapper_AIRLIFT.h:142
+
const char * _pass
Definition: Wippersnapper_AIRLIFT.h:236
+
int _gpio0Pin
Definition: Wippersnapper_AIRLIFT.h:241
Wippersnapper_AIRLIFT()
Initializes the Adafruit IO class for AirLift devices.
Definition: Wippersnapper_AIRLIFT.h:49
-
uint16_t _mqtt_port
Definition: Wippersnapper.h:286
-
const char * _ssid
Definition: Wippersnapper_AIRLIFT.h:201
-
void _connect()
Establishes a connection with the wireless network.
Definition: Wippersnapper_AIRLIFT.h:217
+
secretsConfig _config
Definition: Wippersnapper.h:321
+
const char * _ssid
Definition: Wippersnapper_AIRLIFT.h:235
+
void _connect()
Establishes a connection with the wireless network.
Definition: Wippersnapper_AIRLIFT.h:250
void set_ssid_pass()
Sets the WiFi client&#39;s ssid and password from the secrets.json provisioning file. ...
Definition: Wippersnapper_AIRLIFT.h:93
-
ws_status_t
Definition: Wippersnapper.h:99
-
Class that provides storage and functions for the Adafruit IO Wippersnapper interface.
Definition: Wippersnapper.h:176
-
int _ssPin
Definition: Wippersnapper_AIRLIFT.h:205
-
const char * _mqttBrokerURL
Definition: Wippersnapper.h:285
+
ws_status_t
Definition: Wippersnapper.h:113
+
Class that provides storage and functions for the Adafruit IO Wippersnapper interface.
Definition: Wippersnapper.h:200
+
int _ssPin
Definition: Wippersnapper_AIRLIFT.h:238
#define NINAFWVER
Definition: Wippersnapper_AIRLIFT.h:30
-
String _fv
Definition: Wippersnapper_AIRLIFT.h:204
+
String _fv
Definition: Wippersnapper_AIRLIFT.h:237
~Wippersnapper_AIRLIFT()
Destructor for the Adafruit IO AirLift class.
Definition: Wippersnapper_AIRLIFT.h:68
Wippersnapper WS
Definition: Wippersnapper.cpp:36
-
SPIClass * _wifi
Definition: Wippersnapper_AIRLIFT.h:210
+
SPIClass * _wifi
Definition: Wippersnapper_AIRLIFT.h:243
void set_ssid_pass(const char *ssid, const char *ssidPassword)
Sets the WiFi client&#39;s ssid and password.
Definition: Wippersnapper_AIRLIFT.h:82
-
const char * _network_ssid
Definition: Wippersnapper.h:293
-
#define WS_DEBUG_PRINTLN(...)
Prints line from debug output.
Definition: Wippersnapper.h:85
-
const char * _key
Definition: Wippersnapper.h:290
-
ws_status_t networkStatus()
Returns the network status of an ESP32 module.
Definition: Wippersnapper_AIRLIFT.h:179
-
ws_status_t _status
Definition: Wippersnapper.h:324
-
uint8_t _macAddr[6]
Definition: Wippersnapper.h:280
-
Adafruit_MQTT * _mqtt
Definition: Wippersnapper.h:283
-
bool firmwareCheck()
Checks the version of an ESP32 module running nina-fw.
Definition: Wippersnapper_AIRLIFT.h:138
-
void getMacAddr()
Gets the ESP32&#39;s unique client identifier.
Definition: Wippersnapper_AIRLIFT.h:151
-
const char * _mqttBrokerURL
Definition: Wippersnapper_AIRLIFT.h:203
-
WiFiSSLClient * _mqtt_client
Definition: Wippersnapper_AIRLIFT.h:209
+
#define WS_DEBUG_PRINTLN(...)
Prints line from debug output.
Definition: Wippersnapper.h:52
+
ws_status_t networkStatus()
Returns the network status of an ESP32 module.
Definition: Wippersnapper_AIRLIFT.h:213
+
bool check_valid_ssid()
Performs a scan of local WiFi networks.
Definition: Wippersnapper_AIRLIFT.h:104
+
ws_status_t _status
Definition: Wippersnapper.h:389
+
uint8_t _macAddr[6]
Definition: Wippersnapper.h:316
+
Adafruit_MQTT * _mqtt
Definition: Wippersnapper.h:319
+
bool firmwareCheck()
Checks the version of an ESP32 module running nina-fw.
Definition: Wippersnapper_AIRLIFT.h:175
+
void getMacAddr()
Gets the ESP32&#39;s unique client identifier.
Definition: Wippersnapper_AIRLIFT.h:188
+
WiFiSSLClient * _mqtt_client
Definition: Wippersnapper_AIRLIFT.h:242

Detailed Description

This file provides an API for interacting with a board's analog IO pins.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

-

Copyright (c) Brent Rubell 2020-2021 for Adafruit Industries.

+

Copyright (c) Brent Rubell 2020-2023 for Adafruit Industries.

BSD license, all text here must be included in any redistribution.

diff --git a/html/_wippersnapper___analog_i_o_8h.html b/html/_wippersnapper___analog_i_o_8h.html index e66907243..99bf94caa 100644 --- a/html/_wippersnapper___analog_i_o_8h.html +++ b/html/_wippersnapper___analog_i_o_8h.html @@ -64,6 +64,7 @@
Wippersnapper_AnalogIO.h File Reference
@@ -81,6 +82,13 @@
 Class that provides an interface for reading and controlling analog pins. Stores information about analog input pins. More...
 
+ + + + +

+Macros

+#define DEFAULT_HYSTERISIS   0.02
 Default DEFAULT_HYSTERISIS of 2%.
 
@@ -89,7 +97,7 @@

Detailed Description

This file provides digital GPIO control and access.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

-

Copyright (c) Brent Rubell 2020-2021 for Adafruit Industries.

+

Copyright (c) Brent Rubell 2020-2023 for Adafruit Industries.

BSD license, all text here must be included in any redistribution.

Variable Documentation

diff --git a/html/_wippersnapper___analog_i_o_8h_source.html b/html/_wippersnapper___analog_i_o_8h_source.html index a6078c5d7..b8a3fc362 100644 --- a/html/_wippersnapper___analog_i_o_8h_source.html +++ b/html/_wippersnapper___analog_i_o_8h_source.html @@ -66,17 +66,17 @@
Wippersnapper_AnalogIO.h
-Go to the documentation of this file.
1 
16 #ifndef WIPPERSNAPPER_ANALOGIO_H
17 #define WIPPERSNAPPER_ANALOGIO_H
18 
19 #include "Wippersnapper.h"
20 
23  int pinName;
24  wippersnapper_pin_v1_ConfigurePinRequest_AnalogReadMode
26  long period;
27  long prvPeriod;
28  float prvPinVal;
29 };
30 
31 // forward decl.
32 class Wippersnapper;
33 
34 /**************************************************************************/
39 /**************************************************************************/
41 public:
42  Wippersnapper_AnalogIO(int32_t totalAnalogInputPins, float aRef);
44 
45  void setAref(float refVoltage);
46  float getAref();
47 
48  void initAnalogOutputPin(int pin);
49  void initAnalogInputPin(
50  int pin, float period,
51  wippersnapper_pin_v1_ConfigurePinRequest_Pull pullMode,
52  wippersnapper_pin_v1_ConfigurePinRequest_AnalogReadMode analogReadMode);
53  void
54  deinitAnalogPin(wippersnapper_pin_v1_ConfigurePinRequest_Direction direction,
55  int pin);
56  void deinitAnalogInputPinObj(int pin);
57 
58  uint16_t readAnalogPinRaw(int pin);
59  float getAnalogPinVoltage(uint16_t rawValue);
60 
61  void setADCResolution(int resolution);
62  int getADCresolution();
63  int getNativeResolution();
64 
65  void processAnalogInputs();
66 
67  bool
68  encodePinEvent(wippersnapper_signal_v1_CreateSignalRequest *outgoingSignalMsg,
69  uint8_t pinName, float pinVal);
70  bool
71  encodePinEvent(wippersnapper_signal_v1_CreateSignalRequest *outgoingSignalMsg,
72  uint8_t pinName, uint16_t pinVal);
73 
75 private:
76  float _aRef;
77  int _adcResolution;
78  int _nativeResolution;
79  bool scaleAnalogRead = false;
81  int32_t _totalAnalogInputPins;
83  float _hysterisis;
84  uint16_t _pinValThreshLow;
85  uint16_t _pinValThreshHi;
87  uint16_t _pinValue;
88  float _pinVoltage;
90  wippersnapper_signal_v1_CreateSignalRequest
91  _outgoingSignalMsg;
92 };
93 extern Wippersnapper WS;
95 #endif // WIPPERSNAPPER_DIGITALGPIO_H
Class that provides an interface for reading and controlling analog pins. Stores information about an...
Definition: Wippersnapper_AnalogIO.h:40
-
Class that provides storage and functions for the Adafruit IO Wippersnapper interface.
Definition: Wippersnapper.h:176
+Go to the documentation of this file.
1 
16 #ifndef WIPPERSNAPPER_ANALOGIO_H
17 #define WIPPERSNAPPER_ANALOGIO_H
18 
19 #include "Wippersnapper.h"
20 
21 #define DEFAULT_HYSTERISIS 0.02
22 
23 
25  int pinName;
26  bool enabled;
27  wippersnapper_pin_v1_ConfigurePinRequest_AnalogReadMode
29  long period;
30  long prvPeriod;
31  float prvPinVal;
32 };
33 
34 // forward decl.
35 class Wippersnapper;
36 
37 /**************************************************************************/
42 /**************************************************************************/
44 public:
45  Wippersnapper_AnalogIO(int32_t totalAnalogInputPins, float aRef);
47 
48  void setAref(float refVoltage);
49  float getAref();
50 
51  void initAnalogInputPin(
52  int pin, float period,
53  wippersnapper_pin_v1_ConfigurePinRequest_Pull pullMode,
54  wippersnapper_pin_v1_ConfigurePinRequest_AnalogReadMode analogReadMode);
55  void
56  deinitAnalogPin(wippersnapper_pin_v1_ConfigurePinRequest_Direction direction,
57  int pin);
58  void disableAnalogInPin(int pin);
59 
60  uint16_t getPinValue(int pin);
61  float getPinValueVolts(int pin);
62 
63  void setADCResolution(int resolution);
64  int getADCresolution();
65  int getNativeResolution();
66  bool timerExpired(long currentTime, analogInputPin pin);
67 
68  void update();
69  bool encodePinEvent(
70  uint8_t pinName,
71  wippersnapper_pin_v1_ConfigurePinRequest_AnalogReadMode readMode,
72  uint16_t pinValRaw = 0, float pinValVolts = 0.0);
73 
74 private:
75  float _aRef;
76  int _adcResolution;
77  int _nativeResolution;
78  bool scaleAnalogRead = false;
80  int32_t _totalAnalogInputPins;
81  analogInputPin *_analog_input_pins;
82 };
83 extern Wippersnapper WS;
85 #endif // WIPPERSNAPPER_DIGITALGPIO_H
Class that provides an interface for reading and controlling analog pins. Stores information about an...
Definition: Wippersnapper_AnalogIO.h:43
+
Class that provides storage and functions for the Adafruit IO Wippersnapper interface.
Definition: Wippersnapper.h:200
-
int pinName
Pin name.
Definition: Wippersnapper_AnalogIO.h:23
-
analogInputPin * _analog_input_pins
Definition: Wippersnapper_AnalogIO.h:74
-
wippersnapper_pin_v1_ConfigurePinRequest_AnalogReadMode readMode
Which type of read to perform.
Definition: Wippersnapper_AnalogIO.h:25
+
int pinName
Pin name.
Definition: Wippersnapper_AnalogIO.h:25
+
bool enabled
Pin is enabled for sampling.
Definition: Wippersnapper_AnalogIO.h:26
+
wippersnapper_pin_v1_ConfigurePinRequest_AnalogReadMode readMode
Which type of analog read to perform.
Definition: Wippersnapper_AnalogIO.h:28
Wippersnapper WS
Definition: Wippersnapper.cpp:36
-
Definition: Wippersnapper_AnalogIO.h:22
-
long period
Pin timer interval, in millis, -1 if disabled.
Definition: Wippersnapper_AnalogIO.h:26
-
long prvPeriod
When Pin&#39;s timer was previously serviced, in millis.
Definition: Wippersnapper_AnalogIO.h:27
-
float prvPinVal
Previous pin value.
Definition: Wippersnapper_AnalogIO.h:28
+
Definition: Wippersnapper_AnalogIO.h:24
+
long period
Pin timer interval, in millis, -1 if disabled.
Definition: Wippersnapper_AnalogIO.h:29
+
long prvPeriod
When Pin&#39;s timer was previously serviced, in millis.
Definition: Wippersnapper_AnalogIO.h:30
+
float prvPinVal
Previous pin value.
Definition: Wippersnapper_AnalogIO.h:31
+
Wippersnapper_Boards.h File Reference

Variables

Wippersnapper WS
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Macros

+#define BOARD_ID   "funhouse"
 Board ID.
 
+#define USE_TINYUSB
 Enable TinyUSB.
 
+#define USE_STATUS_DOTSTAR
 Enable DotStar.
 
+#define USE_DISPLAY
 Enable Display.
 
+#define STATUS_DOTSTAR_PIN_DATA   PIN_DOTSTAR_DATA
 DotStar Data Pin.
 
+#define STATUS_DOTSTAR_PIN_CLK   PIN_DOTSTAR_CLOCK
 DotStar Clock Pin.
 
+#define STATUS_DOTSTAR_NUM   5
 Number of DotStar LEDs.
 
+#define STATUS_DOTSTAR_COLOR_ORDER   DOTSTAR_GBR
 DotStar Color Order.
 
+#define USE_PSRAM
 Board has PSRAM, use it for dynamic memory allocation.
 

Detailed Description

This file determines hardware/board type at compile-time.

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

-

Copyright (c) Brent Rubell 2020-2021 for Adafruit Industries.

+

Copyright (c) Brent Rubell 2020-2022 for Adafruit Industries.

BSD license, all text here must be included in any redistribution.

diff --git a/html/_wippersnapper___boards_8h_source.html b/html/_wippersnapper___boards_8h_source.html index ea8e72061..77fb04519 100644 --- a/html/_wippersnapper___boards_8h_source.html +++ b/html/_wippersnapper___boards_8h_source.html @@ -66,7 +66,7 @@
Wippersnapper_Boards.h
-Go to the documentation of this file.
1 
16 #ifndef ADAFRUIT_WIPPERSNAPPER_BOARDS_H
17 #define ADAFRUIT_WIPPERSNAPPER_BOARDS_H
18 
19 #if defined(ADAFRUIT_PYPORTAL)
20 #define USB_VID 0x239A
21 #define USB_PID 0x8036
22 #define BOARD_ID "adafruit-pyportal-m4"
23 #define USE_TINYUSB
24 #define USE_STATUS_NEOPIXEL
25 #define STATUS_NEOPIXEL_PIN 2
26 #define STATUS_NEOPIXEL_NUM 1
27 #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
28 #define USB_VID 0x239A
29 #define USB_PID 0x8038
30 #define BOARD_ID "adafruit-metro-m4-airliftlite"
31 #define USE_TINYUSB
32 #define USE_STATUS_NEOPIXEL
33 #define STATUS_NEOPIXEL_PIN 40
34 #define STATUS_NEOPIXEL_NUM 1
35 #elif defined(ARDUINO_FUNHOUSE_ESP32S2)
36 #define BOARD_ID "adafruit-funhouse-esp32s2"
37 #define USE_TINYUSB
38 #define USE_STATUS_DOTSTAR
39 #define STATUS_DOTSTAR_PIN_DATA PIN_DOTSTAR_DATA
40 #define STATUS_DOTSTAR_PIN_CLK PIN_DOTSTAR_CLOCK
41 #define STATUS_DOTSTAR_NUM 5
42 #elif defined(ARDUINO_METRO_ESP32S2)
43 #define BOARD_ID "adafruit-metro-esp32s2"
44 #define USE_TINYUSB
45 #define USE_STATUS_NEOPIXEL
46 #define STATUS_NEOPIXEL_PIN 45
47 #define STATUS_NEOPIXEL_NUM 1
48 #elif defined(ARDUINO_MAGTAG29_ESP32S2)
49 #define BOARD_ID "adafruit-magtag-esp32s2"
50 #define USE_TINYUSB
51 #define USE_STATUS_NEOPIXEL
52 #define NEEDS_STATUS_NEOPIXEL_POWER
53 #define STATUS_NEOPIXEL_PIN 1
54 #define STATUS_NEOPIXEL_NUM 4
55 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
56 #define BOARD_ID "adafruit-feather-esp32s2"
57 #define USE_TINYUSB
58 #define USE_STATUS_NEOPIXEL
59 #define NEEDS_STATUS_NEOPIXEL_POWER
60 #define STATUS_NEOPIXEL_PIN 33
61 #define STATUS_NEOPIXEL_NUM 1
62 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2_TFT)
63 #define BOARD_ID "adafruit-feather-esp32s2-tft"
64 #define USE_TINYUSB
65 #define USE_STATUS_NEOPIXEL
66 #define NEEDS_STATUS_NEOPIXEL_POWER
67 #define STATUS_NEOPIXEL_PIN 33
68 #define STATUS_NEOPIXEL_NUM 1
69 #define PIN_I2C_POWER_INVERTED 7
70 #elif defined(ARDUINO_ADAFRUIT_QTPY_ESP32S2)
71 #define BOARD_ID "adafruit-qtpy-esp32s2"
72 #define USE_TINYUSB
73 #define USE_STATUS_NEOPIXEL
74 #define NEEDS_STATUS_NEOPIXEL_POWER
75 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
76 #define STATUS_NEOPIXEL_NUM 1
77 #elif defined(ARDUINO_ESP8266_ADAFRUIT_HUZZAH)
78 #define USB_VID 0xEA60
79 #define USB_PID 0x10C4
80 #define BOARD_ID "feather-esp8266"
81 #define USE_STATUS_LED
82 #define STATUS_LED_PIN 13
83 #define USE_LITTLEFS
84 #elif defined(ARDUINO_FEATHER_ESP32)
85 #define BOARD_ID "feather-esp32"
86 #define USE_STATUS_LED
87 #define STATUS_LED_PIN 13
88 #define USE_LITTLEFS
89 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
90 #define BOARD_ID "feather-esp32-v2-daily"
91 #define USE_STATUS_NEOPIXEL
92 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
93 #define STATUS_NEOPIXEL_NUM 1
94 #define USE_LITTLEFS
95 #elif defined(ARDUINO_SAMD_NANO_33_IOT)
96 #define BOARD_ID "nano-33-iot"
97 #define USE_STATUS_LED
98 #define STATUS_LED_PIN 13
99 #elif defined(ARDUINO_SAMD_MKRWIFI1010)
100 #define BOARD_ID "mkr-wifi-1010"
101 #define USE_STATUS_LED
102 #define STATUS_LED_PIN 6
103 #else
104 #warning "Board type not identified within Wippersnapper_Boards.h!"
105 #endif
106 
107 #endif // ADAFRUIT_WIPPERSNAPPER_BOARDS_H
+Go to the documentation of this file.
1 
16 #ifndef ADAFRUIT_WIPPERSNAPPER_BOARDS_H
17 #define ADAFRUIT_WIPPERSNAPPER_BOARDS_H
18 
19 #if defined(ADAFRUIT_PYPORTAL)
20 #define BOARD_ID "pyportal-tinyusb"
21 #define USE_TINYUSB
22 #define USE_STATUS_NEOPIXEL
23 #define STATUS_NEOPIXEL_PIN 2
24 #define STATUS_NEOPIXEL_NUM 1
25 #elif defined(ADAFRUIT_PYPORTAL_M4_TITANO)
26 #define BOARD_ID "pyportal-titano-tinyusb"
27 #define USE_TINYUSB
28 #define USE_STATUS_NEOPIXEL
29 #define STATUS_NEOPIXEL_PIN 2
30 #define STATUS_NEOPIXEL_NUM 1
31 #elif defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
32 #define BOARD_ID "metro-m4-airliftlite-tinyusb"
33 #define USE_TINYUSB
34 #define USE_STATUS_NEOPIXEL
35 #define STATUS_NEOPIXEL_PIN 40
36 #define STATUS_NEOPIXEL_NUM 1
37 #elif defined(ARDUINO_FUNHOUSE_ESP32S2)
38 #define BOARD_ID "funhouse"
39 #define USE_TINYUSB
40 #define USE_STATUS_DOTSTAR
41 #define USE_DISPLAY
42 #define STATUS_DOTSTAR_PIN_DATA PIN_DOTSTAR_DATA
43 #define STATUS_DOTSTAR_PIN_CLK PIN_DOTSTAR_CLOCK
44 #define STATUS_DOTSTAR_NUM 5
45 #define STATUS_DOTSTAR_COLOR_ORDER DOTSTAR_GBR
46 #define USE_PSRAM
47 #elif defined(ARDUINO_METRO_ESP32S2)
48 #define BOARD_ID "metroesp32s2"
49 #define USE_TINYUSB
50 #define USE_STATUS_NEOPIXEL
51 #define STATUS_NEOPIXEL_PIN 45
52 #define STATUS_NEOPIXEL_NUM 1
53 #define USE_PSRAM
54 #elif defined(ARDUINO_MAGTAG29_ESP32S2)
55 #define BOARD_ID "magtag"
56 #define USE_TINYUSB
57 #define USE_STATUS_NEOPIXEL
58 #define STATUS_NEOPIXEL_PIN 1
59 #define STATUS_NEOPIXEL_NUM 4
60 #define USE_PSRAM
61 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2)
62 #define BOARD_ID "feather-esp32s2"
63 #define USE_TINYUSB
64 #define USE_STATUS_NEOPIXEL
65 #define STATUS_NEOPIXEL_PIN 33
66 #define STATUS_NEOPIXEL_NUM 1
67 #define USE_PSRAM
68 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2_TFT)
69 #define BOARD_ID "feather-esp32s2-tft"
70 #define USE_TINYUSB
71 #define USE_STATUS_NEOPIXEL
72 #define STATUS_NEOPIXEL_PIN 33
73 #define STATUS_NEOPIXEL_NUM 1
74 #define PIN_I2C_POWER_INVERTED 7
75 #define USE_PSRAM
76 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2_REVTFT)
77 #define BOARD_ID "feather-esp32s2-reverse-tft"
78 #define USE_TINYUSB
79 #define USE_STATUS_NEOPIXEL
80 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
81 #define STATUS_NEOPIXEL_NUM NEOPIXEL_NUM
82 #define USE_PSRAM
83 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_NOPSRAM)
84 #define BOARD_ID "feather-esp32s3"
85 #define USE_TINYUSB
86 #define USE_STATUS_NEOPIXEL
87 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
88 #define STATUS_NEOPIXEL_NUM NEOPIXEL_NUM
89 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3)
90 #define BOARD_ID "feather-esp32s3-4mbflash-2mbpsram"
91 #define USE_TINYUSB
92 #define USE_STATUS_NEOPIXEL
93 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
94 #define STATUS_NEOPIXEL_NUM NEOPIXEL_NUM
95 #define USE_PSRAM
96 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_TFT)
97 #define BOARD_ID "feather-esp32s3-tft"
98 #define USE_TINYUSB
99 #define USE_STATUS_NEOPIXEL
100 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
101 #define STATUS_NEOPIXEL_NUM NEOPIXEL_NUM
102 #define USE_PSRAM
103 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_REVTFT)
104 #define BOARD_ID "feather-esp32s3-reverse-tft"
105 #define USE_TINYUSB
106 #define USE_STATUS_NEOPIXEL
107 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
108 #define STATUS_NEOPIXEL_NUM NEOPIXEL_NUM
109 #define USE_PSRAM
110 #elif defined(ARDUINO_ADAFRUIT_QTPY_ESP32S2)
111 #define BOARD_ID "qtpy-esp32s2"
112 #define USE_TINYUSB
113 #define USE_STATUS_NEOPIXEL
114 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
115 #define STATUS_NEOPIXEL_NUM 1
116 #define USE_PSRAM
117 #elif defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_NOPSRAM)
118 #define BOARD_ID "qtpy-esp32s3"
119 #define USE_TINYUSB
120 #define USE_STATUS_NEOPIXEL
121 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
122 #define STATUS_NEOPIXEL_NUM 1
123 #elif defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2)
124 #define BOARD_ID "qtpy-esp32s3-n4r2"
125 #define USE_TINYUSB
126 #define USE_STATUS_NEOPIXEL
127 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
128 #define STATUS_NEOPIXEL_NUM 1
129 #define USE_PSRAM
130 #elif defined(ARDUINO_ADAFRUIT_QTPY_ESP32C3)
131 #define BOARD_ID "qtpy-esp32c3"
132 #define USE_LITTLEFS
133 #define USE_STATUS_NEOPIXEL
134 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
135 #define STATUS_NEOPIXEL_NUM 1
136 #elif defined(ARDUINO_ESP8266_ADAFRUIT_HUZZAH)
137 #define BOARD_ID "feather-esp8266"
138 #define USE_LITTLEFS
139 #define USE_STATUS_LED
140 #define STATUS_LED_PIN 0
141 #elif defined(ARDUINO_ADAFRUIT_ITSYBITSY_ESP32)
142 #define BOARD_ID "itsybitsy-esp32"
143 #define USE_LITTLEFS
144 #define USE_STATUS_NEOPIXEL
145 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
146 #define STATUS_NEOPIXEL_NUM 1
147 #define USE_PSRAM
148 #elif defined(ARDUINO_FEATHER_ESP32)
149 #define BOARD_ID "feather-esp32"
150 #define USE_LITTLEFS
151 #define USE_STATUS_LED
152 #define STATUS_LED_PIN 13
153 #elif defined(ARDUINO_ADAFRUIT_FEATHER_ESP32_V2)
154 #define BOARD_ID "feather-esp32-v2"
155 #define USE_LITTLEFS
156 #define USE_STATUS_NEOPIXEL
157 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
158 #define STATUS_NEOPIXEL_NUM 1
159 #define USE_PSRAM
160 #elif defined(ARDUINO_ADAFRUIT_QTPY_ESP32_PICO)
161 #define BOARD_ID "qtpy-esp32"
162 #define USE_LITTLEFS
163 #define USE_STATUS_NEOPIXEL
164 #define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
165 #define STATUS_NEOPIXEL_NUM 1
166 #define USE_PSRAM
167 #elif defined(ARDUINO_SAMD_NANO_33_IOT)
168 #define BOARD_ID "nano-33-iot"
169 #define USE_STATUS_LED
170 #define STATUS_LED_PIN 13
171 #elif defined(ARDUINO_SAMD_MKRWIFI1010)
172 #define BOARD_ID "mkrwifi1010"
173 #define USE_STATUS_LED
174 #define STATUS_LED_PIN 6
175 #elif defined(ARDUINO_RASPBERRY_PI_PICO_W)
176 #define BOARD_ID "rpi-pico-w"
177 #define USE_TINYUSB
178 #define USE_STATUS_LED
179 #define STATUS_LED_PIN 32
180 #else
181 #warning "Board type not identified within Wippersnapper_Boards.h!"
182 #endif
183 
184 #endif // ADAFRUIT_WIPPERSNAPPER_BOARDS_H