Title: Zebra crossing
1Zebra crossing
2Lighthouse
3Street light
4Emergency flashing light
5Sources of light
- zebra crossing
- lighthouse
- street light
- emergency flashing light
6Sources of light
- Which of the four sources is represented by the
model?
- How does the light in the model flash?
7Objectives
- To be able to use a switch to control a simple
system. - Create a design that models the workings of a
lighthouse. - Explain how the system works and be able to
modify and test it to make it efficient and
easier to follow. - Improve the system by refining and combining the
different processes involved.
8The lighthouse
- Why are lighthouses needed at night?
- Are lighthouses necessary during the day? Why?
- Are lighthouses more important to small or to
large ships?
9The lighthouse
- Program the lighthouse mimic so that the
lighthouse light flashes when it becomes dark
(using the moon/sun as a switch). - The foghorn should work only at day when the sun
is out (not true to life but for the sake of this
exercise we will say it is foggy in the day) and
the lights inside should come on at night time. - (Three separate flowcharts)
10Cleaning shoes
START Take right shoe Put polish on Brush
firmly Set aside Take left shoe Put polish
on Brush firmly Set aside STOP
11Cleaning shoes
START Take right shoe Put polish on Brush
firmly Set aside Take left shoe Put polish
on Brush firmly Set aside STOP
12Cleaning shoes
START Take right shoe Put polish on Brush
firmly Set aside Take left shoe Put polish
on Brush firmly Set aside STOP
13Cleaning shoes
START Take right shoe Proc polish Take left
shoe Proc polish STOP
PROC polish Put polish on Brush firmly Set
aside END proc
14Task sheet
- How could you refine and improve your
lighthouse system so that you have one flowchart
for the whole process.
Subroutines
15- Design a system to help a person with impaired
hearing in his or her own home. - Consider how you can make sure that the person
knows that - someone has rung the door bell
Using the autohome mimic create a subroutine that
will make the light flash once. Use this
subroutine to make the light flash 5 times when
the doorbell is rung.