RowlandoGloom Posted March 7, 2016 Posted March 7, 2016 Got my hands on some ex-London traffic lights which I rewired for mains, cleaned them up and connected them up to a relay board interfacing with the GPIO on the Pi. Used Scratch to control them looks amazing - so if you can get your hands on some on eBay (about £70-£100), it'll make a nice classroom project (just don't blow the kids up)... Pictures on OneDrive I'll add some more soon of them on the wall. P 2
DalekSec Posted March 7, 2016 Posted March 7, 2016 Very cool! Don't think I can think of a decent excuse to buy some traffic lights unfortunately ...
Grazza Posted March 7, 2016 Posted March 7, 2016 Do you think they would work outside my Man Cave to stop the girlfriend from shoving all manor of stuff in there ! Now where did those two toolboxes come from I ask myself....
RowlandoGloom Posted March 7, 2016 Author Posted March 7, 2016 Somebody suggested getting a red man / green man light. Leave it on green, but put a sensor on the toilet seat and turn it to red when the bathroom was occupied!
IrritableTech Posted March 7, 2016 Posted March 7, 2016 A cool little project - I remember trying to program a cross road traffic light simulation at school on Archimedes. The hardest part was working out what the sequence of lights was as a none driving 12 year old!
sted Posted March 7, 2016 Posted March 7, 2016 A cool little project - I remember trying to program a cross road traffic light simulation at school on Archimedes. The hardest part was working out what the sequence of lights was as a none driving 12 year old! theres a pc program that i think came from acorn coco (last version ive seen is 3) and that an be ordered with cardboard traffic lights and programmed 1
RowlandoGloom Posted March 7, 2016 Author Posted March 7, 2016 I've added a few more photos to the collection http://1drv.ms/1TQcred
IrritableTech Posted March 7, 2016 Posted March 7, 2016 I've added a few more photos to the collection http://1drv.ms/1TQcred I like it. Raspberry Pi might be a bit overkill though - thought about getting into arduino?
RowlandoGloom Posted March 7, 2016 Author Posted March 7, 2016 I've never had anything to do with Arduino to be honest - so I don't even know how to use one. The school I am at uses Pis in classrooms all the time so I just think it shows what simplicity you can do, alongside with complex Python programming etc. Using Scratch is at least one step towards using a full programming language, at least friendlier on the eye..
Joanne Posted March 7, 2016 Posted March 7, 2016 gutted I can't view shortened URLs at work... any chance you can embed one for my eyeballs? 1
Grazza Posted March 7, 2016 Posted March 7, 2016 I've got an idea, link the PI to a microphone and have it turn red/amber/green based on the noise level in the class. I've never used python, but I have used Arduino based on the C++ Language. Would you be willing to share your python script?
RowlandoGloom Posted March 7, 2016 Author Posted March 7, 2016 gutted I can't view shortened URLs at work... any chance you can embed one for my eyeballs? You can use: https://onedrive.live.com/redir?resid=8FF9DC4CDD37FC26!13746&authkey=!AESEi1tBmX506-U&ithint=folder%2cjpg :-) 1
JJonas Posted March 7, 2016 Posted March 7, 2016 gutted I can't view shortened URLs at work... any chance you can embed one for my eyeballs? I can view the shortened URL but the image host is blocked so no pictures load up when I get there.
RowlandoGloom Posted March 7, 2016 Author Posted March 7, 2016 I've got an idea, link the PI to a microphone and have it turn red/amber/green based on the noise level in the class. I've never used python, but I have used Arduino based on the C++ Language. Would you be willing to share your python script? I did the project in Scratch. I was just saying before that we start the kids off early with Scratch, then move on to Python. The scratch script for the lights just shows them how easily it can be to make something "big" happen with something that small. I'll share the scratch script if you want?
Grazza Posted March 7, 2016 Posted March 7, 2016 Yes if you wouldn't mind. We do do Scratch, but have a class set of Arduino's as thats what I started out on. Our IT teacher does python so that might be good.
RowlandoGloom Posted March 7, 2016 Author Posted March 7, 2016 I can view the shortened URL but the image host is blocked so no pictures load up when I get there. Hi Joanne, Here's a link to a temporary directory on our web server. There will be two ZIP files in a few minutes, one with the photos and another with the videos : http://churchillcommunitycollege.org/templights/ They will be deleted over the next few days, but I am leaving the OneDrive share open forever. Paul. 1
RowlandoGloom Posted March 7, 2016 Author Posted March 7, 2016 Yes if you wouldn't mind. We do do Scratch, but have a class set of Arduino's as thats what I started out on. Our IT teacher does python so that might be good. I'll get something over soon as it is being used as we speak.
RowlandoGloom Posted March 7, 2016 Author Posted March 7, 2016 Here's a screenshot... On our case, it's basically: pin11 is Red pin13 is Yellow pin15 is Green "Normal Mode":
Grazza Posted March 7, 2016 Posted March 7, 2016 Forgive me for my ignorance, but how do you link scratch to the PI, is there a setting in Scratch to download to the PI or do you run Scratch on the PI ? Graham
Joanne Posted March 7, 2016 Posted March 7, 2016 I run scratch on the pi it's installed with the Rasapian flavour (I think!)
Grazza Posted March 7, 2016 Posted March 7, 2016 Got you, I'll have a look as I have a PI at home, but never got to grips with it as I'm a VB.Net/SQL developer and never got my head around Python and never really looked at Scratch. Thanks
RowlandoGloom Posted March 7, 2016 Author Posted March 7, 2016 I run scratch on the pi it's installed with the Rasapian flavour (I think!) It is and its programmed to interface directly so there's no need to faff around first. You just need to know which pin is which as say for example 11 may not match GPIO11 so you may just need to play around first.
MartinRouterKing Posted March 10, 2016 Posted March 10, 2016 Got my traffic lights. Can you take a few more pictures of the wiring. I can't work the cables out to control them.
pcstru Posted March 10, 2016 Posted March 10, 2016 Used Scratch to control them looks amazing - so if you can get your hands on some on eBay (about £70-£100), it'll make a nice classroom project (just don't blow the kids up)... Nice work. I hope I don't cause offence but personally, I'd be very wary of interfacing to mains anything via relay boards in a school project.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now