Docstoc

The satellite receiver

Document Sample
The satellite receiver Powered By Docstoc
					                                      7KH VDWHOOLWH UHFHLYHU
                                                                              x ([DPLQH WKH UHFHLYHU
                                                                              Begin with controlling the dish of the receiver using the mouse.
There’s a satellite dish on
the roof for satellite
receipt.                                                                               'R DFWLYLW\  &RQWUROOLQJ WKH GLVK
You are watching televi-
sion and all of a sudden
you’ve got a bad image.
The dish is aimed in the
                                                                              x 0DNH D SURJUDP ZLWK FRPPDQGV
wrong direction.
Now, you’ve got to climb
on the roof.
In our intelligent house,                                                     Commands determine what the computer does.
the dish directs itself auto-                                                 A series of commands are called a program.
matically.                                                                    An example is given below.


                                                                              Example program: Turn the dish


x %XLOG WKH KRXVH DQG WKH VDWHOOLWH UHFHLYHU                                  'LVK 7R7KH/HIW
                                                                              :DLW 
                                                                              'LVK 7R7KH5LJKW
Build the house and the satellite receiver according to the instructions on
                                                                              :DLW 
page 38 to 43 of the building description.
                                                                              'LVK 6WRS
Make the connection to the RCX.
$WWHQWLRQ Connect the light sensor to port 1 of the RCX.




x &KRRVH SURMHFW                                                                     'R DFWLYLW\  0DNH WKH SURJUDP

     6WDUW SURMHFW 7KH VDWHOOLWH UHFHLYHU
x 5HSHDW UXOHV                                            x 7KH DXWRPDWLF VDWHOOLWH UHFHLYHU 
The computer keeps on turning the antenna from the
                                                          ³,I WKH UHFHLYHU GRHVQ¶W FDWFK VLJQDO WXUQ WKH GLVK WR WKH OHIW´
left ToTheRight. Fortunately, you don’t have to keep on
telling this to the computer. With the commands 5H
SHDW and 8QWLO you can repeat rules.
                                                          In a program, this sentence looks like this:


                                                          ,I /LJKW,QWHQVLW\   7KHQ
Example program: Repeat rules                               'LVK 7R7KH/HIW
                                                            :DLW 
5HSHDW                                                    (QG,I
  'LVK 7R7KH/HIW
  :DLW                                                 $WWHQWLRQ always close a statement with (QG,I
  'LVK 7R7KH5LJKW
8QWLO 6WRSEXWWRQBSUHVVHG

                                                                 'R DFWLYLW\  7KH DXWRPDWLF UHFHLYHU 
The VWRS EXWWRQ is the               red button in the
upper bar.Click on the stop button with the mouse in      x 7KH DXWRPDWLF VDWHOOLWH UHFHLYHU 
order to stop the program.                                If the computer doesn’t catch signal, something is wrong.
                                                          In that case, start an alarm signal.
                                                          If the signal has been found again, you need to hear a beep.
                                                          For the alarm and the beep, the commands $ODUP and %HHS are
       'R DFWLYLW\  5HSHDW UXOHV                        used.



x ([DPLQH WKH OLJKW VHQVRU
Connect the light to port A.                                      'R DFWLYLW\  7KH DXWRPDWLF UHFHLYHU 
A light sensor on port 1 measures the light intensity.


       'R DFWLYLW\  ([DPLQH WKH OLJKW VHQVRU

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:4/19/2013
language:Japanese
pages:2
 wuzhenguang wuzhenguang
About