Products

News

Contact Us

Phone

Current Position > Products

Product Name: KEYES MINI reed switch module for arduino with dem

MINI reed switch module
Reed switch module and a digital interface, built-in 13 LED build a simple circuit to produce a magnetic field warning lamp
13 comes with digital interfaces of the LED, the reed sensor access number 3 interface, when the reed sensor senses a key signal, LED lights, otherwise off.
Routines source code:
int Led = 13 ;/ / define LED Interface
int buttonpin = 3; / / define Reed Sensor Interface
int val ;/ / define numeric variables val
void setup ()
{
pinMode (Led, OUTPUT) ;/ / define LED as output interface
pinMode (buttonpin, INPUT) ;/ / define reed sensor output interface
}
void loop ()
{
val = digitalRead (buttonpin) ;/ /
if (val == HIGH) / / When the reed sensor detects a signal, LED flashes
{
digitalWrite (Led, HIGH);
}
else
{
digitalWrite (Led, LOW);
}
}

MINI reed switch module
Reed switch module and a digital interface, built-in 13 LED build a simple circuit to produce a magnetic field warning lamp
13 comes with digital interfaces of the LED, the reed sensor access number 3 interface, when the reed sensor senses a key signal, LED lights, otherwise off.
Routines source code:
int Led = 13 ;/ / define LED Interface
int buttonpin = 3; / / define Reed Sensor Interface
int val ;/ / define numeric variables val
void setup ()
{
pinMode (Led, OUTPUT) ;/ / define LED as output interface
pinMode (buttonpin, INPUT) ;/ / define reed sensor output interface
}
void loop ()
{
val = digitalRead (buttonpin) ;/ /
if (val == HIGH) / / When the reed sensor detects a signal, LED flashes
{
digitalWrite (Led, HIGH);
}
else
{
digitalWrite (Led, LOW);
}
}

Product Features:

1, the working voltage: DC 5 V

2, with mounting holes for easy fixed installation;

3, the output valid signal is low;

4, a sense of distance to stay away, as far as the effective sensing distance up to 5CM, (with field strength);

5, high sensitivity magnetic sensors;

6, the output switch circuit board can be directly connected to the microcontroller IO port;

7, can be used for magnetic detection, position detection and other occasions.