Once you have the OS loaded, you will need to get to a terminal window and run a few commands that will help you out. Sometimes getting to a terminal is the trickiest part and it really depends on your specific board. Popular options include using SSH, connecting a USB to TTL Serial cable to some GPIO pins, or just connecting a display and keyboard directly to the board.
If you want to connect with a USB to TTL serial cable, we offer a few different cables, but either of these should cover most of your needs.
The next step is to make sure your board is connected to a network, either by an ethernet cable or WiFi.
Some boards such as the Raspberry Pi have SSH disabled by default and you will need to either run a config utility or some other method to enable SSH, such as adding a specific empty file, otherwise all attempts will be denied. This is something you will need to check with the OS or manufacturer if you are not sure. For the Armbian on the Pine64, it is already enabled by default, so we don't need to worry.
Even if you don't plan on using SSH to connect to the terminal, it's still a good idea to enable it so that you can copy your updated PlatformDetect files over easily by FTP if you choose to do so.
Run the standard updates:
sudo apt-get update
sudo apt-get upgrade
sudo pip3 install --upgrade setuptools
If above doesn't work try
sudo apt-get install python3-pip
If you prefer to use SSH, you may need to connect with one of the alternative methods or lookup the IP address on your router first. Then once you're in, you can enable Multicast DNS if it is not done already, so you can connect without needing to know the IP address:
sudo apt-get install avahi-daemon
You'll want to make sure you have installed git so that you can clone PlatformDetect right onto your SBC.
sudo apt-get install git
The default Python on your computer may not be Python 3. Python 2 is officially discontinued and all our libraries are Python 3 only.
We'll be using
pip3 in our commands, use those versions of Python and pip to make sure you're using 3 and not 2.
Step 1 - Fork PlatformDetect to your GitHub account
If you don't already have the code from Adafruit_Python_PlatformDetect forked to your local GitHub repository, you'll want to start off by doing that. If you are not sure how to use GitHub, we have an excellent guide available on using Git and GitHub.
Step 2 - git clone the PlatformDetect fork to your single board computer
Once you have forked it, you can clone the repository both onto your local computer and onto your SBC. By using your local repository as a copy point, this makes things really easy. If you'd prefer to just edit right on your SBC and commit from there, you can do that too. In this guide, we'll assume you cloned it to your home directory on your SBC.
Some other options for copying over the files include using SFTP and an FTP client such as FileZilla or SCP. However, you decide to do it, the guide will assume that you have a copy of the repository in your home directory and that it is located inside the folder ~/Adafruit_Python_PlatformDetect.