Just in case someone has similar needs I decided to write a little note about it.
The Raspberry Pi has a wiringPi extension. You can simply read the state of a pin from the command line like
gpio read 7
This returns the value 1 or 0.
The switch can be connected directly between GPIO pin 7 and ground. Raspberry Pi has its own pullup resistors.
To send the data to QLC+ you need to select OSC input from the input/output tab.
The first input listens to port 7770 by default.
A small python script like this does the job
Code: Select all
#!/usr/bin/env python
import liblo, sys
try:
target = liblo.Address(7770)
except liblo.AddressError, err:
print str(err)
sys.exit()
liblo.send(target, "/foo/message1", 123)
Then run you python script that sends the message. And voila - you have external triggering of the widget.
You can use bash to poll for the pin and call the python script or perhaps even search for python bindings to monitor the GPIO pins directly from python.
I am very happy with the flexibility of Raspberry Pi2 and QLC+. We will use just one tablet as backup in case of troubles. All controls will be done by the actors pressing hidden pushbuttons around the stage. The ASUS WiFi USB-dongle is set to operate in server mode so there is no extra electronics needed. You can connect to the system using an ordinary browser at http://192.168.42.1:9999 (The IP chosen when you set up the access point and dhcp server).
The total cost of the Raspberry Pi2, SD card, uDMX USB dongle, audio cable, WiFi dongle and power supply is just a little above 100€. And you get control of both lights, sound effects and music. All music and sound effects are on the SD card. The Raspberry Pi 2 plays them out in pretty good quality. So far no one has complained.
The next step is to create a real extension board for the RPi with proper screw terminals for external switches and good quality isolated DMX hardware. Perhaps a small 7" touch screen showing the real QLC+ user interface would be cool.
As the minimum PCB order is 10 boards interested parties can drop me a line. I need just two of them. One main system and a hot backup. The time for making the design is sometimes during summer. Hopefully before our autumn season.
Enjoy,
Karri