-->
Page 2 of 2

Re: reading SI7021 (humidity/temp) with ESP-12

PostPosted: Thu Apr 21, 2016 4:00 am
by ErikLem
I've found the solution. It was actually already already on the forum here :oops:
In this thread, there's code that can be used to replace the contents of the library file Si7021.cpp viewtopic.php?f=32&t=8002&p=41755&hilit=si7021#p41755

The library itself van be downloaded from https://github.com/LowPowerLab/SI7021
After changing the library file, I get poper output from the basic sample:

BASIC DEMO
------------------------------------------
Heater Status = OFF
Humidity : 59.59 % Temp : 20.47 C 30
Humidity : 59.48 % Temp : 20.50 C 29
Humidity : 59.48 % Temp : 20.49 C 28
Humidity : 59.49 % Temp : 20.47 C 27
Humidity : 59.48 % Temp : 20.46 C 26
Humidity : 59.47 % Temp : 20.45 C 25
Humidity : 59.47 % Temp : 20.48 C 24
Humidity : 59.48 % Temp : 20.48 C 23
Humidity : 59.48 % Temp : 20.45 C 22
Humidity : 59.49 % Temp : 20.47 C 21
Humidity : 59.48 % Temp : 20.48 C 20

Re: reading SI7021 (humidity/temp) with ESP-12

PostPosted: Sun Apr 16, 2017 1:19 pm
by gandipg
ESP 01

void setup()
{
Wire.begin(0,2);
ESP8266 -- Si7021
pin 0 pin SDA
pin 2 pin SCL

void setup()
{
Wire.begin(2,0);
ESP8266 -- Si7021
pin 2 pin SDA
pin 0 pin SCL