* This page is a 4 minute read.
** I will be using the Orange Pi Zero 2W for the purposes of this guide.
Faster to just read the README
, but here.
I felt that the Debian image for the Orange Pi Zero 2W was a bit wonky, so I thought a pure Armbian image might be worth looking into.
These instructions will work without adjustment for many Orange Pi boards. This applies more to the wiringOP side of things (necessary for GPIO to work), as opposed to Armbian (which is easy to get up and running).
Should work on β :
- Orange Pi Zero 2W
- Orange Pi 5 Plus
- Orange Pi Zero 3
Known to not work β:
- Orange Pi PC Plus
- Download your preferred image from Armbian.
- Burn the image onto a microSD card using something like USBImager.
π For those who are not going headless, you have the option of skipping steps 1 and 2.
I will be doing a headless
setup, so I need the Wifi to connect automatically on boot. Armbian lets you PRESET
certain things, you can find the full list here. I'll be setting up the Wifi, and making other adjustments as well (you don't need to though).
- On your previously imaged microSD card, edit the file
/root/.not_logged_in_yet
. π In linux, you will needroot
privileges to edit this file. - These are the file contents. You must adjust to your needs:
# Required
PRESET_NET_CHANGE_DEFAULTS=1
# If both WIFI and ETHERNET are enabled, WiFi will take priority and Ethernet will be disabled.
PRESET_NET_WIFI_ENABLED=1
# Just as an example
PRESET_NET_ETHERNET_ENABLED=1
PRESET_NET_WIFI_SSID='Wifi network name'
PRESET_NET_WIFI_KEY='Wifi password'
# https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes
PRESET_NET_WIFI_COUNTRYCODE='CA'
# Yes, the following is correct, if you want Wifi to connect automatically
PRESET_CONNECT_WIRELESS=n
# Optional
SET_LANG_BASED_ON_LOCATION=n
# Do not change en_US.UTF-8, or it will lead to an error with user creation
PRESET_LOCALE=en_US.UTF-8
# Type `timedatectl list-timezones` in a linux terminal
PRESET_TIMEZONE=America/Toronto
# Armbian default root password is 1234
PRESET_ROOT_PASSWORD=tester123
# Adds a new user to the `sudo` group
PRESET_USER_NAME=opi
PRESET_USER_PASSWORD=tester123
PRESET_DEFAULT_REALNAME=OrangePi
- Boot the device with the microSD card (first boot takes longer).
SSH
into the device:ssh [email protected]
.- Do a full update and reboot.
sudo apt update && sudo apt full-upgrade --yes
sudo reboot now
To be able to use the GPIO pins, certain packages must be installed.
π You can find installation instructions for your particular Orange Pi board on the Orange Pi Wiki.
Original instructions source.
cd ~
sudo apt update && sudo apt install git
git clone https://github.com/orangepi-xunlong/wiringOP.git -b next
cd ~/wiringOP
sudo ./build clean
sudo ./build
gpio readall
* Will vary depending on your device
Original instructions source.
sudo apt install swig python3-dev python3-setuptools
cd ~
git clone --recursive https://github.com/orangepi-xunlong/wiringOP-Python -b next
cd wiringOP-Python
git submodule update --init --remote
python3 generate-bindings.py > bindings.i
sudo python3 setup.py install
python3 -c "import wiringpi; help(wiringpi)"
Help on module wiringpi:
NAME
wiringpi
DESCRIPTION
# This file was automatically generated by SWIG (https://www.swig.org).
# Version 4.1.0
...
π If you've made it this far with the expected outputs
, your Orange Pi is good to go! π
Please star β the repo!
armbian-config
- You can use this to configure your device.
armbianmonitor
- This is particularly useful if you want to see CPU speed, temperatures, etc.