Someone came into a local shop I do some work for, They wanted someone to build something that can play the Tardis sound effect and flash the blue lights on top of it. It took me about a year to build, due to health issues, being busy with full time work etc etc etc, anyway, it required coding of the main script to flash lights and play sound, sound being particularly difficult on a pi zero(w) as the only proper audio out is HDMI. Adafruit has the answer to that one, use PWM. The flashy lights, well you might not want the current of 8 LEDs coming off 1 GPIO pin so a transistor was used to switch 5v on and off to the LEDs. Two boards because he wanted 1 inside and one outside. We later found out that the lamp unit wasn't waterproof, so I ended up using some conformal coating on the boards.
Whilst it did eventually get made, it went out, and there were a few teething problems, connection issues as dupont connectors were used, these couldn't handle Roberts pulling and pushing through holes, so I changed them for those in the pic below
Recently the tardis project had a catastrofic failure, due to robert turning the power off without shutting down, so the project has now how a shutdown button added, curtesy of Barry Hubbard, as Robert uses it in a headless fashion. Oh I nearly forgot, because it is headless, the code has to be run at boot. fairly simple add a few lines to the rc.local file basically add sudo python /home/pi/tardisV2.py& and sudo python /home/pi/shutdown.py& after the fi line. You don't have to use sudo but if you get an error on boot try adding the sudo, it's also important to put an ampersand after the each line of code you enter so that anything else, including loading the desktop can complete.
So in conclusion, It works, Robert needs to refit it, and I hope others too can have some fun. I do have a completed working image if anyone is interested, Message me.
Afterthought the loop in the code is only there to keep the interrupt live, otherwise it would just end, there is no button connected to the pin so it wont ever stop.
The raspberry Pi is powered via the psu with a soldered connection to the lower part of the RPI Zero usb breakout pads.
Comments