Jump to content

Recommended Posts

Posted

I need to move my homeassistant from rpi4 to an opi5 but I have some I2C sensors connected. Had anyone any luck configuring python and gpio to work with I2C sensors? This was a bit rough a while ago and the kernel support seems much more limited compared to the rpi4 for this type of use case. Any experience?

Posted
18 hours ago, renaudrenaud said:

that's an interesting find - from what I looked:

- the project did not use the default lcd monitor driver, going to guess that there is no direct support for any of the micro python libraries

- the project is running the code as root - not sure if there is any way to prevent that

 

Will figure out more once I receive my opi for this project...

Posted
On 7/15/2023 at 6:20 PM, renaudrenaud said:

I was able to run the adafruit libraries with a BMP 390 on my Orange PI 5. However I had to update couple pin/port combinations in the adafruit libraries. I opened a PR for this added support for i2c1-m4 overlay in orange pi 5

Process was not too complicated:

- activate i2c layout in overlays - I only tested i2c1-m4

- install gpio (wiringpi library) to read the pin numbers. It will show the logical pins enabled by the overlay (you need to look at the pinout diagram for physical pins)

- I added a combination for SDA/SCL pins that matches the overlay and pins - needs to go in two spots in the adafruit code

 

Btw, kudos to the new 25.8 version - it has python 3.11 out of the box.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines