Instructions
IDUINO for maker’s life
www.openplatform.cc 53
pinMode (Led, OUTPUT) ; / / define LED as output interface
pinMode (buttonpin, INPUT) ; / / output interface as defined Reed sensor
}
void loop ()
SunFounder{
val = digitalRead (buttonpin) ; / / digital interface will be assigned a
value of 3 to read val
if (val == HIGH) / / When the Reed sensor detects a signal, LED flashes
{
digitalWrite (Led, HIGH);
}
else
{
digitalWrite (Led, LOW);
}
}
********Code End********
Module 18:Mini Reed Switch Module
1 Introduction
This module is a simple reed switch module, it’s similar with the module17(Reed switch
module), but it has no analog pin, no adjustable resistor, just soldering one 10K ohm resistor.
Specification