I want to build a prototype for an intelligent traffic signal system for a four-way cross junction, hence I need to connect 12 led lights i.e. red, yellow, green and 4 cameras for taking input images of traffic and 4 LCD display or 4 2-digit seven-segment display to display timer. Can I connect all these to a single raspberry pi, or please suggest some alternative for the same.

  • Get a MAX7219 with seven-segment LEDs (that uses SPI - it's easy to drive four SPI devices). Get an MCP23017 to give you 16 extra GPIOs for the main lights. – Dougie Oct 2 '19 at 14:48
  • Is it possible to connect 4 MAX7219 led matrix to a single raspberry pi? I don't want to attach them together, I need to use them independently to show timer count on each display. So I need such 4 MAX7219 led matrix. – Mansi Thorat Oct 2 '19 at 17:19
  • Yes. You can even daisy chain then to control 8, 16, 24 or 32 (or more) digits. – Dougie Oct 2 '19 at 18:56

cameras: yes if USB webcams, no if CSI cameras (official rpi camera module) - you can only use 1 on a Pi, or 2 on a compute module

LEDS: yes, easily (one per GPIO)

LCD display: it depends on the protocol. Some displays are SPI, some I2C. With these protocols you can share some of the pins, but others you need unique pins, so you would need to work this out and plan which pins you will need to use, and you may find you can make it work with the Pi's GPIO header.

Alternatively, a good solution could be to use multiple Pis (maybe even 4, then you can use the official camera module on each one) and network them together.

please suggest some alternative for the same.

You're fishing. This part of the question isn't appropriate for Stack Exchange. I'd suggest you do some research and either bring back specific questions, or you're probably best taking it to the raspberry pi forums.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.