Lab 1: Infrared Switch |
Goals
|
|---|---|
Part 1: LED |
We will be building the LED circuit described in: |
Part 2: Infrared Emitter |
Build a circuit to power the Infrared EmitterThe infrared emitter is a light emitting diode (LED) that specifically emits near-infrared light (just below the visible spectrum). The component with the yellow dot on top is the IR Emitter.
|
Part 3: Infrared Detector |
Build a circuit to read from an Infrared DetectorGiven the infrared-sensitive phototransistor, build the circuit below. A phototransistor is a sensor that is able to detect light levels and alter the current flowing between emitter and collector according to the level of light it receives. The component with the red dot on top is the IR Detector. Use a 10k resistor for the IR Detector Circuit.
Connect to the Metro Mini
![]() ![]() Read the signal from the Infrared Detector and write SerialThere are two built in functions,setup() which runs once at the beginning and loop() which runs repeatedly.
Hint: Make sure your IR Emitter and Detector are facing each other (there is a bump on the front). Submit a video of your code working to Google ClassroomFor today's participation assignment, take a short video (less than 1 minute) of your code working and submit it to Google Classroom. |
Part 4: Programming an Infrared Switch |
Program an Infrared Switch (Optional)Write a program that changes the built-in LED state (toggle on/off) when the path between the Infrared Emitter and Infrared Detector is blocked. When the path is no longer blocked the LED does not change. The Arduino IDE has example code on how to turn on and off the built-in LED. You can find it in |


