Measure temperature and humidity with high precision and long-term stability for smart appliances and consumer devices
A
A
Hardware Overview
How does it work?
Temp&Hum 26 Click is based on the ENS211, a high-performance temperature and humidity sensor from ScioSense that provides high-precision digital temperature and humidity measurements for a wide range of consumer and appliance applications. The ENS211 offers a typical temperature accuracy of ±0.15°C across a measurement range from -40 up to 100°C, alongside relative humidity measurements with ±2.0%RH accuracy across the full 0 to 100%RH range. With its 16-bit resolution digital output, the sensor delivers detailed and reliable environmental data, making it suitable for sensitive applications that demand consistent performance like smart appliances, consumer devices, and various other systems where accurate
and stable temperature and humidity sensing is essential. This Click board™ is designed in a unique format supporting the newly introduced MIKROE feature called "Click Snap." Unlike the standardized version of Click boards, this feature allows the main sensor/IC/module area to become movable by breaking the PCB, opening up many new possibilities for implementation. Thanks to the Snap feature, the ENS211 can operate autonomously by accessing its signals directly on the pins marked 1-8. Additionally, the Snap part includes a specified and fixed screw hole position, enabling users to secure the Snap board in their desired location. Communication with the host microcontroller is established over an I2C interface
supporting clock speeds up to 400kHz, with a fixed address of 0x44 and defined read and write access frames. To optimize power control and operational management, the board integrates the MAX40200 from Analog Devices, which enables or disables the ENS211 through the dedicated EN pin. This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. It also comes equipped with a library containing functions and example code that can be used as a reference for further development.
Features overview
Development board
PIC18F57Q43 Curiosity Nano evaluation kit is a cutting-edge hardware platform designed to evaluate microcontrollers within the PIC18-Q43 family. Central to its design is the inclusion of the powerful PIC18F57Q43 microcontroller (MCU), offering advanced functionalities and robust performance. Key features of this evaluation kit include a yellow user LED and a responsive
mechanical user switch, providing seamless interaction and testing. The provision for a 32.768kHz crystal footprint ensures precision timing capabilities. With an onboard debugger boasting a green power and status LED, programming and debugging become intuitive and efficient. Further enhancing its utility is the Virtual serial port (CDC) and a debug GPIO channel (DGI
GPIO), offering extensive connectivity options. Powered via USB, this kit boasts an adjustable target voltage feature facilitated by the MIC5353 LDO regulator, ensuring stable operation with an output voltage ranging from 1.8V to 5.1V, with a maximum output current of 500mA, subject to ambient temperature and voltage constraints.
Microcontroller Overview
MCU Card / MCU

Architecture
PIC
MCU Memory (KB)
128
Silicon Vendor
Microchip
Pin count
48
RAM (Bytes)
8196
You complete me!
Accessories
Curiosity Nano Base for Click boards is a versatile hardware extension platform created to streamline the integration between Curiosity Nano kits and extension boards, tailored explicitly for the mikroBUS™-standardized Click boards and Xplained Pro extension boards. This innovative base board (shield) offers seamless connectivity and expansion possibilities, simplifying experimentation and development. Key features include USB power compatibility from the Curiosity Nano kit, alongside an alternative external power input option for enhanced flexibility. The onboard Li-Ion/LiPo charger and management circuit ensure smooth operation for battery-powered applications, simplifying usage and management. Moreover, the base incorporates a fixed 3.3V PSU dedicated to target and mikroBUS™ power rails, alongside a fixed 5.0V boost converter catering to 5V power rails of mikroBUS™ sockets, providing stable power delivery for various connected devices.
Used MCU Pins
mikroBUS™ mapper
Take a closer look
Click board™ Schematic

Step by step
Project assembly
Track your results in real time
Application Output
1. Application Output - In Debug mode, the 'Application Output' window enables real-time data monitoring, offering direct insight into execution results. Ensure proper data display by configuring the environment correctly using the provided tutorial.

2. UART Terminal - Use the UART Terminal to monitor data transmission via a USB to UART converter, allowing direct communication between the Click board™ and your development system. Configure the baud rate and other serial settings according to your project's requirements to ensure proper functionality. For step-by-step setup instructions, refer to the provided tutorial.

3. Plot Output - The Plot feature offers a powerful way to visualize real-time sensor data, enabling trend analysis, debugging, and comparison of multiple data points. To set it up correctly, follow the provided tutorial, which includes a step-by-step example of using the Plot feature to display Click board™ readings. To use the Plot feature in your code, use the function: plot(*insert_graph_name*, variable_name);. This is a general format, and it is up to the user to replace 'insert_graph_name' with the actual graph name and 'variable_name' with the parameter to be displayed.

Software Support
Library Description
Temp&Hum 26 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.
Example Description
This example demonstrates the use of TempHum 26 Click board by reading the temperature and humidity values in periodic intervals. The device is initialized and placed into single-shot measurement mode, then both environmental values are read and logged to the USB UART. Data is updated every 200 ms.
Key functions:
temphum26_cfg_setup- This function initializes Click configuration structure to initial values.temphum26_init- This function initializes all necessary pins and peripherals used for this Click board.temphum26_default_cfg- This function executes a default configuration of TempHum 26 Click board.temphum26_start_measurement- This function starts the measurement for temperature, humidity, or both depending on the selected flag.temphum26_read_data- This function reads temperature and humidity data from the device with CRC check and data validity.
Application Init
Initializes the driver and performs the default configuration including device reset and communication check. It then logs the DIE revision number and unique ID.
Application Task
Starts a new temperature and humidity measurement, waits for the results, and logs the readings to the terminal every 200 ms.
Open Source
Code example
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.
/*!
* @file main.c
* @brief TempHum 26 Click example
*
* # Description
* This example demonstrates the use of TempHum 26 Click board by reading the temperature
* and humidity values in periodic intervals. The device is initialized and placed into
* single-shot measurement mode, then both environmental values are read and logged to the USB UART.
* Data is updated every 200 ms.
*
* The demo application is composed of two sections :
*
* ## Application Init
* Initializes the driver and performs the default configuration including device reset
* and communication check. It then logs the DIE revision number and unique ID.
*
* ## Application Task
* Starts a new temperature and humidity measurement, waits for the results,
* and logs the readings to the terminal every 200 ms.
*
* @author Stefan Filipovic
*
*/
#include "board.h"
#include "log.h"
#include "temphum26.h"
static temphum26_t temphum26;
static log_t logger;
void application_init ( void )
{
log_cfg_t log_cfg; /**< Logger config object. */
temphum26_cfg_t temphum26_cfg; /**< Click config object. */
/**
* Logger initialization.
* Default baud rate: 115200
* Default log level: LOG_LEVEL_DEBUG
* @note If USB_UART_RX and USB_UART_TX
* are defined as HAL_PIN_NC, you will
* need to define them manually for log to work.
* See @b LOG_MAP_USB_UART macro definition for detailed explanation.
*/
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
temphum26_cfg_setup( &temphum26_cfg );
TEMPHUM26_MAP_MIKROBUS( temphum26_cfg, MIKROBUS_1 );
if ( I2C_MASTER_ERROR == temphum26_init( &temphum26, &temphum26_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( TEMPHUM26_ERROR == temphum26_default_cfg ( &temphum26 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_printf ( &logger, " DIE revision number: 0x%.4X\r\n", temphum26.info.die_rev );
log_printf ( &logger, " Unique ID: 0x%.2X%.2X%.2X%.2X%.2X%.2X%.2X%.2X\r\n",
( uint16_t ) temphum26.info.uid[ 0 ], ( uint16_t ) temphum26.info.uid[ 1 ],
( uint16_t ) temphum26.info.uid[ 2 ], ( uint16_t ) temphum26.info.uid[ 3 ],
( uint16_t ) temphum26.info.uid[ 4 ], ( uint16_t ) temphum26.info.uid[ 5 ],
( uint16_t ) temphum26.info.uid[ 6 ], ( uint16_t ) temphum26.info.uid[ 7 ] );
log_info( &logger, " Application Task " );
}
void application_task ( void )
{
float temperature = 0;
float humidity = 0;
if ( TEMPHUM26_OK == temphum26_start_measurement ( &temphum26, TEMPHUM26_FLAG_TEMP_HUM ) )
{
if ( TEMPHUM26_OK == temphum26_read_data ( &temphum26, &temperature, &humidity ) )
{
log_printf ( &logger, " Temperature: %.2f degC\r\n", temperature );
log_printf ( &logger, " Humidity: %.2f %%RH\r\n\n", humidity );
Delay_ms ( 200 );
}
}
}
int main ( void )
{
/* Do not remove this line or clock might not be set correctly. */
#ifdef PREINIT_SUPPORTED
preinit();
#endif
application_init( );
for ( ; ; )
{
application_task( );
}
return 0;
}
// ------------------------------------------------------------------------ END
Additional Support
Resources
Category:Temperature & humidity


































