This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-08-22 08:43:06

Claire_Searle
New Scratcher
Registered: 2012-08-22
Posts: 2

Traffic light

Hi!
I am new to scratch and the world of programming!  I have seen that you can create a traffic light program and link it up to a raspberry pie.  could someone please help me in
a) setting up the trafficlights in Scratch
b) linking it with my raspberry pie and breadboard.

As simple as possible please.
thank you

Offline

 

#2 2012-08-22 10:33:31

Spyderblade
Scratcher
Registered: 2012-07-13
Posts: 100+

Re: Traffic light

I have no idea what you mean. I'm sorry.


http://i48.tinypic.com/2pzbc5x.jpg
Am I online? http://blocks.scratchr.org/API.php?user=Spyderblade&action=onlineStatus&type=circle And, check out my Challenge Mission 2!!

Offline

 

#3 2012-08-22 10:43:21

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Re: Traffic light

Hi Claire - Just to show that I know a bit about this  smile
http://www.scratch.mit.edu/ext/youtube/ … ;feature=*

One way of getting going is to draw a new sprite with the 3 coloured lights in it, copy the first costume 3 more times and then fill in the coloured lights so you are left with a red one,amber one,green one and one with red AND amber (I'm in UK - don't know if same where you are)

Then write a little script that just uses the next costume blocks and some wait blocks to go through a traffic light sequence

Simon

Offline

 

#4 2012-08-23 05:08:54

Claire_Searle
New Scratcher
Registered: 2012-08-22
Posts: 2

Re: Traffic light

Thank you for your advice.  I have now got as far as writing the scratch program I now need to connect to my raspberrypi.  when I find out I will let you know!
Claire

Offline

 

#5 2012-08-24 11:56:50

SimpleScratch
Scratcher
Registered: 2007-05-25
Posts: 100+

Re: Traffic light

Here is some info on getting Scratch talking to GPIO ports on your RaspberryPi using what is called a helper type program written in Python.

http://cymplecy.wordpress.com/2012/07/2 … pberry_pi/

Offline

 

Board footer