Right now, Blinka only supports the Odroid C2 (because that's the only board we've got for testing).

At any time after armbian is installed, it's easy to tell what board you have: simply cat /etc/armbian-release and look for BOARD_NAME

Install ARMbian on your Odroid C2

We're only going to be using armbian, other distros could be made to work but you'd probably need to figure out how to detect the platform since we rely on /etc/armbian-release existing. Using other operating systems and CircuitPython is your call, we cannot provide support for that.

Download and install the latest armbian, for example we're using https://www.armbian.com/odroid-c2/

There's some documentation to get started at https://docs.armbian.com/User-Guide_Getting-Started/

Blinka only supports ARMbian because that's the most stable OS we could find and it's easy to detect which board you have

Logging in

We've found the easiest way to connect is through a console cable, wired to the UART Serial port, and then on your computer, use a serial monitor at 115200 baud.

The cable is easiest way ever to connect to your microcontroller/Raspberry Pi/WiFi router serial console port. Inside the big USB plug is a USB<->Serial conversion chip and at...
In Stock

Once powered correctly and with the right SD card you should get a login prompt

After logging in you may be asked to create a new username, we recommend pi - if our instructions end up adding gpio access for the pi user, you can copy and paste them.

Once installed, you may want to enable mdns so you can ssh [email protected]  instead of needing to know the IP address:

  • sudo apt-get install avahi-daemon

then reboot

Set your Python install to Python 3 Default

There's a few ways to do this, we recommend something like this:

  • sudo apt-get install -y python3 git python3-pip
  • sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
  • sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2
  • sudo update-alternatives --config python

Of course, change the version numbers if a newer version of Python is distributed.

Update Your Board and Python

Run the standard updates:

sudo apt-get update

sudo apt-get upgrade


sudo pip3 install --upgrade setuptools

Update all your Python 3 packages with

pip3 freeze - local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U


sudo bash

pip3 freeze - local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U

Install libgpiod

libgpiod is what we use for gpio toggling, it doesn't come in installations yet but it's easy to add by running our script. You'll probably need to run this as root, so sudo bash before you...

  • cd ~
  • wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/libgpiod.sh
  • chmod +x libgpiod.sh
  • ./libgpiod.sh

After installation, you should be able to import gpiod from within Python 3:

Enable UART, I2C and SPI

A vast number of our CircuitPython drivers use UART, I2C and SPI for interfacing, so you'll want to get those enabled.

You only have to do this once per board, unfortunately by default all three interfaces are disabled!

Install the support software with:

  • sudo apt-get install -y python-smbus python-dev i2c-tools
  • sudo adduser pi i2c

The Odroid C2 does not have a hardware peripheral, but I2C is enabled by default, so if you run ls /dev/i2c*

You should see at least one i2c device.

Because the Odroid C2 is a newer board, currently /dev/ttyAML1 isn't working properly.

The UART Serial Port on the Odroid C2 is connected to /dev/ttyAML0. To enable the GPIO UART, edit /boot/armbianEnv.txt and add this line to the end.


After you have rebooted, verify that /dev/ttyAML1 is now enabled by typing: 

ls /dev/ttyA*

Even though the Odroid C2 has SPI, both of the hardware CS lines are in use making it unavailable

Install Python Libraries

Now you're ready to install all the Python support.

Run the following command to install wheel and flask:

sudo pip3 install wheel flask

Next, run the following command to install adafruit_blinka:

sudo pip3 install adafruit-blinka

The computer will install a few different libraries such as adafruit-pureio (our ioctl-only i2c library),  Adafruit-GPIO (for detecting your board) and of course adafruit-blinka.

That's pretty much it! You're now ready to test.

Create a new file called blinkatest.py with nano or your favorite text editor and put the following in:

import board
import digitalio
import busio

print("Hello blinka!")

# Try to great a Digital input
pin = digitalio.DigitalInOut(board.D7)
print("Digital IO ok!")

# Try to create an I2C device
i2c = busio.I2C(board.SCL, board.SDA)
print("I2C ok!")

# Try to create an SPI device
spi = busio.SPI(board.SCLK, board.MOSI, board.MISO)
print("SPI ok!")


Save it and run at the command line with

sudo python3 blinkatest.py

You should see the following, indicating digital i/o, I2C and SPI all worked

This guide was first published on Jun 16, 2019. It was last updated on Jun 16, 2019.

This page (Initial Setup) was last updated on Dec 04, 2021.

Text editor powered by tinymce.