Automatic Night Light

Automatic night light which switches on when its dark - using Arduino and LDR

You are now following this Submission

This model illustrates a simple automatic light switch with an LDR.
When the light is on, the LED will be off. When it’s off, the LED will turn on.
Remember to tune the LDR value in Stateflow model depending on the light intensity of your environment.

Cite As

Techsource Technical Team (2026). Automatic Night Light (https://se.mathworks.com/matlabcentral/fileexchange/51950-automatic-night-light), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Stateflow in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

Update title and Summary