Go to advanced search

by sorenfriis
Thu May 28, 2015 1:08 pm
Forum: C/C++
Topic: WiringPi: Initial state of output. Bug?
Replies: 11
Views: 2834

Re: WiringPi: Initial state of output. Bug?

If the relays have change-over contacts (one set of NC contacts, one set NO contacts) then the easy way is to swap the wiring on the load side of the relays. Yep, I could do that, but that would mean drawing current through all the relay coils when the machine is idle. And since I am driving 8 rela...
by sorenfriis
Thu May 28, 2015 12:45 pm
Forum: C/C++
Topic: WiringPi: Initial state of output. Bug?
Replies: 11
Views: 2834

Re: WiringPi: Initial state of output. Bug?

This page guided me in the right direction.
http://www.domoticz.com/forum/viewtopic.php?f=11&t=2743

It turns out, that it is possible to set the mode as "high" also.
I.e.

Code: Select all

gpio export 0 high
This will act as an output, but stay high during the export.
by sorenfriis
Thu May 28, 2015 12:07 pm
Forum: C/C++
Topic: WiringPi: Initial state of output. Bug?
Replies: 11
Views: 2834

WiringPi: Initial state of output. Bug?

Hi there, I have just begun writing some C++ programs for my pi(s) and am making use of GPIO's for activating a line of relays. Since I want the program to run as non-root, I figured I could use wiringPi's export functionality. Therefore I have this script which exports the GPIOs which I need for pi...

Go to advanced search