Friday, 28 March 2014

Year 4 ICT: Human robots

We had great fun this week programming our very own human robots. First, we designed our own programming language. For example, instead of ‘Right’, we wrote RT and for ‘Forward’, we wrote ‘FW’. This saved time when writing our programs.

We then wrote our programs, debugging (fixing problems) and thinking of ways to simplify them as we went by using repetition in our sequences. Some of us even moved on to use conditional commands such as IF, THEN and UNTIL. 

By the end of the lesson, we had completed various coding missions including 'Create a dance routine' and 'Fetch objects and move them'.

Why not try getting your own human robot to dance with this piece of code we wrote:

LT leg UP 20cm
LT leg DOWN 
ROTATE HEAD 90 CW
RPT 4
RT leg UP 20cm
RT leg DOWN
ROTATE HEAD 90 CCW
RPT 4
THEN
LT arm UP UNTIL STOP
LT arm DOWN
RPT 4
RT arm UP UNTIL STOP
RT arm DOWN
ROTATE 90 CCW
TILT HEAD 10 RT
TILT HEAD 10 LT
RPT 8

RPT UNTIL MUSIC STOPS

No comments:

Post a Comment