AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Files and machines

Week 16 · Unit 7: Computers and robots · 3 lessons
3

Machines with computers inside

Computing 3: Unit 7, pp. 105–118
GoalExplain that a computer-controlled device takes an input, follows a program and gives an output.
New words
computer-controlled device · a machine that has a computer inside to control what it doesinput · information that goes into a machine, such as a button pressoutput · what the machine does or shows because of the program
Explanation

Many machines have a computer inside that controls them. They can be found in homes, shops, streets and factories. A computer-controlled device takes an input, for example a button press or a signal from a sensor. The computer follows its program. The program decides the output, which is what the machine does, such as opening a door or switching on a light. A different program can give a different output, even when the input is the same.

Worked examples
MachineInputOutput
shop doora sensor sees a personthe motor opens the door
street lampa sensor sees that it is darkthe lamp switches on
liftyou press the button for floor 3the motor takes the lift to floor 3
Look at these three machines. Each one gets an input, the program decides, and the machine does something.
ProgramSomeone walks by in daylightSomeone walks by at night
Program 1light onlight on
Program 2light stays offlight on
The same input can give different outputs if the program is different. Here the sensor sees someone walk by in a hallway. Program 1 switches on the light. Program 2 switches on the light only when it is also dark.
Computers inside a machine do the same three jobs as the one on your desk: input, process (follow the program) and output.
Class activity

Be the machine (in pairs): one child is the street lamp’s computer, the other is the sensor. The sensor shows a card that says DARK or LIGHT. The program card on the table says “If the card says DARK, say lamp on. Otherwise say lamp off.” The computer follows the program. Now change the program card to “If the card says LIGHT, say lamp on.” Is the output different? Why? The input did not change but the program did.

Practice
1
Put these in the order they happen at an automatic shop door: (a) the door opens (b) the computer decides to open the door (c) a sensor sees a person.
2
A lift: you press the button for floor 4. What is the input? What is the output?
3
Name two machines in your home or school that have a computer inside.
4
A garden sprinkler can run Program A or Program B. It rained all day, so the soil is wet. Which program waters the garden this evening?
ProgramThe sprinkler waters the garden
Program Aevery evening
Program Bevery evening, but only if the soil is dry