OttawaHacker Posted July 7, 2023 Share Posted July 7, 2023 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? 0 Quote Link to comment Share on other sites More sharing options...
renaudrenaud Posted July 15, 2023 Share Posted July 15, 2023 Seen this https://github.com/renaudrenaud/opi5_lcd_monitor 0 Quote Link to comment Share on other sites More sharing options...
OttawaHacker Posted July 16, 2023 Author Share Posted July 16, 2023 18 hours ago, renaudrenaud said: Seen this https://github.com/renaudrenaud/opi5_lcd_monitor 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... 0 Quote Link to comment Share on other sites More sharing options...
OttawaHacker Posted July 22, 2023 Author Share Posted July 22, 2023 On 7/15/2023 at 6:20 PM, renaudrenaud said: Seen this https://github.com/renaudrenaud/opi5_lcd_monitor 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. 0 Quote Link to comment Share on other sites More sharing options...
martivo Posted August 31, 2023 Share Posted August 31, 2023 Here is my ansible for running a small LCD over I2C https://github.com/martivo/armbian-orange-pi-5-ansible/tree/main/roles/oledinfo 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.