Difference between revisions of "Magnetic Switch"
(Created page with "File:Magnetic switch.jpg") |
Qian.zhang (talk | contribs) (→Introduction) |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | [[File:Magnetic switch.jpg]] | + | ==Introduction== |
+ | This is a magnetic switch module with Linker kit standard connection. | ||
+ | |||
+ | [[File:N18DH WITHOUT PACKAGED FRONT.jpg|640px]] | ||
+ | |||
+ | [[File:N18DH WITHOUT PACKAGED BACK.jpg|640px]] | ||
+ | |||
+ | [[File:N18DH PACKAGED FRONT.jpg|640px]] | ||
+ | |||
+ | [[File:N18DH PACKAGED BACK.jpg|640px]] | ||
+ | |||
+ | == Features == | ||
+ | |||
+ | Dimensions: 20.0×24.2×10.6mm | ||
+ | |||
+ | Net weight: 1.8g | ||
+ | |||
+ | == Dimension == | ||
+ | |||
+ | [[File:magnetic switch dimension.jpg]] | ||
+ | |||
+ | ==Schematics== | ||
+ | *[https://s3.amazonaws.com/linksprite/LinkerKit/Magnetic+switch.pdf 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> | ||
+ | |||
+ | [[File:Magnetic link.jpg]] | ||
+ | |||
+ | ==How to buy== | ||
+ | Here to buy Magnetic Switch on [http://store.linksprite.com/magnetic-switch-module-of-linker-kit-for-pcduino-arduino/ store] |
Latest revision as of 07:27, 6 September 2015
Introduction
This is a magnetic switch module with Linker kit standard connection.
Features
Dimensions: 20.0×24.2×10.6mm
Net weight: 1.8g
Dimension
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