ENGR 1281
File
06Smart Light

A little light.
A smarter circuit.

As the room gets darker, your light switches on. Build a circuit that senses its surroundings, then write the MATLAB code that makes it respond.

Smart Light lab guide

Build and measure

  1. Build the light-sensing and LED circuits with the parts in the tray.
  2. Compare the sensor voltage uncovered and covered. Use your readings to choose a switching threshold.
  3. Check the circuit before taking measurements.

Program and test

  1. Browser-to-MATLAB pairing is temporarily unavailable. Contact your instructor to request access. For offline MATLAB use, download the student folder, unzip it, and run StartLab('local').
  2. Write your program in SmartLight.m. Read the sensor with readVoltage and switch the LED with writeDigitalPin.
  3. Test that the LED turns on when the sensor is covered and off when uncovered.

100%
More