In this project, I made a Street light controller using STM32F446RE
Components:
Working:
Connect the LED's Positive terminal to D7 and negative terminal to 100ohms resistor and ground.
Connect the LDR to A0 and +5v port followed by 100ohms resistor and ground.
Using CubeMX generate the code in keil and flash it to the Board.
The Code Generated is here
Once if there is light on sensor, the LED turns Off
If there is dark the light turn ON.
Thanks...
Comments