easytarget / MQ-Pro-IO

Investigating the MangoPi MQ pro
14 stars 0 forks source link

Enabling the I2C controller and creating a bus #3

Closed skyne98 closed 2 months ago

skyne98 commented 2 months ago

Hi! Thanks for the unique and extremely useful resource!

I am somewhat of an embedded linux noob, so I am trying to figure things out step by step with my mq pro. Currently I am trying to initialize i2c to communicate with the "Adafruit 128x64 OLED Bonnet"'s OLED panel with the SD1306 driver.

Problem I am currently having is with the bus and controller. You wrote that the correct way of doing things is using the vanilla mq pro device tree and then using gpiod and pinctl to dynamically manage devices. Can you please help me out on how that works?

All the resources I find tell me to compile a device tree to enable i2c and I cannot find any that mentions how to use the two to do it dynamically D:

Current goal: initialize an i2c bus on pins 3 and 5.

Thanks!