|
| 1 | + |
| 2 | + |
| 3 | +--- |
| 4 | + |
| 5 | +# TempHum3 Click |
| 6 | + |
| 7 | +- **CIC Prefix** : TEMPHUM3 |
| 8 | +- **mikroSDK** : YES |
| 9 | +- **Author** : Katarina Perendic |
| 10 | +- **Verison** : 1.0.0 |
| 11 | +- **Date** : Jan 2018. |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +### Software Support |
| 16 | + |
| 17 | +We provide a library for the TempHum3 Click on our [LibStock](https://libstock.mikroe.com/projects/view/2324/temp-amp-hum-3-click) |
| 18 | +page, as well as a demo application (example), developed using MikroElektronika |
| 19 | +[compilers](http://shop.mikroe.com/compilers). The demo can run on all the main |
| 20 | +MikroElektronika [development boards](http://shop.mikroe.com/development-boards). |
| 21 | + |
| 22 | +**Library Description** |
| 23 | + |
| 24 | +Library covers all functionalities of the click board. |
| 25 | + |
| 26 | +Key functions : |
| 27 | + |
| 28 | +- ``` float temphum3_getTemperature() ``` - Reads temperature from sensor |
| 29 | +- ``` void temphum3_setMeasurement(uint8_t value) ``` - Setup measurement parameters |
| 30 | +- ``` void temphum3_Configuration(uint8_t value) ``` - Setup sensor configuration |
| 31 | + |
| 32 | +**Examples Description** |
| 33 | + |
| 34 | +The application is composed of three sections : |
| 35 | + |
| 36 | +- System Initialization - Initializes I2C module and CS pin as OUTPUT and INT pin as INPUT |
| 37 | +- Application Initialization - Initializes Driver init and settings chip mode ACTIVE and configuration Measurement and Interrupt, |
| 38 | + then settings maximum / minimum possible Temperature and Huminidy. |
| 39 | +- Application Task - (code snippet) - Reads the temperature and huminidy and logs to the USBUART every 500 ms. |
| 40 | + |
| 41 | + |
| 42 | +```.c |
| 43 | +void applicationTask() |
| 44 | +{ |
| 45 | + Temperature = temphum3_getTemperature(); |
| 46 | + Delay_100ms(); |
| 47 | + |
| 48 | + Huminidy = temphum3_getHuminidy(); |
| 49 | + Delay_100ms(); |
| 50 | + |
| 51 | + FloatToStr(Temperature,temp_txt); |
| 52 | + mikrobus_logWrite("Temperature : ",_LOG_TEXT); |
| 53 | + mikrobus_logWrite(temp_txt,_LOG_LINE); |
| 54 | + |
| 55 | + FloatToStr(Huminidy,hum_txt); |
| 56 | + mikrobus_logWrite("Huminidy : ",_LOG_TEXT); |
| 57 | + mikrobus_logWrite(hum_txt,_LOG_LINE); |
| 58 | + |
| 59 | + Delay_ms( 500 ); |
| 60 | +} |
| 61 | +``` |
| 62 | + |
| 63 | +The full application code, and ready to use projects can be found on our |
| 64 | +[LibStock](https://libstock.mikroe.com/projects/view/2324/temp-amp-hum-3-click) page. |
| 65 | + |
| 66 | +mikroE Libraries used in the example: |
| 67 | + |
| 68 | +- I2C |
| 69 | +- UART |
| 70 | +- Conversions |
| 71 | + |
| 72 | +**Additional notes and informations** |
| 73 | + |
| 74 | +Depending on the development board you are using, you may need |
| 75 | +[USB UART click](http://shop.mikroe.com/usb-uart-click), |
| 76 | +[USB UART 2 Click](http://shop.mikroe.com/usb-uart-2-click) or |
| 77 | +[RS232 Click](http://shop.mikroe.com/rs232-click) to connect to your PC, for |
| 78 | +development systems with no UART to USB interface available on the board. The |
| 79 | +terminal available in all Mikroelektronika |
| 80 | +[compilers](http://shop.mikroe.com/compilers), or any other terminal application |
| 81 | +of your choice, can be used to read the message. |
| 82 | + |
| 83 | +--- |
| 84 | +### Architectures Supported |
| 85 | + |
| 86 | +#### mikroC |
| 87 | + |
| 88 | +| STM | KIN | CEC | MSP | TIVA | PIC | PIC32 | DSPIC | AVR | FT90x | |
| 89 | +|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:| |
| 90 | +| x | x | x | x | x | x | x | x | x | x | |
| 91 | + |
| 92 | +#### mikroBasic |
| 93 | + |
| 94 | +| STM | KIN | CEC | MSP | TIVA | PIC | PIC32 | DSPIC | AVR | FT90x | |
| 95 | +|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:| |
| 96 | +| x | x | x | x | x | x | x | x | x | x | |
| 97 | + |
| 98 | +#### mikroPascal |
| 99 | + |
| 100 | +| STM | KIN | CEC | MSP | TIVA | PIC | PIC32 | DSPIC | AVR | FT90x | |
| 101 | +|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:| |
| 102 | +| x | x | x | x | x | x | x | x | x | x | |
| 103 | + |
| 104 | +--- |
| 105 | +--- |
0 commit comments