-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I2C error #698
Comments
Which pins on Nodemcu board are you using? You know that silkscreen labels On Sun, Aug 16, 2015, 18:40 petrd [email protected] wrote:
|
Hello, |
I tried also GPIO12 and GPIO14, the result is the same. |
Ok, I don't have these sensors at hand, please attach oscilloscope traces On Sun, Aug 16, 2015, 19:05 petrd [email protected] wrote:
|
I can't zoom the traces enough to see the pulses, but from the log it looks like the difference is that ESP doesn't generate STOP condition after a NACK. |
You can try to edit twi_writeTo function in core_esp8266_si2c.c. Make it call twi_write_stop on errors (i.e. before |
Sending an enlarged graph which corresponds to the following code:
Arduino Uno: Arduino ESP-12E: |
Okay, graphs show that ESP doesn't generate a STOP condition after the first NACK. Please try the edit suggested above — it might resolve the issue. |
Hello, |
That's great! Could you please post the diff or the changed code for the On Mon, Aug 17, 2015, 23:29 petrd [email protected] wrote:
|
OK, Thank you very much. |
Repair I2C communication issue 698 esp8266#698
Hello,
I tried to connect ESP-12E I2C humidity and temperature sensor AM2321. I2C communication is not working. I tried it on Modemcu 0.9 (ESP-12) and on Modemcu 1.0 (ESP-12E). The same code works with the Arduino Due. I reduced the pull-up resistors from 10k to 2k2. Also it is not working. I tried HTU21D, it is similar to the humidity and temperature sensor. Also not working.
I do not know what I'm doing wrong, but it looks like it is not working I2C?
Configuration:
SDA = GPIO4
SCL = GPIO5
Pull-up resistors 2x10K or 2x2k2
Version: 1.6.5-1044-g170995a
Code:
The text was updated successfully, but these errors were encountered: