File Exchange

image thumbnail

Automatic Night Light

version (720 KB) by Techsource Technical Team
Automatic night light which switches on when its dark - using Arduino and LDR


Updated 07 Jul 2015

View License

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 (2020). Automatic Night Light (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

thilina dissanayke


Update title and Summary

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux