0

I would like to connect a relay, a 4-digit display, and a light sensors to a single Pi Zero W. I quickly realized that the relay and 4-digit display would conflict with one another because they are both using the GPIO18 pin. I don't want the relay and display to have the GPIO18 signal all the time.

If I "split" the GPIO18 signal in two, what hardware could I use to allow the signal to pass through only if another connected pin is 'on' (please see image).Blue signal is GPIO18 in image

Thank you in advance - having a great time playing with this.

Steve Robillard
  • 34,687
  • 17
  • 103
  • 109
Nelson
  • 3
  • 3

1 Answers1

0

While the solution you describe might not be the best one for your problem, the easy answer is that you need an AND-gate

For example the 74AHCT1G08GW from NXP or the SN74AHC1G08 from TI should do.

Bex
  • 2,929
  • 3
  • 25
  • 34
  • Thanks for the info!! You say this might not be the best solution for my problem, I'm curious what would be the best solution? Thank you again. – Nelson May 11 '17 at 12:14
  • Perhaps use SW PWM? https://raspberrypi.stackexchange.com/questions/298/can-i-use-the-gpio-for-pulse-width-modulation-pwm – Bex May 12 '17 at 07:55