HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Raspberry Pi GPIO/SPI/I2C => Topic started by: [email protected] on November 22, 2015, 02:44:24 PM

Title: Invert Inputs?
Post by: [email protected] on November 22, 2015, 02:44:24 PM
At the moment due to the way I have done my wiring, I am using internal pull ups, so by default the inputs show as 1. however I would like to flip them

Does the code support inverting inputs? I have had a quick look and tried it, but I'm due to go out shortly and doesn't seem to work, so thought i would ask first!

So as per above is this supported?, if not I will make the necessary changes and share it.

David
Title: Re: Invert Inputs?
Post by: [email protected] on November 22, 2015, 02:58:27 PM
Ok, so she's not quite ready, so spent a little more time, looks like the code only reverses the Outputs, so I have added the following at line 32:

Code: [Select]
((InputPinConfiguration)configuration[p]).Reversed = pc.Reversed;
I'll let you know how this works once it gets dark :) ( Outdoor PIR's)
Title: Re: Invert Inputs?
Post by: [email protected] on November 22, 2015, 03:04:14 PM
Just realised that I had wired two other GPIO's to open collector outputs on the alarm expander (Texecom 8XP) and have just configured them as PC controlled, so tested this using Wintex and the reversing of the input code works fine.

So I would suggest its added to a future release :)