Forums for specific products (others supported  here)
NIOT-E-NPIX-4DI4DO with netpi-netx container - Printable Version

+- Forums for specific products (others supported here) (
+-- Forum: netPI - Ruggedized Industrial Ethernet Raspberry Pi (
+--- Forum: Software (
+--- Thread: NIOT-E-NPIX-4DI4DO with netpi-netx container (/thread-651.html)

NIOT-E-NPIX-4DI4DO with netpi-netx container - WalterSchaefer - October-16th-2020

Hello Armin.
I use NIOT-E-NPI3-51-EN-RE with NIOT-E-NPIX-4DI4DO module inserted.
I work with profinet, thats why  ntpi-netx-programming-examples container is installed.
Now I need access to 4DI4DO.
1. Where can I find GPIO numbers, to which this module is connected?

2. How can I get access to GPIOs from ntpi-netx-programming-examples container? (preferably from C++ code). Do I need to install wiring-pi?

Thank you.
Best regards,

RE: NIOT-E-NPIX-4DI4DO with ntpi-netx container - Armin@netPI - October-16th-2020


all documents around netPI can be found here: There you find also a common documentation for NPIX modules and also which GPIOs are physically connected it.

In order to show how NPIX modules can be used in the context of netPI I made a Node-RED (this is my preferred "language" doing it in node.js/javascript) container which includes two Node-RED nodes to read and write the NPIX IOs. The container is located here

In detail the source code of the Node-RED npix-io nodes used in this container is located here

To grant access in general to GPIOs within a Docker container the device

needs to be mapped to the container independent which application wants to access the GPIOs. After mapping this device the GPIOs are automatically generated in the container following path as it is usual for Linux GPIOs


Of course you could also read/write to GPIOs directly from a Linux shell as described here: with a simple command like the following:

echo 0/1 > /sys/class/gpio/gpioxx/value

There are also other examples on the web showing how to use Raspberry Pi GPIOs with languages like python, C or C++. netPI contains a standard Raspberry Pi 3B circuitry and everything you find on the web related to GPIOs is applicable. I personally can't give you a link how to do it in C++. I found this web page here with google search, but I don't know if it is good for you. It might be that my reply for you as a C++ programmer might be just useful for you to get to know the used GPIOs only.


RE: NIOT-E-NPIX-4DI4DO with ntpi-netx container - WalterSchaefer - October-17th-2020

Thank you, Armin.
That works!

Best regards,