Skip to content

Commit dd59331

Browse files
committed
mikroSDK library for Temp&Hum 9 click
0 parents  commit dd59331

File tree

219 files changed

+11590
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+11590
-0
lines changed

README.md

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
![MikroE](http://www.mikroe.com/img/designs/beta/logo_small.png)
2+
3+
---
4+
5+
# Temp_Hum_9 Click
6+
7+
- **CIC Prefix** : TEMPHUM9
8+
- **Author** : Aleksandar Paunovic
9+
- **Verison** : 1.0.0
10+
- **Date** : Nov 2018.
11+
12+
---
13+
14+
### Software Support
15+
16+
We provide a library for the Temp_Hum_9 Click on our [LibStock](https://libstock.mikroe.com/projects/view/2671/temp-hum-9-click)
17+
page, as well as a demo application (example), developed using MikroElektronika
18+
[compilers](http://shop.mikroe.com/compilers). The demo can run on all the main
19+
MikroElektronika [development boards](http://shop.mikroe.com/development-boards).
20+
21+
**Library Description**
22+
23+
Library contains
24+
25+
Key functions :
26+
27+
- ``` void temphum9_readRegister( uint16_t registerAddress_, uint8_t nData_, uint16_t *registerBuffer_ ) ``` - reads one or two 16-bit registers
28+
- ``` void temphum9_sendCommand( uint16_t command_ ) ``` - issues (sends) command to device
29+
- ``` void temhum9_getTemperatureAndHumidity( uint8_t mode_, float *measurementData) ``` - performs temperature and relative humidity measurement and calculates temperature and relative humidity
30+
31+
**Examples Description**
32+
33+
Description :
34+
35+
The application is composed of three sections :
36+
37+
- System Initialization - Initializes LOG and I2C
38+
- Application Initialization - Initializes I2C driver and sends SLEEP and WAKEUP dommands
39+
- Application Task - Performs simultaneous temperature and relative humidity measurements and logs both values
40+
41+
42+
```.c
43+
44+
void applicationTask( )
45+
{
46+
mikrobus_logWrite( " ", _LOG_LINE );
47+
48+
temhum9_getTemperatureAndHumidity( _TEMPHUM9_NORMAL_MODE, &measurementData[0] );
49+
50+
FloatToStr( measurementData[0], text );
51+
mikrobus_logWrite( "> > > Temperature : ", _LOG_TEXT );
52+
mikrobus_logWrite( text, _LOG_TEXT );
53+
mikrobus_logWrite( " C", _LOG_LINE );
54+
55+
FloatToStr( measurementData[1], text );
56+
mikrobus_logWrite( "> > > Relative humidity : ", _LOG_TEXT );
57+
mikrobus_logWrite( text, _LOG_TEXT );
58+
mikrobus_logWrite( " %", _LOG_LINE );
59+
60+
mikrobus_logWrite( " ", _LOG_LINE );
61+
62+
Delay_ms(1000);
63+
}
64+
65+
```
66+
67+
68+
The full application code, and ready to use projects can be found on our
69+
[LibStock](https://libstock.mikroe.com/projects/view/2671/temp-hum-9-click) page.
70+
71+
Other mikroE Libraries used in the example:
72+
73+
- I2C
74+
- UART
75+
- Conversions
76+
77+
**Additional notes and informations**
78+
79+
Depending on the development board you are using, you may need
80+
[USB UART click](http://shop.mikroe.com/usb-uart-click),
81+
[USB UART 2 Click](http://shop.mikroe.com/usb-uart-2-click) or
82+
[RS232 Click](http://shop.mikroe.com/rs232-click) to connect to your PC, for
83+
development systems with no UART to USB interface available on the board. The
84+
terminal available in all Mikroelektronika
85+
[compilers](http://shop.mikroe.com/compilers), or any other terminal application
86+
of your choice, can be used to read the message.
87+
88+
---
89+
---

0 commit comments

Comments
 (0)