Read Sensor Data via I2C
Antwort
17.04.19 07:30

Hello everybody,

I try using the XDK Extensionboard to read sensor data of a LIDAR (ToF sensor) via I2C. Does anyone have experience with this?


Thank you for your support

Sandro

0 (0 Stimmen)
RE: Read Sensor Data via I2C
Antwort
17.04.19 08:31 als Antwort auf Sandro Götz.

Hello Sandro,

i worked with different sensors in combination of the XDK and an I2C bus before. The implementation of an I2C interface with the XDK is pretty easy. I recommend the "em_i2c.h" API from Silicon Labs.

In the internet you can find documentation and examples about the API. The example code you can find on this webstite:

https://www.silabs.com/support/resources.ct-application-notes.ct-example-code.p-microcontrollers_32-bit-mcus

If you have any furher questions feel free to ask.

Best regards,

Christian

 

+1 (1 Stimme)
RE: Read Sensor Data via I2C
Antwort
23.04.19 09:12 als Antwort auf Christian Köhler.

Hello Christian,

Thank you for your prompt reply.
Unfortunately, I am a beginner in using an API. I also have an API on my time-of-flight sensor to
read out the sensor via the extension ports. Now I have to link the "em_i2c.h" to the API of the ToF sensor? is that the right approach?

thanks for any kind of help.

 

Best regards,

Sandro

0 (0 Stimmen)
RE: Read Sensor Data via I2C
Antwort
25.04.19 07:12 als Antwort auf Sandro Götz.

Hello Sandro,

I am just a little confused about what you told me right now. In the first post you mentioned the use case to connect an external sensor to the I2C bus of the XDK. In your latest response you are pointing out you already have an API to read data from the sensor. If that is correct, it seems you already have an API based on I2C functionallity.

So if I may ask what API do you want to use and where did you get it from?

Best regards,

Christian

0 (0 Stimmen)
RE: Read Sensor Data via I2C
Antwort
07.05.19 09:02 als Antwort auf Christian Köhler.

Hello Christian,

I have to apologize for the confusion. The sensor API was the VL53L0X_api which is included as a third party lib. 

But I am now working with the Extensionport example project. With this it should be possible to write data to the I2C bus and to read from it. If I want to flash the project on the XDK, unfortunately, I get some error messages.

Can you help me find a solution to this problem?

Best regards,

Sandro

0 (0 Stimmen)