The Hall Magnetic Sensor project showcases how to use an Arduino Nano to detect a magnetic field with a Hall sensor. This project will light up an LED when a magnetic field is detected. It is useful ...
const int ledPin = 13 ; // initializing a pin for the led. Arduino has built in led attached to pin 13 // variables will change int hallState = 0 ; // initializing a variable for storing the status of ...