Using I2C with SMBus and Armbian Linux on the Orange Pi

his page details how to setup I2C support on the Armbian image from https://www.armbian.com for your Orange Pi computer.

When first booting the new operating system you will be prompted to login as root, the default settings are:

Username: root

Password: 1234

You will be asked to update your root password and then create a new user.

Follow prompts to add a new user, for ease of use we are using “pi” as the username and you can set your own password.

Step 1: Download the latest Armbian linux image for your Orange Pi model and burn to your SD Card following the instructions on http://elinux.org/RPi_Easy_SD_Card_Setup

Step 2: Next you need to update your Orange Pi to ensure all the latest packages are installed:

sudo apt-get update
sudo apt-get upgrade

Step 3 a:  Once you have logged into your Orange Pi from the command line, run the following command to install SMBus and Python Dev:

sudo apt-get install python-smbus python-dev

Step 4:  From the command line, run the following command to install i2c-tools:

sudo apt-get install i2c-tools

Step 5: Set the Raspberry Pi to start I2C automatically at boot by editing /etc/modules :

sudo nano /etc/modules

Use your cursor keys to move to the last line and add a new line and then add:

i2c-dev

Save your changes and exit the nano editor.

Step 6: To avoid having to run the I2C tools at root add the ‘pi’ user to the I2C group:

sudo adduser pi i2c

Step 9: Next reboot the Orange Pi:

sudo reboot

When your Orange Pi has rebooted you will now have I2C and SMBus Python 2 support.

Source: Using I2C with SMBus and Armbian Linux on the Orange Pi

Using I2C with SMBus and Armbian Linux on the Orange Pi was last modified: July 13th, 2017 by Jovan Stosic