Hardware Reference
In-Depth Information
Figure 17-3:
Identifying the
emitter (left)
and collector
(right) legs of
the QSE113
phototransistor.
Wire the emitter of the phototransistor to ground. Connect the collector to one side of a 1k
ohm resistor. Connect the other side of the resistor to the input pin, as shown in Figure 17-4.
Testing the Sensors
It's easier to check that your sensors are working before you attach them to the bird box!
Start the PiFace Digital emulator (as described in Chapter 9, “Test Your Reactions”) and make
sure that Update Inputs is selected. Point the IR LED at the phototransistor. he appropriate
input should indicate that it is turned on. As you stop the light falling on the detector, you
should notice that the corresponding input is no longer turned on.
 
Search WWH ::




Custom Search