Magnetic Hall Module (Analog)

$5.15

11 in stock

Description

Analog Magnetic Hall Module Code


/* SETUP

Analog Hall    Arduino
-       -      GND
        -      5V
S       -      A5
*/
 
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);
  digitalWrite (ledPin, LOW);
  delay (sensorValue);
  Serial.println (sensorValue, DEC);
}

 

Additional information

Weight 0.001 kg

There are no reviews yet.

Be the first to review “Magnetic Hall Module (Analog)”

Your email address will not be published.