Skip to content

Install and configure

epsilonrt edited this page Oct 8, 2024 · 8 revisions

Installation from repository

The fastest and safest way to install piduino on Armbian is to use the APT repository from piduino.org, so you should do the following :

wget -O- http://www.piduino.org/piduino-key.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/piduino-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/piduino-archive-keyring.gpg] http://apt.piduino.org buster piduino" | sudo tee /etc/apt/sources.list.d/piduino.list
sudo apt update
sudo apt install libpiduino-dev piduino-utils

This repository provides Piduino packages for armhf and arm64 architectures. In the above commands, the repository is a Debian Buster distribution, but you can also choose another distribution by replacing buster with bullseye, bookworm, xenial, trusty, bionic, focal, jammy.
For Raspbian you have to do a little different :

wget -O- http://www.piduino.org/piduino-key.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/piduino-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/piduino-archive-keyring.gpg] http://raspbian.piduino.org buster piduino" | sudo tee /etc/apt/sources.list.d/piduino.list
sudo apt update
sudo apt install libpiduino-dev piduino-utils

The Raspbian repository provides Piduino packages for armhf architecture for Stretch and Buster only.

Configuration

The PI board model is dynamically detected when starting the Piduino program by comparing the signature of the board with the database.

It is possible to force the Pi model choice by using the /etc/piduino.conf configuration file.

This may be necessary when it is not possible for the program to detect the configuration of the board.

For example, in the case of the NanoPi Neo Core/Core2, we can indicate that the board is on its shield, in this case, the display of the connector by the command pido readall will be adapted.

Pi board model detection uses two methods:

  • The first method, which applies to Raspberry Pi boards, reads the /proc/cpuinfo file to get the microprocessor model in the Hardware field and especially the Revision field. This revision number is compared with the database to deduce the RaspberryPi model.
  • The second method, which applies to boards using ArmBian, comes from reading /etc/armbian-release or /etc/friendlyelec-release to get board model in BOARD. We compare this signature with the database to deduce the RaspberryPi model.

In the /etc/piduino.conf configuration file, we will find these two possibilities, which must be filled in (one or the other, but never the two!).

For example if we want to indicate that our NanoPi Neo Core2 is installed on its shield, we will put the tag field value nanopineocore2shield:

# PiDuino configuration file
connection_info="sqlite3:db=/usr/local/share/piduino/piduino.db"

# Allows you to force the board tag (Armbian)
# !! Be careful, this is at your own risk !!
# !! Forcing an incorrect value may destroy GPIO pins !!
tag="nanopineocore2shield"

# Allows forcing the revision of the board (Raspbian)
# !! Be careful, this is at your own risk !!
# !! Forcing an incorrect value may destroy GPIO pins !!
#revision=0xa02082

It can be seen that the configuration file also contains the address of the database to use. The database is by default a local SQLite3 file, but the database can be installed on a MySQL server for example (for the format of the connection_info line see the documentation of CPPDB)

Clone this wiki locally