Third party cookies may be stored when visiting this site. Please see the cookie information.

PenguinTutor YouTube Channel

Scratch programming - Road safety

I've been looking to create a program with my eight year old daughter since running a Code Club at the end of last year. We've done some little bits in Scratch, but without a specific project I found my daughter became distracted. I also try and incorporate activities at home related to school projects they are doing, so when she did road safety at school this seemed like a good project to use for a Scratch program.

Pedestrian crossing scratch program

At first we sat around the same computer and worked together, but soon decided it would be better for me to take a step back and let her get on with it. She still needed a bit of guidance at the start (reminder about broadcasts mainly) and I was on hand if she had any questions, but I mainly let her get on with it. Not wanting to be left out of it, and partly my daughter's suggestion I decided to work through a similar project at the same time and then we could talk about what we had done together.

Obviously it's not fair to compare the work of an adult with considerable programming experience with an eight year with less than a years programming, and that is certainly not the intention. I wanted to complete my program to show that coding can be used as a way to bring other school subjects to life and that programming can be used for more than "just" teaching computer science.

First up my daughter's program on road safety. I am very impressed with the program she has created. Even considering how much computers and coding has come on since I was a child I don't think I would have been able to create anything this good when I was eight. See the link below to play the game on the Scratch website.

Road safety scratch program (by a child)

I think that this project has shown some real benefits to having the pupil use coding outside of a computing lesson. The steps involved in breaking down the task into a series of instructions that can be programmed into the computer really helps with focusing the mind on the learning points. It also provides the confirmation of learning as she has clearly demonstrated her knowledge.

Here's my example.

Pedestrian crossing scratch application (by an adult)

The idea behind this is how a program could be used in a class to help teach the subject. In this case it's based around a pedestrian crossing (specifically a pelican crossing as it includes the flashing green man). It demonstrates the use of the pedestrian crossing a little different than just playing a video, as someone has to actually press the button before it works. It would even be possible (and not too difficult) to take it a step further and actually create a model complete with working lights and push button. We have talked about this and if we get time we may even create a 3D model to go with it.

The coding was done in a fairly short period of time (a couple of hours or so) and there are a few things that could do with improvement (for example don't keep pressing the button after it's been pressed once because there's a bug in there), but those could be fixed with a bit more time. It's also not a great example for teaching programming, again it could be improved but Scratch does lack some of the features of a "more professional" programming language. After programming in other languages, Scratch can be a little frustrating and it's easy to create spaghetti programming where the code jumps around a lot - although it is great as a beginners language for those getting started in coding. I have created a different Scratch program that shows the main features of programming in a more structured way.

All of this was created using open source software. Scratch can be downloaded for free, the images are all provided in Scratch (eg. the boy) or were created using LibreOffice Draw. With a little bit of help from GIMP to create the perspective on the road (optional).

You can download the resource files below:
pedestrian-crossing.tar.gz (Linux / Raspberry Pi) (Windows)

For more information on getting started with scratch see: Introduction to Scratch for primary school teachers (also suitable for other adults wanting to learn scratch).