Wire setClock needed for u8g2

Post Reply
jonathanberi
Posts: 8
Joined: Mon May 25, 2015 4:43 pm

Wire setClock needed for u8g2

Post by jonathanberi » Sat Dec 03, 2016 5:32 pm

u8g2 uses setClock for i2c OLED displays. Simply commenting out the call made the hello world example work, but I'm not sure what other side effects the method has.

User avatar
RogerClark
Posts: 7498
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Wire setClock needed for u8g2

Post by RogerClark » Thu Jul 13, 2017 7:00 am

The function is missing from Wire because the lib was written prior to that function being part of the Wire API

The software I2C has a variable called delay that controls the speed.

We can't actually achieve 400khz in software, the max is around 350, so I'm not sure whether adding that function would suggest that it can go that fast

But for Hardware I2C I presume its possible, as there is a define for it, I2C_FAST_MODE which I presume needs to be passed

I could add a dummy function that does nothing or for Software I2C goes as fast as it can and perhaps figure out who to pass the hardware param, but I don't have time to do it at the moment.

Can you post as a github issue or do a PR for this ?

jhlow
Posts: 3
Joined: Sun Jul 09, 2017 8:09 pm

Re: Wire setClock needed for u8g2

Post by jhlow » Thu Jul 13, 2017 4:19 pm

Hello:

I got a same problem when I uploaded the Arduino source code that is "MAX30100_RawData" in the follow github link.

https://github.com/oxullo/Arduino-MAX30 ... r/examples

User avatar
RogerClark
Posts: 7498
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: Wire setClock needed for u8g2

Post by RogerClark » Sat Jul 15, 2017 8:33 am

Try the latest version of the repo

Post Reply