Difference between revisions of "Magnetic Switch"
Qian.zhang (talk | contribs) (→Application Ideas) |
Qian.zhang (talk | contribs) (→Schematics) |
||
Line 3: | Line 3: | ||
[[File:Magnetic switch.jpg]] | [[File:Magnetic switch.jpg]] | ||
+ | |||
+ | == Features == | ||
+ | |||
+ | Dimensions: 25.5×24.5×10.0mm | ||
+ | |||
+ | Net weight: 1.8g | ||
==Schematics== | ==Schematics== |
Revision as of 03:11, 10 June 2014
Introduction
This is a magnetic switch module with Linker kit standard connection.
Features
Dimensions: 25.5×24.5×10.0mm
Net weight: 1.8g
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