Ks0118 keyestudio EASY plug Reed Switch Module
Revision as of 10:21, 24 September 2016 by Keyestudio (talk | contribs) (Created page with "==EASY plug Reed Switch Module == <br>500px|frameless|thumb<br> ==Introduction== Reed Switch is a special switch and a main component for reed relay and...")
EASY plug Reed Switch Module
Introduction
Reed Switch is a special switch and a main component for reed relay and proximity switch. Reed switch is usually comprised of two soft magnetic material and metal reed contacts which will disconnect itself when there is no magnetic.
Reed switch can be used as sensor for count, limit and other purposes. For instance, a kind of bike-kilometer is constituted by sticking magnetic to the tire and mounting reed switch aside. We can mount reed switch on the door for alarming purpose or as switches.
Note: this module needs to be used together with EASY plug control board.
Specification
- Interface: Easy plug
- Working voltage: DC 3.3V-5V
- Working current: ≥20mA
- Working temperature: -10℃—+50℃
- Detection distance: ≤10mm
- Size: 39*20mm
- Weight: 5g
Connection Diagram
Sample Code
int Led=13;//define LED interface int buttonpin=8; //define reed switch sensor interface int val;//define digital variable val void setup() { pinMode(Led,OUTPUT);//define LED as output interface pinMode(buttonpin,INPUT);//define reed switch sensor as output interface } void loop() { val=digitalRead(buttonpin);// read and assign the value of digital interface 3 to val if(val==HIGH)//When a signal is detected by reed switch sensor, LED will flash { digitalWrite(Led,HIGH); } else { digitalWrite(Led,LOW); } }