Instructions
IDUINO for maker’s life
www.openplatform.cc 81
S
Analog output pin, real-time output voltage
signal
+(middle pin)
Power
-
Ground
3.example
In this example, this module will read the value of magnetic and print on the Serial Monitor.
These value can be reflect the intensity of environment magnetic.
Example Code:
******Code begin******
int sensorPin = A5; // select the input pin
int ledPin = 13; // select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the
sensor
void setup () {
pinMode (ledPin, OUTPUT);
Serial.begin (9600);
}
void loop () {
sensorValue = analogRead (sensorPin);
digitalWrite (ledPin, HIGH);
delay (sensorValue);