Hello friends , In this short tutorial I will give you knowledge about "How to interface reed switch with Arduino UNO and LCD." Instead of reed switch we can use any other switches like tilt switch, push button, PIR sensor or something that gives output as PIR sensor gives( IR Proximity sensor ) and so on. Ok, Lets start, At first we have to learn about "What is reed switch." Reed-switch is a type of switch which is controlled by magnetic field i.e (Magnet). When magnet comes near the reed switch, it will works as close switch and vice-versa. But it is not like a " Hall Effect Sensor " Ok, take a look of this circuit:- We can use buzzer or LED in pin 13. VIDEO: https://www.youtube.com/watch?v=PxTf_ru6LdM&t=2s CODE: #include <LiquidCrystal.h> LiquidCrystal lcd(12, 11, 5, 4, 3, 2); int LED = 13; //pin for the LED int SWITCH = 7; //INPUT pin where the REED-SWITCH is connected int BUTTON_STATE = 0; //whether s
Comments
Post a Comment