More steps in programming.

 

Robots are machines that we can tell what to do and that will do that thing again and again and again, whenever we want them to. Rather like washing machines or microwaves. These have programs that perform the same function whenever we set them to do a particular thing. We talked about examples of this in the world around us and thought about traffic lights.

The first challenge this morning was to work out the sequence that traffic lights followed. Students used coloured discs to act out what traffic lights do. We watched a very boring video of a set of traffic lights and realised that the timing of each light varies. We then wrote a program for a set of traffic lights.

Repeat continuously:-

Red on 20 seconds

Red and orange on 2 seconds.

Red and orange off.

Green on 14 seconds.

Green off.

Orange on 4 seconds

Orange off.

We tried following this sequence with a set of three coloured torches, red, orange and green. It was harder to do than it looks.

We then moved on to programming on screen. The program 2Go is part of Purplemash from 2Simple. It has different sets of tools in it that mean programming with it can become more and more challenging.

At first we used buttons to move in a particular direction. Then we added a set of boxes, a flow chart, to program in.

Then we added diagonals . The next challenge was to program a turtle to write a letter from our names using diagonals.

A letter F programmed in 2Go.

‘F’ for Fatima.

Fatima didn’t need to use diagonals for her letter.

To work out the programs we wrote letters on graph paper then worked out the directions and the steps.

A letter N created in 2Go.

‘N’ for Nowrin programmed in 2Go.

Nowrin needed one diagonal. She needed several attempts to get it to be the correct length.

A letter T drawn in 2Go.

Tasmima’s letter T

Tasmima’s letter ‘T’ has four steps in the progam.

A letter W drawn in 2GO

How to program a ‘W’ in 2Go.

Wasima programmed her ‘W’ quite quickly. She was pleased with what she had done.

There were lots of challenges. Nishat needed to use the whole flowchart of 10 steps to create an ‘S.’ Jack did a ‘J’ that filled the screen, and James managed to write his whole name.

Everyone worked hard, but they all enjoyed it.

First steps in programming

Students from Langdon Park and Mulberry Schools are starting a ten week course in computer programming. To get started we thought about sequences and putting things in a logical, regular order that is always the same. Like you have to do in Line Up from Busythings. The Langdon Park group picked this up very quickly and took it in turns to put in the correct answer. The problems got harder using more colours and shapes, and changing the spaces that needed to be filled.

line up

Once they had that cracked we moved on to an activity needing logical thinking. In Block-a-doodle-doo you have to move vehicles out of the path of the chicken in the green car who is the worst driver ever, carrying on in a straight line, banging into things, and expecting everyone to get out of the way. If the monster on the motorbike catches the chicken he eats him.

Block a doodle doo

We talked about sequences in everyday life, things we do regularly without even realising we are following the same set of actions every time, like when we cross the road.

We went on to program a chicken to move through a maze picking up jewels on the way and avoiding monsters in Path Peril. This got harder and harder until there were five jewels and three monsters and no way to avoid them except by timing your moves right. It brought lots of laughs as the chicken got grabbed, gobbled and blown up.

Path peril

For the final activity we use J2Code and found the parking problem. Here a sequence of instructions is coded into a program to move a car from one parking bay to another. We watched as each line of code was run through then added and deleted lines to debug. We left the car park with several damaged cars!

j2eturtleparking

 

In our second session a week later we transformed one of our teachers into a Human Robot who only understood clear instructions: “Forward (x)” “Backward (x)” and “Turn right”, “Turn left” where X is the number of steps we wanted the robot to take. We had fun making the robot travel round the room and then describe some shapes.

Then we programmed the Mole to get the worm in the TES iboard activity Mole Maze  We made it move one step at a time, then made a list of all the instructions before pressing Go.  Remembering right and left was a bit tricky for some, especially when the Mole was facing downwards. We spent a very little bit of time remembering why we had to put “90” for a right angle, “180” for a half turn etc.

mole maze This activity comes with three levels and we all started on the easy level first.

We logged onto Purple Mash and used 2Go to programme some letters and other shapes. jack