Hi,
Is it possible to detect if two GPIO pins have been basically linked together or would this short something out?
I was hoping to work the opposite and have a relay that is switched externally and tell the PI it has been switched??
Thanks!
Re: Connecting two GPIO pins together?
If your relay has two contacts use one for switching the load and one foir signalling the Pi.
Ebsure Pi input has a pullup, connect a Normally Open contact (NO) to Pi GND, Connect the associated Common to the Pi GPIO input.
Just like a switch. This assumes you have a Double Pole Relay and you only need one pole to switch your load.
Ebsure Pi input has a pullup, connect a Normally Open contact (NO) to Pi GND, Connect the associated Common to the Pi GPIO input.
Just like a switch. This assumes you have a Double Pole Relay and you only need one pole to switch your load.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/
or http://www.pcserviceselectronics.co.uk/pi/
Re: Connecting two GPIO pins together?
another solution could be to do it in software instead just using one pin for output, then switch it to input and read the state, then set it back as output again. when you switch it to input, it stays at whatever state it was at before switching.
If it isnt smoking and blown into pieces, it's not pushed far enough yet. 
http://cae2100.wordpress.com

http://cae2100.wordpress.com
Re: Connecting two GPIO pins together?
Following on from this : I have GPIO2 configured as an input port to count relay closures on a flowmeter.
To test this I want to use GPIO1 as an output port.
Do i need to connect GPIO1 to a transistor and relay circuit (control side of relay) then I would to simulate the flowmeter and connect GPIO2 to the power side (say a Normally open contact) of the same relay ?
Or is there an easier way ?
To test this I want to use GPIO1 as an output port.
Do i need to connect GPIO1 to a transistor and relay circuit (control side of relay) then I would to simulate the flowmeter and connect GPIO2 to the power side (say a Normally open contact) of the same relay ?
Or is there an easier way ?
Re: Connecting two GPIO pins together?
Not sure what exactly you are trying to achieve, see if you post a diagran of how you were thinking of wiring and what the function of each GPIO is for now and in final installation.
Just another techie on the net - For GPIO boards see http:///www.facebook.com/pcservicesreading
or http://www.pcserviceselectronics.co.uk/pi/
or http://www.pcserviceselectronics.co.uk/pi/
Re: Connecting two GPIO pins together?
If you want to use a GPIO in to monitor another GPIO out then just connect the 2 with a resistor, 1k0 will do just fine.
Its slightly better to use a resistor instead of a wire for those "Dohh!" moments when you realise they are both outputs and have different output levels. sure the RPi current limits its outs but if you make a habit of it then you start asking a lot from the power supply.
*Edit:
The outputs are not current limited, the current setting on an output determines the maximum current you can draw while still getting a valid output.
Its slightly better to use a resistor instead of a wire for those "Dohh!" moments when you realise they are both outputs and have different output levels. sure the RPi current limits its outs but if you make a habit of it then you start asking a lot from the power supply.
*Edit:
The outputs are not current limited, the current setting on an output determines the maximum current you can draw while still getting a valid output.
>)))'><'(((<