/
Docker Setup on RevPi Devices

Docker Setup on RevPi Devices

If you would like to learn how easy it is to access the processor image via Docker using a simple example, this is the right place to start.

With a Revolution Pi Connect module and a DIO module, an output is controlled via Docker.

Ansible BETA

Not Support

This is a BETA! If you have any suggestions for improvement, please let us know.

You can also run the example with Ansible.

How to install and use Ansible: https://kunbus-gmbh.atlassian.net/servicedesk/customer/portal/1/article/2761523271?src=1748937706

Git Repo: https://github.com/RevolutionPi/revpi-ansible-recipes/tree/docker-io

Currently, only for RevPi Connect (+)!

Preparation

  • Create a hardware configuration using RevPi Connect Module and DIO Module

  • Connect a 24V LED to DIO output 1 or output 2

  • Install Docker

curl -fsSL https://get.docker.com -o /tmp/get-docker.sh sudo sh /tmp/get-docker.sh sudo docker run hello-world sudo usermod -aG docker pi # restart shell exit
  •  Create this file

#/bin/bash # io.sh #$1: file #$2: offset #$3: length #$4: value function writeByte() { printf "$(printf '\\x%02X' $4)" | dd of="$1" bs=1 seek=$2 count=$3 conv=notrunc &> /dev/null } #$1: file #$2: offset #$3: length function readByte() { od -t x1 -j "$2" -N "$3" -Ad "$1" } echo "write 0 to address $1 in host $(hostname)..." writeByte /dev/piControl0 $1 1 0 echo "read address $1 in host $(hostname):" readByte /dev/piControl0 $1 1 echo sleep 1 echo echo "write 1 to address $1 in host $(hostname)..." # value 3 => Pins 1 and 2 writeByte /dev/piControl0 $1 1 3 echo "read address $1 in host $(hostname):" readByte "/dev/piControl0" $1 1

Run the example

the following example could look different depending on the configuration

Run the command:

piTest -v O_1

take the variable offset (70)

Execute the following command – the parameter “70” points to the outputs of the DIO module.

The 24V LED should blink once.

Related content

logi.cals FAQ
Read with this
Node-RED Tutorial
Node-RED Tutorial
More like this
GATEWAY Module for PROFIBUS FAQ
GATEWAY Module for PROFIBUS FAQ
Read with this
Revolution Pi Questions And Answers
Revolution Pi Questions And Answers
More like this
GATEWAY Module for EtherCAT FAQ
GATEWAY Module for EtherCAT FAQ
Read with this
Commissioning RevPi MIO
Commissioning RevPi MIO
More like this