The only way to track stuff like this down is going to be with logic analyzer pictures. I have run into issues & bugs in the Arduino Wire library code of AVR and pic32 (chipkit). It returns an int which can be -1 instead of the next 8 bit data byte. Perhaps the slave doesn't support repeated starts?Īlso note that Wire.read() can fail. devices will behave oddly if they do not see a STOP. no call to endTransmission(true) is made. is very possible to leave the bus in a hung state if the bus tenure has been properly ended with a STOP. The wire library has a warning about using this no stop option: // WARNING: Nothing in the library keeps track of whether The code is using a flag to disable sending the STOP on a write and then doing a read which I guess does a repeat start operation on the next readFrom()ĭoes it work if you use the normal endTransmission() which sends the stop? You can post issues in the Arduino github repository but I think the issue needs to be further narrowed down before doing so. How can I report this bug and try to help to get it solved? I decided to use several println in the code above to track which line was hanging and I discovered it always hangs at this line: Open your computer serial and wait a few seconds, usually after around 10-30 seconds arduino will hang. I thought it was JEFF'S ROWBERG library fault but it is not! Today I removed that library from my code and used only WIRE.H and the bug still happens.Ĭonnect your MPU6050 to your arduino (VCC, GND, SCL and SDA) and run the simplest code below. The arduino IDE can't seem to find the wire.h file when i'm using the new liquid crystal library.I was facing serious problems with MPU6050 usin JEFF'S ROWBERG library cause my arduino intermitently hangs.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |