Mixing another I2C device with piicodev devices

Hi guys,
I am building a robot with PiicoDev devices but wanted to use another non-PiicoDev I2C device with the other 3 devices on the robot, which include:

  • the VL53L1X distance sensor
  • the PiicoDev SSD1306 OLED Display
  • the PiicoDev LIS3DH

I want to add a TOF10120 that I have lying around as the rear distance sensor and was wondering how to go about it so that there are no clashes with addresses, etc. Can you let me know if there are any raspi pico python libraries that I could use and what to do about the addresses?

Thanks heaps,

Ricardo

Hi Ricardo,

I’ve grabbed the default addresses for you below:

  • VL531X - 0x53 - Can be changed in software each on startup
  • OLED - 0x3C - Can be changed to 0x3D with Adress SWitch
  • LIS3DH - 0x19 - Can be changed to 0x18 with Adress SWitch

I googled the TOF10120, looks like someone has written Python code for a full-size Pi, shouldn’t be too hard to do some more searching or port it to microPython:

Looking at the code it looks like the sensor sits on 0x52, so as long as you don’t add an ENS160 or RV3028 you should be fine :slight_smile:

P.S. in future, you can just dig into the Core Electronics Github to find address info, for example here’s the SSD1306 code:


Taken from:

Nice work @James

We document each module’s addresses on each product page - which might be a bit friendlier than digging through source code

1 Like

Hi @James and @Michael,

Thanks for your responses. It has certainly steered me in the right direction.

Cheers,

Ricardo

P.S.: Sorry for the delayed reply… I just got back from holidays!

2 Likes