I2C clock stretching. Test a prototype!

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
p0lyg0n1
Posts: 149
Joined: 04 Aug 2016 07:14

I2C clock stretching. Test a prototype!

Post by p0lyg0n1 » 30 Jun 2018 19:02

Hi,
For those who need I2C clock stretching. I have made the first prototype. I am porting CCS811 sensor library to Z-Uno and I have to modify the Wire library first. You could help me if you test this library with your devices.
How to use this library:
1. You need the latest 2.1.4 cores.
2. Replace Wire.cpp/.h inside your cores with attached files(You have to unzip them first).
3. Try it with your project using I2C devices with "standard mode" (without your code modification).
4. Then add to your setup function

Code: Select all

Wire.enableTS(true);
5. Rebuild & try your device once more.
If all will be ok, I'll add this library to next beta/release.

Best regards,
Alex.
Attachments
Wire_TS.zip
Modified Wire library. It supports clock stretching.
(3.67 KiB) Downloaded 2 times

michap
Posts: 302
Joined: 26 Mar 2013 10:35
Contact:

Re: I2C clock stretching. Test a prototype!

Post by michap » 08 Jul 2018 20:20

As discussed, it is working with my lib for AMS IAQCore sensors - and its working still with "old" sensors ;)

Thanks for your work!
Michael

Post Reply