Accessing the compass programmatically
Now that the device is connected, you'll need to configure access via the software. Here are the steps:
- In order to access the compass capability, you'll need to enable the I2C library on Raspberry Pi Zero. To enable this bus, run
sudo raspi-config and select 9 Advanced Options, as follows:
- Then go to the A7 I2C selection and enable the I2C, as shown in the following screenshot:
- Select Yes to enable the I2C interface, as shown in the following screenshot:
- Select OK on the next screen, then Yes on the screen that ...