Ks0118 keyestudio EASY plug Reed Switch Module

From Keyestudio Wiki
Jump to navigation Jump to search

EASY plug Reed Switch Module


thumb

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


thumb


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);
}
}

Resources

PDF

https://drive.google.com/open?id=1UAujQHnyqXk3Ie6ypzHywBe0B1U6xuPq

Buy from

Official Website

http://www.keyestudio.com/keyestudio-easy-plug-reed-switch-module-for-arduino-starter.html