# Ignition and Raspberry Pi GPIO

**URL:** <https://forum.inductiveautomation.com/t/ignition-and-raspberry-pi-gpio/37306>\
**Category:** Ignition\
**Created:** [August 3, 2020, 6:45am UTC](https://forum.inductiveautomation.com/t/ignition-and-raspberry-pi-gpio/37306 "2020-08-03T06:45:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![iluntasun](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@iluntasun](https://forum.inductiveautomation.com/u/iluntasun)\
**Post date:** [August 3, 2020, 6:45am UTC](https://forum.inductiveautomation.com/t/ignition-and-raspberry-pi-gpio/37306/1 "2020-08-03T06:45:58Z")

</div>

Hello all,

With Maker Edition out, I finally decided to play with the Pi and Ignition. The first thing I thought of was to do a small test and try a button to light up an LED with the built-in GPIO. Not so easy.  
First, I tried to import the gpiozero library to use it from Ignition’s python (jython). I found several issues and got discouraged.  
Then I thought of using a socket server/client communication scheme. This went better, but I had some issues too.  
Now, before I go with all the details, logs, code and so on, I would like to ask the question: is anybody else doing something like this? Have you been successful with any of the methods above? Or is there a better way I am unaware of?

Thanks,  
Tana

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [August 3, 2020, 9:30am UTC](https://forum.inductiveautomation.com/t/ignition-and-raspberry-pi-gpio/37306/2 "2020-08-03T09:30:10Z")

</div>

The easiest would probably be to install an OPC UA server on the RPi. And connect to that server with Ignition.

See this article as example: [https://www.kalycito.com/running-opcua-on-raspberry-pi/](https://www.kalycito.com/running-opcua-on-raspberry-pi/) (you don’t need to install a client, Ignition will be the client)

---

<div class="post-metadata">

**Author:** ![iluntasun](https://avatars.discourse-cdn.com/v4/letter/i/c67d28/32.png) [@iluntasun](https://forum.inductiveautomation.com/u/iluntasun)\
**Post date:** [August 3, 2020, 11:21pm UTC](https://forum.inductiveautomation.com/t/ignition-and-raspberry-pi-gpio/37306/3 "2020-08-03T23:21:07Z")

</div>

Thank you for your answer! I have been toying with this for a few minutes now. It looks really interesting, but it is not quite what I was looking for. Firstly, I don’t really need a full-fledged OPC-UA server for what I want to try. Secondly, by what I can see, it requires a touch of C programming (which I haven’t touched in 20 years!). It is definitely a possibility, though.

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [August 4, 2020, 6:38am UTC](https://forum.inductiveautomation.com/t/ignition-and-raspberry-pi-gpio/37306/4 "2020-08-04T06:38:21Z")

</div>

The alternative is making a driver module using a Java GPIO library (like PI4J).

That driver could then provide the pins as tags.

If you want to stick to scripting, you could include a Java library in Ignition, and call to that. see [Adding java custom classes to Ignition](http://forum.inductiveautomation.com/t/adding-java-custom-classes-to-ignition/15202) . Or you could use OS calls to shell program that can communicate with the GPIO.
