A:
You can enable the I2C function of Raspberry Pi.
The way to enable the I2C function is different
on each OS.
Here are the examples for Raspberry Pi OS and Ubuntu OS as below.
■ For Raspberry Pi OS
You can enable the I2C function on GUI or CUI.
This information is confirmed on Raspberry Pi OS August 2020.
1.When enabling with GUI
(1) Select "Preference" ⇒ "Raspberry
Pi Configuration".
(2) Set "I2C" to "Enable"
in "Interface", click OK, and then restart.
2.When enabling with CUI
(1) Please execute the following command.
sudo raspi-config
(2) The setting screen of Raspberry Pi opens. Select "5. Interfacing Options" and select "I2C" in the displayed items.
(3) Select "I2C" and press "YES". The menu screen will reappear, so select <Finish>.
(4) Please restart your Raspberry Pi.
(5) After restarting, execute the following
command.
ls / dev / * i2c *
If the
following is displayed after execution, I2C is enabled.
/dev / i2c-1
■ For Ubuntu OS
Ubuntu 20.04.01 LTS Server Enabled by default.