Skip to content

Software Setup — Raspberry Pi

Welcome to the software setup guide for Industrial Shields Raspberry Pi-based devices. This document is intended to help you set up the development environment for the following device families:

  • Raspberry Pi PLC

  • GateBerry PLC

  • TouchBerry Pi Panel PC

Operating System

All the Raspberry Pi-based Industrial Shields devices use Raspberry Pi OS as their default operative system, which is preinstalled on the SD cards included with the devices. When the device is powered on, it automatically boots the operating system.

Based on the default Raspberry Pi OS images provided by Raspberry, Industrial Shields prepares these images with the necessary configuration and libraries for the devices to work properly.

The latest images published by Industrial Shields for each device are:

Device Family Raspberry Pi OS version Bits GUI
Raspberry Pi PLC Trixie 64 Headless
GateBerry PLC Trixie 64 Headless
TouchBerry Pi Panel PC Trixie 64 Desktop

Alternative or older OS images

The image preinstalled on a device depends on its manufacturing date. The latest image, alternative images (with desktop, etc.) and older versions can be downloaded from the Industrial Shields image server.

Accessing the device

There are essentially two ways of accessing the Raspberry Pi:

  • SSH (recommended): access the device from your PC via Ethernet.
  • Direct access: connect a screen and a keyboard to the device using the Micro HDMI and the USB ports, respectively.

Regardless of the method being used, valid username and password credentials must be supplied to access the device. The OS has a preconfigured default user to make the device easily accessible out of the box:

  • Username: pi
  • Password: raspberry

Default Password

For security reasons, the default password should always be changed. After accessing the device for the first time, use the passwd command to set a new one.

Follow the preferred method:

SSH

Secure Shell is a cryptographic network protocol that provides a secure and encrypted way to access and manage remote computers and servers over a potentially unsecured network, such as the internet. Using it, the command-line interface of the Raspberry can be accessed remotely from another PC.

Requirements

  • PC
  • Ethernet (RJ45) cable

Industrial Shields devices are prepared to be easily accessible out of the box. For this purpose, the Ethernet ports are configured with the following addresses:

  • Ethernet 0 (eth0): 10.10.10.20/24
  • Ethernet 1 (eth1): 10.10.11.20/24 (only available on Raspberry PLC)

Identifying the port

The port numbers are labelled on the device, for easy identification.

To access the device, follow the steps:

  1. Power on the device.

  2. Connect the PC directly to the device, using an Ethernet (RJ45) cable.

  3. Configure the PC network interface to be on the same subnet, according to the port being used.

    Example: Ethernet 0 port

    To connect using the Ethernet 0 port, configure the PC network interface with these parameters:

    • IP: 10.10.10.21.
    • Subnet mask: 255.255.255.0
  4. Open a terminal on GNU/Linux or MacOS, or the PowerShell if you are using Windows, and use the following command to open an SSH session:

# ssh user@address
ssh [email protected]

Industrial Shields devices based on the Raspberry Pi can be operated directly, using a connected display and a keyboard.

Requirements

  • Micro HDMI cable.
  • USB keyboard.

TouchBerry access

In the Touchberry's case, as the display is integrated on the device, only a USB keyboard is needed.

To access the device, follow the steps:

  1. Connect the display cable to one of the Micro HDMI connectors of the device.

  2. Connect the keyboard (or another peripheral, e.g. a mouse) to the device USB ports.

  3. Power on the device.

The device will boot to a terminal or, in the TouchBerry's case, the desktop environment. Use the default credentials to access the system.

Initial Tests: IO scripts

The default OS image provided by Industrial Shields includes a directory with the following scripts to quickly test the IO of the device:

  • analogBlink
  • analogBlinkAll
  • analogRead
  • digitalRead
  • digitalBlink
  • digitalBlinkAll
  • get-analog-input
  • get-digital-input
  • set-analog-output
  • set-digital-output
  • set-pwm-output
  • delay

Detailed information about each script, their arguments and usage, as well as how to build them or install them is explained on the librpiplc GitHub repository.

The proper script must be used for each device, according to the model and version. The tests for each model and version are organized within a hierarchical directory structure.

Example: digital output

To activate the Q0.0 digital output of a Raspberry PLC 21, version 6, use the script like this:

$ ~/test/RPIPLC_V6/RPIPLC_21/set-digital-output Q0.0 1

Programming Support

In order to interact with the IO and other peripherals of the device, only the following programming languages are supported, for which Industrial Shields provides the necessary libraries and resources.

Choose the option you prefer to get started: