surfacetemp2 2.0.0.0
|
Surface temp 2 Click is a compact add-on board that contains a high accuracy temperature sensor offering breakthrough performance over a wide industrial temperature range.
We provide a library for the SurfaceTemp2 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for SurfaceTemp2 Click driver.
- Initialization function.void surfacetemp2_cfg_setup ( surfacetemp2_cfg_t *cfg );
SURFACETEMP2_RETVAL surfacetemp2_init ( surfacetemp2_t *ctx, surfacetemp2_cfg_t *cfg );
- Set Critical Temperature Threshold functionfloat surfacetemp2_get_temperature ( surfacetemp2_t *ctx );
void surfacetemp2_set_crit_trsh ( surfacetemp2_t *ctx, float trsh );
uint8_t surfacetemp2_get_ct_pin ( surfacetemp2_t *ctx );
This example demonstrates the use of Surface Temp 2 Click.
The demo application is composed of two sections :
Initalizes the driver and configures the click board.
Reads the temperature in Celsius and displays the value on the USB UART each second.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.