sipeed / Maixduino

Arduino port on Maix board ( k210 )
https://maixduino.sipeed.com
Other
215 stars 95 forks source link

Fixed TwoWire implementation to be more Arduino compatible #95

Closed mikljohansson closed 3 years ago

mikljohansson commented 3 years ago

Hello Sipeed!

Thanks for publishing the great Maix series of boards, very useful for amateur AI hobbyists list me! :)

I had a problem with a PN532 sensor connected via I2C to a Maix Dock M1w that wouldn't work properly. However some other I2C sensor did work on the Maix Dock, so it seemed that there were some incompatibilities that caused problems for the PN532 library (Seeed_Arduino_NFC

So I coded up a solution that worked on Arduino, then used the same code for a Maix Dock M1w. I then fixed a few issues in the TwoWire implementation, to make it more compatible with Arduino. With the changes in this PR my NFC reader now works great together with the Seeed_Arduino_NFC library.

Hopefully you find this PR useful, and perhaps it can help others that may be struggling with getting I2C modules connected to the Maix boards.

Neutree commented 3 years ago

thanks~