What is it?
If there’s a requirement to attach equipment to machines, one possible method would be to consider using an RS-232 interface.
RS-232 is a serial interface that can have a minimum of two or three wires (depending on if you need single direction or bidirectional communication!) with voltage levels of up to around +15V and -15V.
Once the connections have been made, it is possible to easily send and receive data using Linux, by using the /lib/ttyUSB0 device on the M.2 Eval System.
Connections on the M.2 Eval System
The Axelera M.2 Eval System has a connector that exposes this interface. The photo here shows the pin connections.

Note that the connector also has a 5V supply output, but it’s best to avoid using that. The board could easily be damaged if too much current is attempted to be drawn from the 5V output. I don't know the limit, so personally I would not use it at all, or, restrict usage to just 10-20 mA.
The connector has a 2mm pitch pin spacing. I didn’t have a mating connector, so I soldered wires.

Interfacing to a Microcontroller
The RS-232 voltage levels cannot directly connect to a microcontroller.
An RS-232 transceiver board such as Adafruit RS232 Pal is used to convert to the levels, and automatically invert the signal, to become suitable for a microcontroller.
Source Code
Here is an example SerialComms.py file, which can be used to send text data.
To use, type:
python SerialComms.py "Hello there"
Alternatively, use it from within Python code:
from SerialComms import SerialComms
comms = SerialComms()
comms.send("Hello there")
Thanks for reading!