Enable I2C Interface¶
Here we are using the Raspberry Pi’s I2C interfaces, but by default they are disabled, so we need to enable them first.
Input the following command:
sudo raspi-config
Choose 3 Interfacing Options by press the down arrow key on your keyboard, then press the Enter key.
Then P5 I2C.
Use the arrow keys on the keyboard to select <Yes> -> <OK> to complete the setup of the I2C.
After you select <Finish>, a pop-up will remind you that you need to reboot for the settings to take effect, select <Yes>.