About RevPiModIO

We heard of an “Open Source IPC based on the Raspberry Pi” called RevolutionPi and wanted to learn more about it!

After some tests and “playing around” with this system, the first serious applications for the industrial application already emerged!

The hardware configuration is done via a web page, which is located on the PiCore module. The program is called “piCtory”.

All inputs and outputs can be assigned symbolic names to facilitate their handling and programming. If this configuration is created and activated, the data of the input, output and gateway modules are exchanged via a 4096-byte process image.

If you want to write a program with Python3, you can open this process image with a FileHandler and read / write those data of the modules. However, the symbolic names are not available there and you have to search for the individual bits of the IOs in the bytes themselves … calculate … read … write … … …

But this is exactly where our python3-revpimodio2 module comes into play!

When used in Python, it uses the piCtory configuration to create all the inputs and outputs with their symbolic names as objects. The programmer can address these directly via the symbolic names and access the values of the inputs and outputs – both reading and writing!

# Wenn Eingang t_an aktiv ist, wird Ausgang h_an gesetzt

if rpi.io.t_an.value:
    rpi.io.h_an.value = True

In addition, it provides the developer with many useful functions that can be used to develop cyclic or event-based programs.

If you know the .add_event_detect(...) function of the GPIO module from the Raspberry Pi, you can also achieve this behavior with the Revolution Pi:

def event_detect(ioname, iovalue):
    rpi.io.h_an.value = iovalue
    print(ioname, iovalue)

# Ereignisfunktion an Eingang t_an koppeln

Even with hardware changes, but constant names of the inputs and outputs, the actual Python3 source code does not need to be changed!


With this module we want to spare all Python developers a lot of work. All communication with the process image is optimally performed inside the module. Changes to the inputs and outputs are also evaluated along with the additional functions of the module give the developer many tools along the way.