Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invert GPIO #15

Open
videojedi opened this issue Nov 22, 2016 · 3 comments
Open

Invert GPIO #15

videojedi opened this issue Nov 22, 2016 · 3 comments

Comments

@videojedi
Copy link

videojedi commented Nov 22, 2016

Hi,
Firstly, great implementation. Thank you very much! Using it on a show as we speak. Just one request, would it be possible to have an option to invert the GPIO? I have used a standard off the shelf(amazon) relay unit that interfaces with the Pi really well, observing the 3.3v requirements of the Pi. But the relay unit is Active-low and so whilst I can connect the tallies to the normally closed terminals, it means the unit will 'Fail On' if the power is interrupted and all camera tallies come on. (I have found it best not to confuse cameraman!)

Thanks again,

Richard.

@SpComb
Copy link
Member

SpComb commented Nov 22, 2016

You can also try using Linux's gpio-invert feature directly, outside of qmsk-e2.

echo 1 > /sys/class/gpio/gpioX/active_low

@videojedi
Copy link
Author

Thanks. I'll give it a try.

@videojedi
Copy link
Author

I added the following to the end of /opt/qmsk-e2/bin/gpio-export.sh

for gpio in "$@"; do
echo 1 > /sys/class/gpio/gpio$gpio/active_low
done

..... and now my outputs are inverted. (no more confused cameramen!)

Many thanks,

Richard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants