This is an old revision of the document!
SysFS
The SysFS driver is still under development. Please report any issues or feature requests.
Patron
Neuron
Axon
SysFS driver included in the kernel module for all Unipi units with I/O (except Unipi 1.1) provides easy file-based access to all inputs and outputs of the unit. Check the following examples to get started:
Set state of DO to 1
echo 1 > /sys/devices/platform/unipi_plc/io_group1/do_1_01/do_value
Read the state of DI
cat /sys/devices/platform/unipi_plc/io_group1/di_1_01/di_value
All IOs can be accessed similarly.
Further documentation can be found here: https://git.unipi.technology/UniPi/unipi-kernel/blob/master/docs/sysfs-platform-unipi.txt