Let us learn how to use/ test/ install a Day-night switch. A Day night switch is also called a Light Sensitive Switch. The main use of this switch is to automatically turn any electric appliance/ mainly Light bulbs On when it is evening and Turn them Off in the morning. Such a gadget can be very useful at a place where you have such a requirement such a Advertizing Billboard, Godowns, Farms/ Farm Houses etc.
Similar Posts Home Automation
|(click to enlarge)|
This experiment is similar to the previous one. The components and the circuit are the same as that of this experiment of the Pull down resistor. In that experiment we used a momentary switch to momentarily turn on the LED. Whereas in today's experiment we will turn on the LED and keep it on until the button is pressed again. Hence it will work as a Toggle switch instead of a momentary switch. We can achieve this effect by making changes in the code that we upload on the Arduino's board.
We are going to to use the example program in Arduino's IDE
File - Examples - Digital - Debounce
But the name is strange!, it is not toggle or something similar. It is Debounce. What is de-bounce ? What is it that is bouncing in this circuit that we need to de-bounce? Let us try to understand that below.
|click to enlarge|
We can make the LED turn on with the press of the button, and with some rearrangement of components and the program we can make the LED turn off when the button is pressed.