Arduino library for the ENS21x temperature & humidity sensor family with I2C interface from ScioSense.
The ENS21x is a family of high-performance digital temperature and humidity sensors produced by ScioSense. With industry leading accuracies down to 0.1°C temperature and 0.8% relative humidity, their rapid response and reliable, long-term performance the ENS21x family addresses the fields of home appliances, building and automotive HVAC, cold chain management, personal health and wellness monitoring, industrial automation and instrumentation.
The ENS21x family includes the ENS210, ENS211, ENS212, ENS213A and the ENS215.
- Further information about the ENS21x
- Datasheet
- Buy the ENS210 on Mouser or Digikey
- Buy the ENS210 evaluation kit on Mouser
It is assumed that
- The Arduino IDE has been installed. If not, refer to "Install the Arduino Desktop IDE" on the Arduino site.
- The library directory is at its default location. Normally this is
C:\Users\[your_username]\Documents\Arduino\libraries
.
You might need to add your board to the Arduino IDE. This library was tested with the Espressif ESP32. For the installation of the ESP32 in the Arduino IDE, see Arduino ESP32 Installation
- In the Arduino IDE, navigate to the Arduino Library Manager on the left side (or, alternatively, select Sketch > Include Library > Manage Libraries...)
- Search for
ScioSense_ENS21x
- Select the library from the search results and press
Install
- Download the code from this repository via "Download ZIP".
- In Arduino IDE, select Sketch > Include Library > Add .ZIP library... and browse to the just downloaded ZIP file.
- When the IDE is ready this README.md should be located at
C:\Users\[your_username]\Documents\Arduino\libraries\ScioSense_ENS21x\README.md
.
Please make sure that you use the correct supply voltage: The ENS21x runs at VDD = 1.71...3.60 V.
This example shows how to wire a ESP32DevKitC with the ENS21x flex foil for I2C communication.
ENS21x flex foil | ESP32 |
---|---|
VDD | 3V3 |
GND | GND |
SDA | G21 |
SCL | G22 |
To build an example sketch
- (Re)start Arduino.
- Open File > Examples > Examples from Custom Libraries > ScioSense_ENS21x > 01_Basic (or any other of the provided examples you wish to run)
- Make sure Tools > Board lists the correct board.
- Select Sketch > Verify/Compile.
Contributions in the form of issue opening or creating pull requests are very welcome!
This library is developed for ScioSense by at² GmbH
@at2software