grit
Posts: 12
Joined: Thu Jul 05, 2012 5:35 am
Location: Amsterdam
Contact: Website

GPIO to GPIO on same pi?

Thu Nov 19, 2015 3:21 pm

Hi All,

I have a question, I'm about to connect two GPIO pins to each other with resistor/led in between like so:

GPIO23 ----[220]--->|-----GPIO27

I wanted to set GPIO27 on pulldown low,low and control the LED with the GPIO23 signal. Question is... is this a 'legal' solution?

Thanks!

User avatar
DougieLawson
Posts: 40227
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: GPIO to GPIO on same pi?

Thu Nov 19, 2015 3:30 pm

Yes. It's common to do that for "charlieplexing". Source on one GPIO, sink on another. With two LEDs wired anode to cathode you can light one by setting pin#1 high/pin#2 low and the other by setting pin#1 low/pin#2 high. Both pins high or both pins low means the LEDs are both off.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

grit
Posts: 12
Joined: Thu Jul 05, 2012 5:35 am
Location: Amsterdam
Contact: Website

Re: GPIO to GPIO on same pi?

Thu Nov 19, 2015 3:40 pm

Thanks Doug!

Return to “General discussion”