Smart Street Lamp
Control a bulb with light intensity
What is a smart street lamp?
Smart street lights can automatically be turned on when it is dark and turned off when it is light. Some smart street lamps can be turned on only when there are people and vehicles.
Magicblocks is easy visual programming software for the program of your Magicbit. Anyone can program their microcontroller by using magicblocks.io and there is no need for programming knowledge. You can sign up for free.
Connect Your Magicbit with Magicblocks. (if you don’t know how to do it, go through this tutorial)
You will need the following nodes.
Double click on the switch node.
Change the value rules as follows and compare elements as numbers.
Find the value of LDR where the light should be turned on. (Here it is used as 1000)
Make the following arrangement.
Double click on the Analog In node.
- Select the pin as LDR
- Select the method as Interrupt
Double click on the Digital out node
Select the correct device ID.
Then select any LED that you want to control.
Double click on the first template node.
Change as follows.
Double click on the second template node.
Change as follows.
Deploy the program.
Cover the LDR to see if the LED turns on.
Afkar Musthaq
Very good i like the project