# GPIO howto?

**URL:** <https://casparcgforum.org/t/gpio-howto/507>\
**Category:** General\
**Created:** [July 21, 2018, 12:51am UTC](https://casparcgforum.org/t/gpio-howto/507 "2018-07-21T00:51:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![kthelen](https://casparcgforum.org/letter_avatar_proxy/v4/letter/k/ccd318/32.png) [@kthelen](https://casparcgforum.org/u/kthelen)\
**Post date:** [July 21, 2018, 12:51am UTC](https://casparcgforum.org/t/gpio-howto/507/1 "2018-07-21T00:51:57Z")

</div>

Can someone explain to me how GPIO with CasparCG works? What hardware is usually used, and how is the software configured/implemented? I’d look at the wiki, but it seems it no longer exists.

Specifically, what I’m hoping/trying to do:

- close contact #1, run a given command (ie. ‘clear 1’)
- close contact #2, run another given command (ie. ‘play 1-10 myfile’)
- close contact #3, run a few commands (ie. ‘play 1-10 someotherfile’, ‘mixer 1-10 opacity 0.5’, ‘play 1-11 [html] “[http://myserver/myfile.html](http://myserver/myfile.html)”’)

I know I could write a custom client using hardware/software of my choice, but I suspect there’s already a solution for this, and would rather avoid reinventing the wheel.

Thanks!

–Keith

---

<div class="post-metadata">

**Author:** ![zcybercomputing](https://casparcgforum.org/letter_avatar_proxy/v4/letter/z/e9bcb4/32.png) [@zcybercomputing](https://casparcgforum.org/u/zcybercomputing)\
**Post date:** [July 22, 2018, 10:44pm UTC](https://casparcgforum.org/t/gpio-howto/507/2 "2018-07-22T22:44:34Z")

</div>

The CasparCG client has GPIO built in, and it appears like it is set up to connect a GPIO board to a serial port on the computer. I have not investigated beyond that, but there does appear to be code for that. Hopefully someone else on here can comment before I have to read the relevant source code to figure it out…

---

<div class="post-metadata">

**Author:** ![jstarpl](https://casparcgforum.org/user_avatar/casparcgforum.org/jstarpl/32/16_2.png) [@jstarpl](https://casparcgforum.org/u/jstarpl)\
**Post date:** [July 24, 2018, 8:48am UTC](https://casparcgforum.org/t/gpio-howto/507/3 "2018-07-24T08:48:27Z")

</div>

The GPIO feature in the Client uses an Arduino interface - you can find the sketch here: [https://github.com/CasparCG/Tools/tree/master/cpp/gpio/trunk](https://github.com/CasparCG/Tools/tree/master/cpp/gpio/trunk)

- GPI triggers playlist events: Load, Play, Stop, etc. and is configurable in the settings (triggers events on the currently selected item, it must also have “Allow GPI” enabled)
- GPO can be triggered from the playlist the same way as other items

---

<div class="post-metadata">

**Author:** ![eskojua](https://casparcgforum.org/user_avatar/casparcgforum.org/eskojua/32/100_2.png) [@eskojua](https://casparcgforum.org/u/eskojua)\
**Post date:** [July 24, 2018, 10:27am UTC](https://casparcgforum.org/t/gpio-howto/507/4 "2018-07-24T10:27:10Z")

</div>

Or IOCore device  
[http://www.theatrixx.com/en/product/IOCORE/](http://www.theatrixx.com/en/product/IOCORE/)

---

<div class="post-metadata">

**Author:** ![peteraellig](https://casparcgforum.org/user_avatar/casparcgforum.org/peteraellig/32/279_2.png) [@peteraellig](https://casparcgforum.org/u/peteraellig)\
**Post date:** [July 25, 2018, 3:53pm UTC](https://casparcgforum.org/t/gpio-howto/507/5 "2018-07-25T15:53:04Z")

</div>

Hi  
I wrote a small GPIO windows client that can run beside the Caspar client.

 ![Code](https://casparcgforum.org/uploads/default/original/1X/af946940da9f8af83681cc95e21a6f8407e15400.jpg)  
It uses a cheap USB GPIO Module from Numato (8-Port, 24$), no drivers needed.  
[https://numato.com/product-category/automation/gpio-modules/usb-gpio](https://numato.com/product-category/automation/gpio-modules/usb-gpio)  
check windows system control for the USB COMPORT. You can test the software without the Interface.  
 ![GPIO%20COMPORT](https://casparcgforum.org/uploads/default/original/1X/f49d4446f3949763e5d8366091dea444587bda39.JPG)

you can prepare 8 caspar commands, they are triggered from the interface.

Exe and Source files here.  
[Exe and Source](https://drive.google.com/open?id=1TVkcPANjBBonsIr0C2doqF8-o4Qd2jja)  
please put the .dll in the same folder as the executable.

in the folder is a schematic diagram for my interface (2 channels used only), it was drawed last year, the interface was a bit cheaper then ☹  
 ![gpio](https://casparcgforum.org/uploads/default/original/1X/b757bd75649a724bb035f5dd772e137447192f35.JPG)

---

<div class="post-metadata">

**Author:** ![dverzolla](https://casparcgforum.org/user_avatar/casparcgforum.org/dverzolla/32/189_2.png) [@dverzolla](https://casparcgforum.org/u/dverzolla)\
**Post date:** [July 26, 2018, 7:37pm UTC](https://casparcgforum.org/t/gpio-howto/507/6 "2018-07-26T19:37:39Z")

</div>

X-Keys + JustMacros are not an option to you?

---

<div class="post-metadata">

**Author:** ![ttthales](https://casparcgforum.org/letter_avatar_proxy/v4/letter/t/b19c9b/32.png) [@ttthales](https://casparcgforum.org/u/ttthales)\
**Post date:** [August 6, 2021, 8:32pm UTC](https://casparcgforum.org/t/gpio-howto/507/7 "2021-08-06T20:32:53Z")

</div>

Please, my friend. Can you tell me if when using this code and executing the play command, at the end of the video execution the code positions the caspar in the next video in the list. Thanks
