Environment 2 Click Board
Environment 2 Click Board
The Environment 2 Click Board™ is a compact add-on board containing best-in-class SHT humidity and SGP air-quality sensing solutions from Sensirion. This board features SHT40 and SGP40, a high-accuracy ultra-low-power relative humidity, and a temperature sensor combined with MOx based gas sensor. The SHT40 sensor offers linearized digital output, provides constant temperature accuracy, up to 0.1°C, and shows the best performance when operated within the temperature and humidity range of 5-60°C and 20-80%RH, while the SGP40, a digital gas sensor, features a temperature-controlled micro hot-plate providing a humidity-compensated VOC-based indoor air quality signal. This Click Board™ is suitable for indoor air quality and various temperature and humidity-related applications.
The Environment 2 Click Board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
Software Support
We provide a library for the Environment 2 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on the mikroE Github account.
Library Description
This library contains an API for the Environment 2 Click Board™ driver.
Key Functions
environment2_cfg_setup
- Config Object Initialization function.environment2_init
- Initialization function.environment2_default_cfg
- Click the Default Configuration function.
Example Description
This library contains an API for the Environment 2 Click Board™ driver. The library contains drivers for measuring air quality, temperature and relative humidity.
The application is composed of three sections :
void application_init ( void ) { log_cfg_t log_cfg; /**< Logger config object. */ environment2_cfg_t environment2_cfg; /**< Click config object. */ // Logger initialization. LOG_MAP_USB_UART( log_cfg ); log_cfg.level = LOG_LEVEL_DEBUG; log_cfg.baud = 115200; log_init( &logger, &log_cfg ); log_printf( &logger, "rn Application Initrn" ); // Click initialization. environment2_cfg_setup( &environment2_cfg ); ENVIRONMENT2_MAP_MIKROBUS( environment2_cfg, MIKROBUS_1 ); err_t init_flag = environment2_init( &environment2, &environment2_cfg ); if ( init_flag == I2C_MASTER_ERROR ) { log_error( &logger, " Application Init Error. " ); log_printf( &logger, " Please, run program again... " ); for ( ; ; ); } log_printf( &logger, " Application Task rn" ); log_printf( &logger, "-----------------------rn" ); log_printf( &logger, " Environment 2 Click rn" ); log_printf( &logger, "-----------------------rn" ); if ( environment2_sgp40_measure_test( &environment2 ) == ENVIRONMENT2_SGP40_TEST_PASSED ) { log_printf( &logger, " All tests passedrn" ); log_printf( &logger, " Successfullyrn" ); } else { log_printf( &logger, " One or more tests havern" ); log_printf( &logger, " Failedrn" ); } log_printf( &logger, "-----------------------rn" ); Delay_ms( 100 ); environment2_sgp40_heater_off( &environment2 ); Delay_ms( 100 ); } The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on mikroE Github account.
Other mikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Environment2
Additional Notes and Information
Depending on the development board you are using, you may need a 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.
MIKROSDK
The Environment 2 Click Board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
Environment 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.