Linkit One - I2C - No function named setclock

Moderators: violet, salmanfarisvp

Post Reply
hkumarsingh142
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Tue Mar 12, 2019 8:16 pm

Linkit One - I2C - No function named setclock

Post by hkumarsingh142 » Tue Mar 12, 2019 8:22 pm

I want to get the Heart Rate through MAX30102 sensor which sends data through the I2C Bus.

I tried the example from the library itself and getting the right data when I use ARDUINO MEGA.
But when I try to upload the same code in the Linkit One board, an error occurs:

Code: Select all

MAX30105.cpp:147:13: error: 'class TwoWire' has no member named 'setClock'

   _i2cPort->setClock(i2cSpeed);

             ^

exit status 1
Error compiling for board LinkIt ONE.
Libraries used: <Wire.h> and "MAX30105.h"

when I commented out the line in the MAX30105 library, it did show the data but also some zero values on a specific time interval...(PS: Screenshot is attached)
Screenshot (9).png
Screenshot (9).png (14.66 KiB) Viewed 236 times
So what is the solution to this problem?

User avatar
bestlux
Kindergarten
Kindergarten
Posts: 58
Joined: Wed Jan 30, 2019 11:51 am

Re: Linkit One - I2C - No function named setclock

Post by bestlux » Wed Mar 20, 2019 10:14 am

Hello,
I have heard a loooooooot of problems about Linkit One's I2C port, the problem is that its official I2c library sucks, and can not compatible with many code based on standard Arduino Libraries unless you rewrite your code or the MTK update its library. And I'm sorry for I do not have any ideas about it yet.

Post Reply