I have a lot of interesting metagoals, like beemergencies and urgency load and a few others, and I usually set up exclusions like this in the fineprint, and parse it out.
Just have the script check for do-less goals with PPD off (that is, goals that wonât derail) and exclude those from the calculation.
But I also think there should be a way to exclude goals in the config file - and alternately a way to specify goals to include. Iâd want a bunch of lights and have each light correspond to only one or a few goals.
Oh man, those lights are only 5 bucks each if you buy them in packs of 5!
How would you make it work with multiple lights?
Good question, I have no idea! If anyone else has more experience with Piâs / hardware, would love to hear your thoughts!
Sure why wouldnât it? Itâs just sitting on the GPIO pins isnât it? And thereâs a lot of them.
https://pinout.xyz is great for quickly looking up the pinout.
Yeah⌠but Iâd have to reconfigure the pins, yes? And youâd be limited to 6 based on the physical number of pins in a row?
I am so incredibly new to this.
Jumper Wires
Regarding the pins, yes, the physical number of GPIO pins does impose somewhat of an upper limit. Also you would need to use jumper cables / wires. You can get at the usual suspects:
Or if it needs to be quick, look on Amazon:
https://smile.amazon.de/Female-Female-Male-Female-Male-Male-SteckbrĂźcken-DrahtbrĂźcken-bunt/dp/B01EV70C78/ref=sr_1_3?__mk_de_DE=Ă
MĂ
Ĺ˝ĂĂ&keywords=jumper+cable&qid=1574793046&sr=8-3
In theory you could use a multiplexer or the SPI bus or the i2c bus. But thatâs some more advanced stuff
There is also an i2s bus, but not on the rpi afaik.
General Advice
As an alternative to the aforementioned website there is also the command line tool pinout
on Raspbian.
For more information see:
For Python:
https://gpiozero.readthedocs.io/en/stable/
Also if for some reason something isnât working, again, check you set the pins correctly to IN or OUT and check that you are using a common ground. You wouldnât believe how many stupid and hard to find errors are caused by these two things.
Shopping
I can recommend AliExpress for electronicals. The stuff you get on Amazon is from China anyway, might as well cut out the middle man. Banggood is also an option but I prefer Aliexpress since shipping is a bit faster and they are a lot cheaper. They got a Black Friday sale coming up. Their website needs a bit getting used to with all the tons of useless coupons they throw at you but itâs still No. 1 source for makers.
If you ever want to do something with an ESP32 let me know, there is a multitude of modules with that chip and they differ in what drivers you need, whether you need to reset manually and wether they got a sensible pinout. Iâve tried a few and compiled a list of the good ones. My advice is to either stick to FTDI or CH340. Most of the cheap chinesium Arduino clones and ESPs use CH340 but there is a few that use yet another driver and while you can install all of them via homebrew I prefer to not have too many external kernel modules on my system. They are all properly signed nowadays though, so there is that. I remember the time when you had to disable SIP and⌠well thatâs in the past fortunately.
There are definitely pins that you cannot set to output. There are multiple 5V power pins, 3V3 power pins, and even more grounds.
Yes. All the green ones are fair game though:
Besides you can use a common Vcc and Gnd line for all traffic lights. You really only need 3 pins per traffic light that you toggle via your rpi.
So thatâs 14 green pins. Can any of the other colors or the uncolored pins be used to output?
So does that mean there is a limit of 14 traffic lights per Raspberry Pi? Or whatâs the limit?
You could plug in IO expanders and get to thousands or maybe even tens of thousands of lights.
(Nearly a decade ago I did a project on something with much fewer resources across the board and I ran 30k individually controlled lights.)
Wow awesome, thanks!
What project took 30k lights? Sounds impressive
(It was a museum exhibit about Ferris wheels!)
Yeah, right, port expanders. Very good point! The very first one I found is using the i2c bus as I suggested. And one way or the other what they do is basically be a multiplexer and a shift register.
Just in a more convenient packaging
Thank you for putting this all together! I think I might give myself permission to take the time to try and replicate it over the holidays!