Skip to main content

Development of Drivers

There are many devices which can be connected to the Raspberry Pi. CODESYS Control for Raspberry Pi supports only a small part of the available hardware. If you want to connect an unsupported device to your Raspberry Pi, then you can write your own I/O driver. To do this, you will need some configuration and programming skills.

Basically, you can take the following approaches to connect and operate additional devices via the system interfaces I2C, SPI (Serial Peripheral Interface) or 1-Wire.

  • Implement a function block (FB)

    The function block handles the mapping of the data to existing or new variables and ensures cycle consistency of the data. To do this, manually declare the interface and call an instance in the program.

  • Implement a function block (FB) with a device description

    Then you can add a special device to the CODESYS device tree and configure it.

  • Implement I/O drivers

These and other approaches are described on the open-source CODESYS Forge platform in the Drivers → I/O Drivers menu.