You are on page 1of 1

Control Applications

Simple program instructions may be used to control lights, buzzers, switches and motors in many everyday devices such as automatic washing machines, automatic cookers, toys, central heating controllers, burglar alarms, video recorders/players, microwave ovens, and digital watches etc. A simple program to control a Turtle on the computer screen and draw shapes is often used in schools to illustrate the use of instructions for Control.

TURTLE Graphics
Turtle Graphics (such as SuperLOGO) uses a series of instructions to move a turtle around on the screen and draw a shape. Moving the Turtle Basic Commands FORWARD FD BACKWARD BK LEFT LT RIGHT RT PENDOWN PD PENUP PU CLEARSCREEN CS Example Program CS PD FD 50 RT 90 FD 50 RT 90 FD 50 RT 90 FD 50 END Same program using REPEAT: Procedures A procedure is a series of instructions that may be given a single name e.g. TO SQUARE REPEAT 4 [FD 50 RT 90] END Each time we refer to SQUARE it will carry out the instructions e.g. REPEAT 4 [SQUARE] Try writing procedures to draw a triangle, pentagon, hexagon, and octagon REPEAT 4 [FD 50 RT 90] e.g. e.g. e.g. e.g. e.g. e.g. e.g. FD 50 BK 30 LT 90 RT 180 PD PU CS

Controlling Devices
More information about the use of control in everyday devices such as automatic washing machines, automatic cookers, toys, central heating controllers, burglar alarms, video recorders/players, microwave ovens, and digital watches etc. may be found in Section 7 The Effects of IT in the Home

Reflex Education Services 2005-2006 All rights reserved

You might also like