-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Make Wire library error safe #2489
Conversation
with the magic of timeout. Also bus is put in "error" state, so you have to call init() to reset it. leaved infinite timeout function for retrocompatibility.
sometimes switching between langauges has its fallout
Also updated some examples
@ArduinoBot build this please |
is this still needed? i can fix to merge |
I tried the Code with RTC DS3231 and DS3232RTC Lib from http://github.com/JChristensen/DS3232RTC under IDE 1.6.6 Ubuntu 14.04, it compiles, but dos NOT give correct readings from the RTC and Code still hangs if power of RTC is disconnected while communication is in progress (SDA, SCL still connected!). Serial output (should be: hh:mm:ss dd.mm.yy Temp [°C]) back with original wire.cpp/.h and twi.c/.h files it look like this - seems the RTC got reset, but at least Temp is fine: after resetting RTC to correct time (all back good, but still hang problem if power is disc.): |
can you send me the code and the "raw" communication with the sensor? |
Yes I will, but how can I record the raw I2C communication with the sensor? Thx -----Original Message----- can you send me the code and the "raw" communication with the sensor? Reply to this email directly or view it on GitHub: |
just send back the data that come to i2c by serial, in hex format :) |
Any chance of fixing the conflicts for a review? @MauroMombelli ? |
@mjeveritt not unless the devs show some interest |
I suspect flying elephants will occur first ... 🤣 |
you missed the news: the timeout is now implemented in AVR Wire We closed all the issues related to the I2C/Wire timeout, but we missed this one. Since you're interested in this discussion you may want to join the party here: |
by adding timeout into twi and giving the user a way to use them.
Full retrocompatible.