WellTronic
Published © GPL3+

KY-003 Hall Sensor Module

Here you will find the code and explanations to start up with the Hall sensor.

BeginnerFull instructions provided4,158
KY-003 Hall Sensor Module

Things used in this project

Story

Read more

Schematics

Schematics

Code

Hall_Sensor_WellTronic

C/C++
//**********************************************************************************************************//
// Author: 
// WellTronic
//
// Description:
// This code is part of a video series covering all Arduino sensors from the Arduino sensor kit.
// One of the sensors in this video series is the Hall sensor.
//
// In this video I will explain step by step how to use the Hall sensor
// https://www.youtube.com/watch?v=hV8mqPxEAUY
//
// You're also welcome to take a look at the YouTube channel for more details about hardware and software.
// https://www.youtube.com/channel/UC0UCNqE8i4unG8nfuakd0vw
// 
// Enjoy working with this sensor and see you soon :) !
//
//**********************************************************************************************************//

int hallSensorPin = 4;
int hallSensorValue = 0;

void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(hallSensorPin,INPUT);
}

void loop() {
  // put your main code here, to run repeatedly:

hallSensorValue = digitalRead(hallSensorPin);
Serial.print("hallSensorValue: ");
Serial.println(hallSensorValue);

}

Credits

WellTronic
5 projects • 2 followers
Contact

Comments

Please log in or sign up to comment.