05-23-2021, 07:12 AM
Hi Tim
I was looking some more at how to enable I2C on Moode 7.2.1.
'/boot/config.txt' contains a line
It seems that this line is supposed to create the device entry /dev/i2c-1 and, also, is the recommended method to do so on Raspberry Pi OS.
Running Moode on a PI Zero this line doesn't create the entry. Similarly, running
does not set up the entry. However, I just logged into a Pi 4 running Raspberry Pi OS and without I2C enabled and ran that command and the device entry was created.
On Moode I have been giving instructions to enable I2C by including 'i2c-dev' in '/etc/modules', which does create the device entry, but appears to be discouraged on Raspberry Pi OS, and the '/etc/modules' file gets reset by Moode upgrades. I notice that the Moode code includes a 'modprobe i2c-dev', but I don't know if this is old code or is used because the dtparam method does not (always?) work on Moode.
Adrian.
I was looking some more at how to enable I2C on Moode 7.2.1.
'/boot/config.txt' contains a line
Code:
dtparam=i2c_arm=on
It seems that this line is supposed to create the device entry /dev/i2c-1 and, also, is the recommended method to do so on Raspberry Pi OS.
Running Moode on a PI Zero this line doesn't create the entry. Similarly, running
Code:
sudo dtparam i2c_arm=on
does not set up the entry. However, I just logged into a Pi 4 running Raspberry Pi OS and without I2C enabled and ran that command and the device entry was created.
On Moode I have been giving instructions to enable I2C by including 'i2c-dev' in '/etc/modules', which does create the device entry, but appears to be discouraged on Raspberry Pi OS, and the '/etc/modules' file gets reset by Moode upgrades. I notice that the Moode code includes a 'modprobe i2c-dev', but I don't know if this is old code or is used because the dtparam method does not (always?) work on Moode.
Adrian.