Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
PAGE 34<br />
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
ACTIVITY<br />
4<br />
SECTION 4<br />
Copymaster for use with 9795<br />
INTERMEDIATE AND<br />
ADVANCED IDEAS USING<br />
PROGRAMMER INVENTOR<br />
The Door Lock System 2<br />
You can make your Door Lock System from the first Door Lock System<br />
activity more secure.<br />
Set up the door lock system as shown on pages 12-14 in the Building Booklet.<br />
Make sure the lamp is attached to port A, the motor is attached to port B and<br />
the light sensor is attached to port 2.<br />
Load the ROBOLAB software. Select Inventor Level 4.<br />
The Light Sensor Fork icon compares the current light level input<br />
by the sensor to a set value.The default value is 55. If the current light level<br />
is above that value, one task is run. If the light level is equal or below that<br />
value, a different task is run.<br />
Create a program using Light Sensor Forks to check for the range above and<br />
below the grey, red or white key card.To start, check all the light sensor values<br />
using the View in the RCX display.<br />
White<br />
Red<br />
Blue<br />
Grey<br />
Using the light sensor ranges above, decide which key you want to use to<br />
unlock the door.Then create your program.<br />
Download and test it by trying all the keys in the lock. Is there only one that<br />
opens the door? If not, revise the program to use a narrower range of values.