Magnetic Switch
Revision as of 04:59, 14 April 2014 by Qian.zhang (talk | contribs)
Introduction
This is a magnetic switch module with Linker kit standard connection.
Schematics
Application Ideas
test <syntaxhighlight lang="c">
const int MagneticPin=9; const int ledPin=13; void setup() {
pinMode(MagneticPin, INPUT); pinMode(ledPin,OUTPUT);
}
void loop() {
int sensorValue = digitalRead(MagneticPin); if(sensorValue==1) { digitalWrite(ledPin,HIGH); } else { digitalWrite(ledPin,LOW); } }
</syntaxhighlight>
How to buy
Here to buy Magnetic Switch on store