Using the SS495B Miniature Ratiometric Linear Hall Effect Sensor from Honeywell and the Arduino NANO.



Just connect the sensor  to  GND and VCC and the “Output” pin to the analog input A0.
The effect of North and South magnetic fields in the sensor are observed in the Serial Monitor.



The Sketch used:

Showing Gauss measured by the SS495B in the serial monitor.
(Miniature Radiometric Linear Hall Efect Sensor)
Sensor connected to Analog channel 0.
#define XRANGE  50 
int x,gss;
void setup(){
void loop(){
  int aValue =analogRead(0);
  x = map(aValue, 0, 1024, 0, XRANGE);
  gss = map(aValue, 102, 922, -640, 640);
  for (int i=0;i<x;i++){
    else Serial.print("-");
  for (int i=x+1;i<XRANGE;i++){
    else Serial.print("-");

See the YouTube presentation: