Difference between revisions of "Hall Sensor"
Qian.zhang (talk | contribs) |
|||
Line 1: | Line 1: | ||
+ | ==Introduction== | ||
+ | This hall module hosts an magnetic hall sensor that senses the presence of magnetic field. | ||
+ | |||
[[File:Linker hall.jpg]] | [[File:Linker hall.jpg]] | ||
− | |||
== Schematics == | == Schematics == | ||
*[https://s3.amazonaws.com/linksprite/LinkerKit/Linker+Hall+Sensor.pdf Schematics] | *[https://s3.amazonaws.com/linksprite/LinkerKit/Linker+Hall+Sensor.pdf Schematics] | ||
+ | |||
+ | ==Application Ideas== | ||
+ | |||
+ | <syntaxhighlight lang="c"> | ||
+ | |||
+ | int ledPin = 13; | ||
+ | int out = 12; | ||
+ | |||
+ | void setup() | ||
+ | { | ||
+ | pinMode(ledPin, OUTPUT); | ||
+ | pinMode(out, INPUT); | ||
+ | } | ||
+ | |||
+ | void loop() | ||
+ | { | ||
+ | if ( digitalRead(out) ) | ||
+ | { | ||
+ | digitalWrite(ledPin,LOW ); | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | digitalWrite(ledPin,HIGH); | ||
+ | } | ||
+ | } | ||
+ | </syntaxhighlight> | ||
==How to buy== | ==How to buy== | ||
Here to buy Hall Sensor on [http://store.linksprite.com/hall-module-of-linker-kit-for-pcduino-arduino/ store] | Here to buy Hall Sensor on [http://store.linksprite.com/hall-module-of-linker-kit-for-pcduino-arduino/ store] |
Revision as of 01:57, 14 April 2014
Introduction
This hall module hosts an magnetic hall sensor that senses the presence of magnetic field.
Schematics
Application Ideas
<syntaxhighlight lang="c">
int ledPin = 13; int out = 12;
void setup() {
pinMode(ledPin, OUTPUT); pinMode(out, INPUT);
}
void loop() {
if ( digitalRead(out) )
{
digitalWrite(ledPin,LOW );
}
else
{
digitalWrite(ledPin,HIGH);
} } </syntaxhighlight>
How to buy
Here to buy Hall Sensor on store