DietPi for ASUS Thinker board I2C

Hi all,

Anyone knows how to activate I2C on dietpi on an asus tinkerboard? I could not access I2C1 chanel.

Thanks,

I just stumbled over this topic from elsewhere. Just in case you are still looking for a solution or others land here. There is an overlay available which should enable I2C1.

Please try the following:

current_overlays=$(sed -n '/^[[:blank:]]*overlays=/{s/^[^=]*=//p;q}' /boot/dietpiEnv.txt)
[[ $current_overlays =~ (^|[[:blank:]])i2c1([[:blank:]]|$) ]] || G_CONFIG_INJECT 'overlays=' "overlays=${current_overlays:+$current_overlays }i2c1" /boot/dietpiEnv.txt

The code checks whether the overlay has been added already, and does so if not. This is how I would add a dietpi-config option. In essence, you can just add i2c1 to the end of the overlays= line in /boot/dietpiEnv.txt and reboot. Let me know whether this works.

For reference: ASUS Tinker Board | I2C toggle · Issue #6946 · MichaIng/DietPi · GitHub