From 17be7191f477c2dc6b471b3f4b9667928d68eec7 Mon Sep 17 00:00:00 2001 From: grstat Date: Sat, 10 Feb 2024 22:31:03 -0800 Subject: [PATCH] bug fixes --- CMakeLists.txt | 2 +- dist/hdc1080_0.2.0.tgz | Bin 0 -> 12452 bytes dist/hdc1080_0.2.0/.gitignore | 19 ++ dist/hdc1080_0.2.0/CHANGELOG.md | 7 + dist/hdc1080_0.2.0/CMakeLists.txt | 6 + dist/hdc1080_0.2.0/LICENSE | 201 +++++++++++++++++ dist/hdc1080_0.2.0/README.md | 10 + .../hdc1080_example_main/CMakeLists.txt | 6 + .../examples/hdc1080_example_main/README.md | 51 +++++ .../hdc1080_example_main/main/CMakeLists.txt | 2 + .../main/Kconfig.projbuild | 42 ++++ .../main/hdc1080_example_main.c | 158 +++++++++++++ .../main/idf_component.yml | 10 + dist/hdc1080_0.2.0/hdc1080.c | 209 ++++++++++++++++++ dist/hdc1080_0.2.0/idf_component.yml | 7 + dist/hdc1080_0.2.0/include/hdc1080.h | 102 +++++++++ examples/hdc1080_example_main/README.md | 14 ++ .../main/idf_component.yml | 4 +- idf_component.yml | 2 +- 19 files changed, 848 insertions(+), 4 deletions(-) create mode 100644 dist/hdc1080_0.2.0.tgz create mode 100644 dist/hdc1080_0.2.0/.gitignore create mode 100644 dist/hdc1080_0.2.0/CHANGELOG.md create mode 100644 dist/hdc1080_0.2.0/CMakeLists.txt create mode 100644 dist/hdc1080_0.2.0/LICENSE create mode 100644 dist/hdc1080_0.2.0/README.md create mode 100644 dist/hdc1080_0.2.0/examples/hdc1080_example_main/CMakeLists.txt create mode 100644 dist/hdc1080_0.2.0/examples/hdc1080_example_main/README.md create mode 100644 dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/CMakeLists.txt create mode 100644 dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/Kconfig.projbuild create mode 100644 dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/hdc1080_example_main.c create mode 100644 dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/idf_component.yml create mode 100644 dist/hdc1080_0.2.0/hdc1080.c create mode 100644 dist/hdc1080_0.2.0/idf_component.yml create mode 100644 dist/hdc1080_0.2.0/include/hdc1080.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 048b780..51af0ab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -set(depends esp_timer esp_system i2c esp_log esp_event esp_err math) +set(depends esp_timer esp_system esp_event driver) idf_component_register( SRCS "hdc1080.c" diff --git a/dist/hdc1080_0.2.0.tgz b/dist/hdc1080_0.2.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..25c2d3d70d075ee8fe11d4a273729f51a6a63750 GIT binary patch literal 12452 zcmbtaQ+Fi{tgUUkJvFAbZDVTNw(U;MsiwAV+f%ze<H!FF_T6xGy9yT?JhDZb_wBf7kWT-z*f{W2pV1-KE_N?Dcp0J?7%i)EA!GclQvH6rgAe~Ms{d|H(#wal#*R(X-m;ZrrS@*vt zujS!&*Wmq1io5#3zLm2vs8w)GcW1S=r&g&OCk*^>tyHV?AKeXlf}5w0uK~*e{hRiu zm$paeMf|Yn)UoBNI<_p(rtb|s=j>tD;$-$0HgHJvbi(hd-&9~cDEvpAYBf7 zk6SL`M5`u$7Bv5j#r{?>83X{C>~h+*+BSY)o>l19ncsutvp`x(NBTa2#zBT}d)6Fn zb0E3q*!zApW^TJT1TzJG^4@Ac(*s`InsKR>tA zf9I)RMZnpBPkxVEBhsL~Jz!yqB=_HEE|vwwkT-wRsn7;mPiSH2!6*NmDA$EaQEBkqR5Q4QA{}3}(r-xl^wCMBEAN#b{>&z!!qV*Fss2ckmY@^~l$Mfc6>M(`< zL!?1CusdRpWBf7S6>4y|M}p z)FWLFB8A^z?o?V|XoyJA72)#gBORPbqV$?MI8XDN1l@zIu@SiZhUoPMKDk&xcH8(_;?Fnz2$z9jmQCk5|LyG)l=~f2 zx>|u-T}nT3Wd8+{_wLHe*dWX)XieC8?_a7|u@wWY8UM>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/dist/hdc1080_0.2.0/.gitignore new file mode 100644 index 0000000..142d4a2 --- /dev/null +++ b/dist/hdc1080_0.2.0/.gitignore @@ -0,0 +1,19 @@ +#.gitignore +.vscode +build +sdkconfig +*.info +*.ci +*.old +**/*.info +**/*.log +**/*.log* +**/logs +**/*.lock +**/*.old +**/.idea +**/*.suo +**/*.ntvs* +**/*.njsproj +**/*.sln +**/*.sw? \ No newline at end of file diff --git a/dist/hdc1080_0.2.0/CHANGELOG.md b/dist/hdc1080_0.2.0/CHANGELOG.md new file mode 100644 index 0000000..5b410be --- /dev/null +++ b/dist/hdc1080_0.2.0/CHANGELOG.md @@ -0,0 +1,7 @@ +# Changelog + +## [0.2.0](https://github.com/grstat/esp32-hdc1080) + +### Notes + +- Transformed inital commits into a managed component library \ No newline at end of file diff --git a/dist/hdc1080_0.2.0/CMakeLists.txt b/dist/hdc1080_0.2.0/CMakeLists.txt new file mode 100644 index 0000000..048b780 --- /dev/null +++ b/dist/hdc1080_0.2.0/CMakeLists.txt @@ -0,0 +1,6 @@ +set(depends esp_timer esp_system i2c esp_log esp_event esp_err math) + +idf_component_register( + SRCS "hdc1080.c" + INCLUDE_DIRS "include" + REQUIRES ${depends}) diff --git a/dist/hdc1080_0.2.0/LICENSE b/dist/hdc1080_0.2.0/LICENSE new file mode 100644 index 0000000..f49a4e1 --- /dev/null +++ b/dist/hdc1080_0.2.0/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/dist/hdc1080_0.2.0/README.md b/dist/hdc1080_0.2.0/README.md new file mode 100644 index 0000000..92293a4 --- /dev/null +++ b/dist/hdc1080_0.2.0/README.md @@ -0,0 +1,10 @@ +# ESP32 HDC1080 COMPONENT DRIVER LIBRARY + +ESP32 HDC1080 component driver library for the esp-idf + +The HDC1080 is a temperature and humidity sensor made by +Texas Instruments. For more information visit: https://www.ti.com/product/HDC1080 + +## Examples + +Here is an example on how to configure and use the driver [Example](https://github.com/grstat/esp32-hdc1080/tree/main/examples) \ No newline at end of file diff --git a/dist/hdc1080_0.2.0/examples/hdc1080_example_main/CMakeLists.txt b/dist/hdc1080_0.2.0/examples/hdc1080_example_main/CMakeLists.txt new file mode 100644 index 0000000..6ffae7b --- /dev/null +++ b/dist/hdc1080_0.2.0/examples/hdc1080_example_main/CMakeLists.txt @@ -0,0 +1,6 @@ +# For more information about build system see +# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html +cmake_minimum_required(VERSION 3.16) + +include($ENV{IDF_PATH}/tools/cmake/project.cmake) +project(esp32-hdc1080-example) \ No newline at end of file diff --git a/dist/hdc1080_0.2.0/examples/hdc1080_example_main/README.md b/dist/hdc1080_0.2.0/examples/hdc1080_example_main/README.md new file mode 100644 index 0000000..342b740 --- /dev/null +++ b/dist/hdc1080_0.2.0/examples/hdc1080_example_main/README.md @@ -0,0 +1,51 @@ +# ESP32 HDC1080 COMPONENT DRIVER LIBRARY EXAMPLE + +The example code should give a good understanding of how to configure and use the hdc1080 component driver. + +It includes how to use the aspects of the driver as well as the available macros for calculating and converting +the data into various formats. Including: +- Celsius -> Fahrenheit +- Temperature & humidity -> Dewpoint +- Temperature -> Air saturation vapor pressure +- Air saturation vapor pressure & humidity -> Air vapor pressure deficit + +## Example workflow + +- I2C is initalized, included is an I2C scan event that will display current devices on the bus for troubleshooting +- If the I2C initalized successfully the following occurs +- hdc1080_settings_t is filled with the I2C configuration and callback procedure +- hdc1080_config_t is filled with the defined register values +- The hdc1080 sensor is configured with the settings and configuration defined +- If the sensor is configured without error and inital sensor read is started; upon completion the hdc1080_settings_t.callback is called +- The callback procedure performs various conversions and prints the current sensor data. +- The current hdc1080 configuration is captured + +## Pinout + +| ESP32 | HDC1080 | +|-------|---------| +| 22 | SCL | +| 21 | SDA | +| 3.3v | VCC | +| GND | GND | + +## Requirements + +- An ESP32 Dev Kit +- An HDC1080 i2c Sensor module. +- esp-idf and tools (Developed and tested on v5.1.1) + +### Project configuration + +* Open the project configuration menu (`idf.py menuconfig`) +* Go to the HDC1080 Example config section +* Set the I2C SCL, SDA, PORT NUMBER & FREQUENCY if they are not the default +* If you do not wish to perform the I2C device scan you can disable the option + +### Build and Flash + +Build the project and flash it to the board, then run monitor tool to view serial output: + +``` +idf.py -p PORT flash monitor +``` diff --git a/dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/CMakeLists.txt b/dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/CMakeLists.txt new file mode 100644 index 0000000..e20f005 --- /dev/null +++ b/dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/CMakeLists.txt @@ -0,0 +1,2 @@ +idf_component_register(SRCS "hdc1080_example_main.c" + INCLUDE_DIRS ".") diff --git a/dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/Kconfig.projbuild b/dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/Kconfig.projbuild new file mode 100644 index 0000000..5047994 --- /dev/null +++ b/dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/Kconfig.projbuild @@ -0,0 +1,42 @@ +menu "HDC1080 Example Config" + + config HDC1080_I2C_SCL + int "HDC1080 I2C SCL" + default 22 + help + The I2C SCL pin number of the HDC1080 + + config HDC1080_I2C_SDA + int "HDC1080 I2C SDA" + default 21 + help + The I2C SDA pin number of the HDC1080 + + config HDC1080_I2C_PORT_NUMBER + int "HDC1080 I2C PORT NUMBER" + default 0 + help + The I2C port number to use + + config HDC1080_I2C_PORT_FREQUENCY + int "HDC1080 I2C PORT FREQUENCY" + default 400000 + help + The I2C port frequency. The default is 400kHz + + config HDC1080_I2C_PULLUPS + int "Enable or disable pullups on the I2C data lines" + default 1 + help + Use 1 to enable pullups, 0 to disable. This value + changes both the SDA and SCL pullup values + + config HDC1080_I2C_SCAN_FOR_DEVICES + bool "Perform I2C device scan after configuration" + default y + help + Enable to run the device scan during I2C initalization. + The device scan allows you to see all device IDs connected + to the I2C bus via console print. + +endmenu diff --git a/dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/hdc1080_example_main.c b/dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/hdc1080_example_main.c new file mode 100644 index 0000000..60c751b --- /dev/null +++ b/dist/hdc1080_0.2.0/examples/hdc1080_example_main/main/hdc1080_example_main.c @@ -0,0 +1,158 @@ +#include +#include +#include +#include +#include +#include +#include "hdc1080.h" + +#define I2C_MASTER_TX_BUF_DISABLE (0) +#define I2C_MASTER_RX_BUF_DISABLE (0) +#define I2C_READ_TIMEOUT_PERIOD ((TickType_t)200 / portTICK_PERIOD_MS) + +static bool i2c_init(void); + +/* THIS IS THE CALLBACK FOR THE SENSOR READINGS, + * THE HDC1080 REQUIRES A SHORT CONVERSION PERIOD + * WHEN THE READINGS ARE REQUESTED. INSTEAD OF BLOCKING + * A TIMER IS STARTED WHEN THE CONVERSION IS FINISHED + * THE VALUES ARE READ AND THEN RETURNED TO THIS CALLBACK + * ON COMPLETE. IF BOTH VALUES ARE 0 THEN AN ERROR MAY HAVE OCCURED */ +void temperature_readings_callback(hdc1080_sensor_readings_t sens_readings){ + /* HERE ARE SOME CONVERSION SAMPLES, THE MACROS ARE LOCATED IN hdc1080.h */ + float temp_in_f = CEL2FAH(sens_readings.temperature); + float dewpoint = DEWPOINT(sens_readings.temperature, sens_readings.humidity); + float sat_vp = SVP(sens_readings.temperature); + float vpd_pasc = VPD(sat_vp, sens_readings.humidity); + ESP_LOGI("SENSOR_DATA", "TEMPERATURE: %.2f°C | %.2f°F", sens_readings.temperature, temp_in_f); + ESP_LOGI("SENSOR_DATA", "HUMIDITY: %.2f%% - DEWPOINT: %.2f°C | %.2f°F", sens_readings.humidity, dewpoint, CEL2FAH(dewpoint)); + ESP_LOGI("SENSOR_DATA", "AIR SATURATION VAPOR PRESSURE: %.2f kPa - AIR VAPOR PRESSURE DEFICIT: %.2f kPa", PAS2KPA(sat_vp), vpd_pasc); +} + +void app_main(void){ + // KEEP EVERYTHING GOING + ESP_ERROR_CHECK_WITHOUT_ABORT(esp_event_loop_create_default()); + // CONFIGURE YOUR I2C BUS + if(i2c_init()){ + // FILL IN YOUR HDC SETTINGS + hdc1080_settings_t hdc_settings = { + .i2c_address = HDC1080_I2C_ADDRESS, + .i2c_port_number = CONFIG_HDC1080_I2C_PORT_NUMBER, + .timeout_length = I2C_READ_TIMEOUT_PERIOD, + .callback = temperature_readings_callback + }; + + // SETUP YOUR HDC REGISTER CONFIGURATION + hdc1080_config_t hdc_config = { + .humidity_measurement_resolution = HDC1080_HUMIDITY_RESOLUTION_14BIT, + .temperature_measurement_resolution = HDC1080_TEMPERATURE_RESOLUTION_14BIT, + .mode_of_acquisition = HDC1080_ACQUISITION_HUMIDITY_AND_TEMPERATURE, + .heater = HDC1080_HEATER_DISABLED + }; + + // SETUP AND CONFIGURE THE SENSOR AND ABSTRACTION + if(hdc1080_configure(&hdc_settings, hdc_config) == ESP_OK){ + ESP_LOGI("MAIN", "HDC1080 CONFIGURATION SUCCESSFUL"); + // DO A REQUEST FOR THE SENSOR READINGS + // THIS WILL CALLBACK TO void temperature_readings_callback(hdc1080_sensor_readings_t sens_readings) + // AS SET IN THE hdc_settings + if(hdc1080_request_readings() == ESP_OK){ + ESP_LOGI("MAIN", "READINGS WERE REQUESTED"); + } + } + + // AS AN EXAMPLE, ANYTIME READINGS HAVE BEEN REQUESTED AND CONVERSION HAS STARTED + // ANYTHING CALLED WILL RETURN IN AN ERROR HDC1080_CONVERTING, A WAIT AND CHECK + // FUNCTION WILL BE REQURED BEFORE THE NEXT COMMAND CAN BE RUN + // THE WAIT PERIOD CAN BE ADJUSTED IN THE hdc1080.h FILE, HDC1080_CONVERSION_WAIT_PERIOD + // THE VALUE IS IN MICROSECONDS. MINIMUM WAIT TIME IS 6.8uS HOWEVER THE DEFAULT IS 1/2 SECOND + // SINCE READS SHOULD ONLY OCCUR > ONCE A SECOND FOR STABILITY + esp_err_t gcfg = hdc1080_get_configuration(&hdc_config); + if(gcfg == HDC1080_CONVERTING){ + ESP_LOGE("MAIN", "REQUEST FAILED, CONVERSION IN PROGRESS"); + } + } +} + +/* ---------------------------------------------------------------------- + * @name bool i2c_init(void) + * ---------------------------------------------------------------------- + * @brief Configure i2c parameters, install i2c driver, + * perform device discovery + * + * @return true on success + */ +static bool i2c_init(void){ + unsigned char devAddr = 0; + unsigned char devCount = 0; + unsigned char devList[128] = {0}; + /* I2C MASTER MODE, PULLUPS ENABLED */ + i2c_config_t i2c_conf = { + .mode = I2C_MODE_MASTER, + .sda_io_num = CONFIG_HDC1080_I2C_SDA, + .sda_pullup_en = CONFIG_HDC1080_I2C_PULLUPS, + .scl_io_num = CONFIG_HDC1080_I2C_SCL, + .scl_pullup_en = CONFIG_HDC1080_I2C_PULLUPS, + .master.clk_speed = CONFIG_HDC1080_I2C_PORT_FREQUENCY + }; + /* CONFIGURE THE PORT */ + esp_err_t err = i2c_param_config(CONFIG_HDC1080_I2C_PORT_NUMBER, &i2c_conf); + if (err != ESP_OK) { + ESP_LOGE("I2C", "ERROR CONFIGURING I2C PORT %d", err); + return false; + } + /* LOAD THE DRIVER */ + err = i2c_driver_install(CONFIG_HDC1080_I2C_PORT_NUMBER, i2c_conf.mode, I2C_MASTER_RX_BUF_DISABLE, I2C_MASTER_TX_BUF_DISABLE, 0); + if (err != ESP_OK) { + if(err == ESP_ERR_INVALID_ARG){ + ESP_LOGE("I2C", "ERROR INSTALLING I2C DRIVER, INVALID ARGUMENT"); + }else if(err == ESP_FAIL){ + ESP_LOGE("I2C", "I2C DRIVER INSTALLATION FAILED!"); + } + return false; + } + +#if CONFIG_HDC1080_I2C_SCAN_FOR_DEVICES + /* DEVICE DISCOVERY */ + for(int ol = 0; ol < 128; ol += 16){ + for(int il =0; il < 16; il++){ + devAddr = ol + il; // CURRENT ADDRESS IS OUTER LOOP + INNER LOOP + i2c_cmd_handle_t cmdlnk = i2c_cmd_link_create(); + i2c_master_start(cmdlnk); + i2c_master_write_byte(cmdlnk, (devAddr << 1) | I2C_MASTER_WRITE, I2C_MASTER_NACK); + i2c_master_stop(cmdlnk); + esp_err_t lnkerr = i2c_master_cmd_begin(CONFIG_HDC1080_I2C_PORT_NUMBER, cmdlnk, I2C_READ_TIMEOUT_PERIOD); + i2c_cmd_link_delete(cmdlnk); + switch(lnkerr){ + case ESP_OK: + if(devCount < 128){ //DON'T OVERFLOW + if(devAddr == 0x00){ break; } //IGNORE ADDRESS 0 + devList[devCount++] = devAddr; //ADD THE DEVICE TO THE LIST AND INCREMENT THE COUNT + } + break; + case ESP_ERR_INVALID_ARG: + ESP_LOGE("i2c_discover", "INVALID PARAMETER WAS PASSED TO i2c_master_cmd_begin"); + break; + case ESP_ERR_NO_MEM: + ESP_LOGE("i2c_discover", "THE CMD HANDLER BUFFER SIZE IS TOO SMALL"); + break; + default: break; //TIMED OUT, MOVE ON + } /** END - switch(lnkerr) */ + } /** END - for(int il =0; il < 16; il++) */ + } /** END - for(int ol = 0; ol < 128; ol += 16) */ + + if(devCount == 0){ + ESP_LOGW("I2C", "NO DEVICES FOUND"); + return false; + } + + /* PRINT DISCOVERED DEVICE ADDRESSES */ + if(devCount > 0){ + for(int x=0; x=5.0" + grstat/hdc1080: + version: '^0.1.0' + override_path: '../../../' \ No newline at end of file diff --git a/dist/hdc1080_0.2.0/hdc1080.c b/dist/hdc1080_0.2.0/hdc1080.c new file mode 100644 index 0000000..e0a67cf --- /dev/null +++ b/dist/hdc1080_0.2.0/hdc1080.c @@ -0,0 +1,209 @@ +/* + * ESP32 HDC1080 COMPONENT DRIVER LIBRARY + * Copyright 2023 Open grStat + * + * SPDX-FileCopyrightText: 2023 Open grStat https://github.com/grstat + * SPDX-FileType: SOURCE + * SPDX-FileContributor: Created by Adrian Borchardt + * SPDX-License-Identifier: Apache-2.0 + * + */ +#include +#include +#include +#include "hdc1080.h" + +static esp_err_t read_hdc100_data(unsigned char i2c_register, unsigned char * read_buff, size_t read_len); +static esp_err_t write_hdc100_data(unsigned char i2c_register, unsigned char * write_buff, size_t write_len); +static esp_err_t check_hdc1080_error(esp_err_t hdc_err); +static void hdc1080_conversion_completed(void* arg); +static hdc1080_settings_t hdc1080_set = {0}; +static esp_timer_handle_t hdc1080_conversion_timer_h; +static bool awaiting_conversion = false; + +/* ------------------------------------------------------------- + * @name void hdc1080_conversion_completed(void* arg) + * ------------------------------------------------------------- + * @brief callback from the conversion timer. Gets the current + * sensor readings and callsback to the original request set + * during configuration + */ +static void hdc1080_conversion_completed(void* arg){ + hdc1080_sensor_readings_t sens_readings = {0}; + unsigned char read_buff[4]; + // READ IN THE DATA + esp_err_t err_ck = check_hdc1080_error(i2c_master_read_from_device(hdc1080_set.i2c_port_number, hdc1080_set.i2c_address, (unsigned char *)read_buff, sizeof(read_buff), hdc1080_set.timeout_length)); + if(err_ck == ESP_OK){ + // IF NO ERROR OCCURED THEN DO THE FLOAT CONVERSION + // OTHERWISE 0 WILL BE RETURNED FOR BOTH VALUES TO SIGNAL AND ISSUE + sens_readings.temperature = ((((float)((read_buff[0] << 8) | read_buff[1])/65536) * 165) - 40); /* pow(2, 16) == 65536 */ + sens_readings.humidity = (((float)((read_buff[2] << 8) | read_buff[3])/65536) * 100); + } + awaiting_conversion = false; // MARK THE FINISHED STATE + hdc1080_set.callback(sens_readings); // RUN THE CONFIGURED CALLBACK +} + +/* ------------------------------------------------------------- + * @name esp_err_t hdc1080_request_readings(void) + * ------------------------------------------------------------- + * @brief begin the read request for sensor data. + * Sets the register to kickoff the conversion and starts a timer. + * When the conversion timer completes it calls back to + * hdc1080_conversion_completed + * @returns ESP_OK on success + */ +esp_err_t hdc1080_request_readings(void){ + if(awaiting_conversion){ return HDC1080_CONVERTING; } + /* HDC1080 -> START CONVERSION -> WAIT FOR CONVERSION -> READ SENSOR DATA */ + ESP_LOGD("HDC1080", "STARTING CONVERSION"); + i2c_cmd_handle_t cmdlnk = i2c_cmd_link_create(); + check_hdc1080_error(i2c_master_start(cmdlnk)); + check_hdc1080_error(i2c_master_write_byte(cmdlnk, (hdc1080_set.i2c_address << 1) | I2C_MASTER_WRITE, true)); + check_hdc1080_error(i2c_master_write_byte(cmdlnk, HDC1080_TEMPERATURE_REG, true)); + check_hdc1080_error(i2c_master_stop(cmdlnk)); + esp_err_t err_ck = check_hdc1080_error(i2c_master_cmd_begin(hdc1080_set.i2c_port_number, cmdlnk, hdc1080_set.timeout_length)); + i2c_cmd_link_delete(cmdlnk); + if(err_ck != ESP_OK){ return err_ck; } + awaiting_conversion = true; + /* START CONVERSION WAIT TIMER */ + err_ck = esp_timer_start_once(hdc1080_conversion_timer_h, HDC1080_CONVERSION_WAIT_PERIOD); + return err_ck; +} + +/* -------------------------------------------------------------------------------------------------- + * @name esp_err_t hdc1080_configure(hdc1080_settings_t * hdc1080_settings, hdc1080_config_t hdc_cfg) + * -------------------------------------------------------------------------------------------------- + * @brief Set HDC1080 config registers + * @param hdc1080_settings -> Pointer to the hdc1080_settings_t struct + * @param hdc_cfg - Device configuration from the hdc1080_config_t struct + * @return ESP_OK on success* + * @note The i2c bus must be setup and configured before + * calling this routine + */ +esp_err_t hdc1080_configure(hdc1080_settings_t * hdc1080_settings, hdc1080_config_t hdc_cfg){ + if(awaiting_conversion){ return HDC1080_CONVERTING; } + unsigned char hdc_buff[2] = {0}; + unsigned short cfg_s = 0; + cfg_s = (hdc_cfg.config_register << 8); + // CAPTURE THE SETTINGS TO THE FILE GLOBAL SCOPE + memmove(&hdc1080_set, hdc1080_settings, sizeof(hdc1080_settings_t)); + // GET MANUFACTURER ID AND ENSURE A MATCH + esp_err_t err_ck = check_hdc1080_error(read_hdc100_data(HDC1080_MANUFACTURER_ID_REG, hdc_buff, 2)); + if(err_ck != ESP_OK){ return err_ck; } + if((unsigned short)((hdc_buff[0] << 8) | hdc_buff[1]) != HDC1080_MANUFACTURER_ID){ + // NOT A TI CHIP + ESP_LOGE("HDC1080", "EXPECTED TI ID 0x%04X BUT GOT 0x%04X", HDC1080_MANUFACTURER_ID, (unsigned short)((hdc_buff[0] << 8) | hdc_buff[1])); + return HDC1080_ERR_ID; + } + // GET THE DEVICE ID AND MAKE SURE IT'S AN HDC1080 + err_ck = check_hdc1080_error(read_hdc100_data(HDC1080_DEVICE_ID_REG, hdc_buff, 2)); + if(err_ck != ESP_OK){ return err_ck; } + if((unsigned short)((hdc_buff[0] << 8) | hdc_buff[1]) != HDC1080_DEVICE_ID){ + // NOT AND HDC1080 + ESP_LOGE("HDC1080", "EXPECTED DEVICE ID 0x%04X BUT GOT 0x%04X", HDC1080_DEVICE_ID, (unsigned short)((hdc_buff[0] << 8) | hdc_buff[1])); + return HDC1080_ERR_ID; + } + // GET THE CURRENT CONFIGURATION AND IF IT DOESN'T MATCH, UPDATE IT + err_ck = check_hdc1080_error(read_hdc100_data(HDC1080_CONFIG_REG, hdc_buff, 2)); + if(err_ck != ESP_OK){ return err_ck; } + ESP_LOGD("HDC1080", "CURRENT CONFIGURATION 0x%04X", (unsigned short)((hdc_buff[0] << 8) | hdc_buff[1])); + if((unsigned short)((hdc_buff[0] << 8) | hdc_buff[1]) != cfg_s){ + ESP_LOGD("HDC1080", "UPDATING CONFIGURATION FROM 0x%04X TO 0x%04X", (unsigned short)((hdc_buff[0] << 8) | hdc_buff[1]), cfg_s); + hdc_buff[0] = hdc_cfg.config_register; + hdc_buff[1] = 0; + err_ck = check_hdc1080_error(write_hdc100_data(HDC1080_CONFIG_REG, hdc_buff, 2)); + if(err_ck != ESP_OK){ return err_ck; } + } + /* HDC1080 REQUIRES A SHORT DELAY TO PERFORM CONVERSION + * BEFORE SENSOR DATA CAN BE READ. THE TIMER BELOW IS USED + * WHEN TEMP READINGS ARE REQUESTED */ + const esp_timer_create_args_t hdc1080_conversion_timer_args = { + .callback = &hdc1080_conversion_completed, + .name = "hdc1080_conversion_timer" + }; + /* CREATE THE TEMPERATURE TRIGGER TIMER */ + err_ck = esp_timer_create(&hdc1080_conversion_timer_args, &hdc1080_conversion_timer_h); + return err_ck; +} + +/* ---------------------------------------------------------------------- + * @name esp_err_t hdc1080_get_configuration(hdc1080_config_t * hdc_cfg) + * ---------------------------------------------------------------------- + * @brief Write to the i2c bus + * @param hdc_cfg -> pointer to an hdc1080_config_t to fill + * @return ESP_OK on success* + */ +esp_err_t hdc1080_get_configuration(hdc1080_config_t * hdc_cfg){ + if(awaiting_conversion){ return HDC1080_CONVERTING; } + unsigned char hdc_buff[2] = {0}; + esp_err_t err_ck = check_hdc1080_error(read_hdc100_data(HDC1080_CONFIG_REG, hdc_buff, 2)); + if(err_ck != ESP_OK){ return err_ck; } + hdc_cfg->config_register = hdc_buff[0]; + return err_ck; +} + +/* -------------------------------------------------------------------------------------------------- + * @name static esp_err_t write_hdc100_data(unsigned char i2c_register, unsigned char * write_buff, size_t write_len) + * -------------------------------------------------------------------------------------------------- + * @brief Write to the i2c bus + * @param i2c_register -> register to write to + * @param write_buff -> pointer to the buffer with the data + * @param write_len -> length of the write + * @return ESP_OK on success* + */ +static esp_err_t write_hdc100_data(unsigned char i2c_register, unsigned char * write_buff, size_t write_len){ + /* CHANGE TO THE CORRECT REGISTER BEFORE THE READ */ + i2c_cmd_handle_t cmdlnk = i2c_cmd_link_create(); + check_hdc1080_error(i2c_master_start(cmdlnk)); + check_hdc1080_error(i2c_master_write_byte(cmdlnk, (hdc1080_set.i2c_address << 1) | I2C_MASTER_WRITE, true)); + check_hdc1080_error(i2c_master_write_byte(cmdlnk, i2c_register, true)); + check_hdc1080_error(i2c_master_write(cmdlnk, write_buff, write_len, I2C_MASTER_LAST_NACK)); + check_hdc1080_error(i2c_master_stop(cmdlnk)); + esp_err_t err_ck = check_hdc1080_error(i2c_master_cmd_begin(hdc1080_set.i2c_port_number, cmdlnk, hdc1080_set.timeout_length)); + i2c_cmd_link_delete(cmdlnk); + return err_ck; +} + +/* -------------------------------------------------------------------------------------------------- + * @name static esp_err_t read_hdc100_data(unsigned char i2c_register, unsigned char * read_buff, size_t read_len) + * -------------------------------------------------------------------------------------------------- + * @brief Read from the i2c bus + * @param i2c_register -> register to read from + * @param read_buff -> pointer to the buffer where the data will be stored + * @param read_len -> length of the read + * @return ESP_OK on success* + */ +static esp_err_t read_hdc100_data(unsigned char i2c_register, unsigned char * read_buff, size_t read_len){ + /* CHANGE TO THE CORRECT REGISTER BEFORE THE READ */ + i2c_cmd_handle_t cmdlnk = i2c_cmd_link_create(); + check_hdc1080_error(i2c_master_start(cmdlnk)); + check_hdc1080_error(i2c_master_write_byte(cmdlnk, (hdc1080_set.i2c_address << 1) | I2C_MASTER_WRITE, true)); + check_hdc1080_error(i2c_master_write_byte(cmdlnk, i2c_register, true)); + check_hdc1080_error(i2c_master_stop(cmdlnk)); + esp_err_t err_ck = check_hdc1080_error(i2c_master_cmd_begin(hdc1080_set.i2c_port_number, cmdlnk, hdc1080_set.timeout_length)); + i2c_cmd_link_delete(cmdlnk); + if(err_ck != ESP_OK){ return err_ck; } + /* BEGIN THE READ */ + cmdlnk = i2c_cmd_link_create(); + check_hdc1080_error(i2c_master_start(cmdlnk)); + check_hdc1080_error(i2c_master_write_byte(cmdlnk, (hdc1080_set.i2c_address << 1) | I2C_MASTER_READ, true)); + check_hdc1080_error(i2c_master_read(cmdlnk, read_buff, read_len, I2C_MASTER_LAST_NACK)); + check_hdc1080_error(i2c_master_stop(cmdlnk)); + err_ck = check_hdc1080_error(i2c_master_cmd_begin(hdc1080_set.i2c_port_number, cmdlnk, hdc1080_set.timeout_length)); + i2c_cmd_link_delete(cmdlnk); + return err_ck; +} + +/* -------------------------------------------------------------- + * @name static esp_err_t check_hdc1080_error(esp_err_t hdc_err) + * -------------------------------------------------------------- + * @brief Check for esp errors and print them + * @param hdc_err -> The returned error from the check + * @return ESP_OK on success, original error on fail + * @note Any special error handling can be put in here + */ +static esp_err_t check_hdc1080_error(esp_err_t hdc_err){ + if(hdc_err == ESP_OK){ return ESP_OK; } + ESP_LOGE("HDC1080", "ERROR HAS OCCURED: %s", esp_err_to_name(hdc_err)); + return hdc_err; +} \ No newline at end of file diff --git a/dist/hdc1080_0.2.0/idf_component.yml b/dist/hdc1080_0.2.0/idf_component.yml new file mode 100644 index 0000000..0c0827e --- /dev/null +++ b/dist/hdc1080_0.2.0/idf_component.yml @@ -0,0 +1,7 @@ +dependencies: + idf: + version: '>=5.0' +description: HDC1080 Driver for the ESP32 +license: Apache-2.0 +url: https://github.com/grstat/esp32-hdc1080/tree/main +version: 0.2.0 diff --git a/dist/hdc1080_0.2.0/include/hdc1080.h b/dist/hdc1080_0.2.0/include/hdc1080.h new file mode 100644 index 0000000..0f63ead --- /dev/null +++ b/dist/hdc1080_0.2.0/include/hdc1080.h @@ -0,0 +1,102 @@ +/* + * ESP32 HDC1080 COMPONENT DRIVER LIBRARY + * Copyright 2023 Open grStat + * + * SPDX-FileCopyrightText: 2023 Open grStat https://github.com/grstat + * SPDX-FileType: HEADER + * SPDX-FileContributor: Created by Adrian Borchardt + * SPDX-License-Identifier: Apache-2.0 + * + */ +#ifndef __HDC1080_H__ +#define __HDC1080_H__ +#include +#include +#include +#include + +#define HDC1080_TEMPERATURE_REG 0x00 /* TEMPERATURE MEASUREMENT OUTPUT */ +#define HDC1080_HUMIDITY_REG 0x01 /* RELATIVE HUMIDITY MEASUREMENT OUTPUT */ +#define HDC1080_CONFIG_REG 0x02 /* HDC1080 CONFIGURATION DATA */ +#define HDC1080_SERIALID2_REG 0xFB /* FIRST 2 BYTES OF SERIAL ID */ +#define HDC1080_SERIALID1_REG 0xFC /* MID 2 BYTES OF THE SERIAL ID */ +#define HDC1080_SERIALID0_REG 0xFD /* LAST BYTE BIT OF THE SERIAL ID */ +#define HDC1080_MANUFACTURER_ID_REG 0xFE /* ID OF TEXAS INSTRUMENTS */ +#define HDC1080_DEVICE_ID_REG 0xFF /* REGISTER OF THE DEVICE ID */ +#define HDC1080_DEVICE_ID 0x1050 /* HDC1080 UNIQUE ID */ +#define HDC1080_MANUFACTURER_ID 0x5449 /* TI MANUFACTURER ID */ +#define HDC1080_I2C_ADDRESS 0x40 /* I2C ADDRESS OF THE HDC1080 */ + +#define HDC1080_ACQUISITION_HUMIDITY_AND_TEMPERATURE 0x01 +#define HDC1080_ACQUISITION_HUMIDITY_OR_TEMPERATURE 0x00 +#define HDC1080_TEMPERATURE_RESOLUTION_11BIT 0x01 +#define HDC1080_TEMPERATURE_RESOLUTION_14BIT 0x00 +#define HDC1080_HUMIDITY_RESOLUTION_8BIT 0x02 +#define HDC1080_HUMIDITY_RESOLUTION_11BIT 0x01 +#define HDC1080_HUMIDITY_RESOLUTION_14BIT 0x00 + +#define HDC1080_HEATER_ENABLED 0x01 +#define HDC1080_HEATER_DISABLED 0x00 +#define HDC1080_BATTERY_STATUS_OK 0x00 +#define HDC1080_BATTERY_STATUS_LOW 0x01 +#define HDC1080_ERR_ID 0xFF +#define HDC1080_CONVERTING 0xFE +#define HDC1080_CONVERSION_WAIT_PERIOD (500000) /* CONVERSION WAIT PERIOD */ + +/* CONVERT CELSIUS TO FAHRENHEIT */ +#define CEL2FAH(CELSIUS) ((1.8 * CELSIUS) + 32) +/* CALCULATE DEWPOINT USING TEMPERATURE AND HUMIDITY */ +#define DEWPOINT(CELSIUS, RH) (CELSIUS - (14.55 + 0.114 * CELSIUS) * \ + (1 - (0.01 * RH)) - pow(((2.5 + 0.007 * CELSIUS) * \ + (1 - (0.01 * RH))),3) - (15.9 + 0.117 * CELSIUS) * \ + pow((1 - (0.01 * RH)), 14)) +/* CALCULATE AIR SATURATION VAPOR PRESSURE IN PASCALS */ +#define SVP(CELSIUS) (610.78 * pow(2.71828, (CELSIUS / (CELSIUS+237.3) * 17.2694))) +/* AIR VAPOR PRESSURE DEFICIT IN kPa */ +#define VPD(SVP, RH) ((SVP *(1 - RH/100))/1000) +/* CONVERT PASCALS TO kPa */ +#define PAS2KPA(PASCALS) (PASCALS / 1000) + +/* THE CONFIG REGISTER IS 16 BITS LONG BUT THE FIRST 8 + * BITS ARE RESERVED, SO HERE JUST PACK IN THE LAST 8 BITS */ +typedef union { + unsigned char config_register; + struct { + unsigned char humidity_measurement_resolution : 2; + unsigned char temperature_measurement_resolution : 1; + unsigned char battery_status : 1; + unsigned char mode_of_acquisition : 1; + unsigned char heater : 1; + unsigned char reserved_bit : 1; + unsigned char software_reset : 1; + }; +} hdc1080_config_t; + +/* SENSOR READINGS STRUCT VALUES IN CELSIUS */ +typedef struct HDC1080_SENSOR_READINGS { + float humidity; + float temperature; +} hdc1080_sensor_readings_t; + +/* CALLBACK FOR SENSOR READINGS */ +typedef void(* hdc1080_sensor_callback)(hdc1080_sensor_readings_t); + +/* PORT AND CALLBACK SETTINGS + * i2c_address -> HDC1080 i2c ADDRESS + * i2c_port_number -> THE CONFIGURED i2c PORT + * timeout_length -> THE LENGTH TO WAIT FOR A READ/WRITE TIMEOUT + * callback -> THE CALLBACK FUNCTION TO RETURN THE SENSOR DATA TO + * EXP: void temperature_readings_callback(hdc1080_sensor_readings_t sens_readings) + */ +typedef struct HDC1080_SETTINGS { + unsigned char i2c_address; + unsigned char i2c_port_number; + TickType_t timeout_length; + hdc1080_sensor_callback callback; +} hdc1080_settings_t; + +esp_err_t hdc1080_configure(hdc1080_settings_t * hdc1080_settings, hdc1080_config_t hdc_cfg); +esp_err_t hdc1080_request_readings(void); +esp_err_t hdc1080_get_configuration(hdc1080_config_t * hdc_cfg); + +#endif \ No newline at end of file diff --git a/examples/hdc1080_example_main/README.md b/examples/hdc1080_example_main/README.md index 342b740..c269354 100644 --- a/examples/hdc1080_example_main/README.md +++ b/examples/hdc1080_example_main/README.md @@ -49,3 +49,17 @@ Build the project and flash it to the board, then run monitor tool to view seria ``` idf.py -p PORT flash monitor ``` + +### EXAMPLE OUTPUT +``` +I (347) main_task: Calling app_main() +I (367) I2C: FOUND DEVICE AT ADDRESS: 0x40 +I (367) I2C: FOUND DEVICE AT ADDRESS: 0x44 +I (367) MAIN: HDC1080 CONFIGURATION SUCCESSFUL +I (367) MAIN: READINGS WERE REQUESTED +E (377) MAIN: REQUEST FAILED, CONVERSION IN PROGRESS +I (377) main_task: Returned from app_main() +I (867) SENSOR_DATA: TEMPERATURE: 24.16°C | 75.49°F +I (877) SENSOR_DATA: HUMIDITY: 37.12% - DEWPOINT: 8.52°C | 47.34°F +I (877) SENSOR_DATA: AIR SATURATION VAPOR PRESSURE: 3.01 kPa - AIR VAPOR PRESSURE DEFICIT: 1.89 kPa +``` \ No newline at end of file diff --git a/examples/hdc1080_example_main/main/idf_component.yml b/examples/hdc1080_example_main/main/idf_component.yml index b2e8d2c..adad4c0 100644 --- a/examples/hdc1080_example_main/main/idf_component.yml +++ b/examples/hdc1080_example_main/main/idf_component.yml @@ -1,4 +1,4 @@ -version: "0.2.0" +version: "0.2.2" description: "HDC1080 ESP32 USAGE EXAMPLE" url: "https://github.com/grstat/esp32-hdc1080/tree/main/examples/hdc1080_example_main" license: "Apache-2.0" @@ -6,5 +6,5 @@ dependencies: ## Required IDF version idf: ">=5.0" grstat/hdc1080: - version: '^0.1.0' + version: '>=0.2.2' override_path: '../../../' \ No newline at end of file diff --git a/idf_component.yml b/idf_component.yml index 917f703..e09a61f 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,6 +1,6 @@ description: "HDC1080 Driver for the ESP32" url: "https://github.com/grstat/esp32-hdc1080/tree/main" -version: '0.2.0' +version: '0.2.2' license: 'Apache-2.0' dependencies: idf: