Combine hall effect sensor and LCD display

Hey guys,
I'm so lost, help me plzzz :cry:
I'm a high school student, I'm studying physics and I have no idea about programming or Arduino.

I have a physics project that relys on Arduino.
I have a hall effect sensor and a lcd screen. I need to control the lcd screen by the hall effect sensor.
When a magnet hits the sensor it activates the screen, and two numbers appear on the screen.
As long as there is no contact between the magnet and the sensor the screen is off.

Anyone know how to do this? What's the code of it? Because I have no idea about writing codes...

Find and example for the display and find an example for the hall sensor.
If they both work and you understand it, then you can combine them.

Arduino comes with a library for a LCD display: LiquidCrystal - Arduino Reference.

Do you know which hall sensor it is ? Can you test it with a magnet and a multimeter ?

hey thanks for the guidance,
I have a hall effect magnetic sensor.
I found an example for the display (the "hello world"), and it worked.
About the example for the hall sensor, How can I know that the code I found for it actually works?

Very good, that the display is working 8)

Every component has a part number. If you know the part number, then you can try to find the datasheet. With the datasheet you know which leg does what.
Is it soldered on a module ? Is there something written on it ?

There are two types of hall sensors (three):

  • hall switches, with a output that is either low or high. There are two types: latching and non-latching.
  • analog linear hall sensors, they output a voltage according tot the strength of the magnetic field.

Hall switches are cheap, so it is most likely that you have a non-latching hall switch.
For example: Hall-Effect Sensor - AH1815 (Non-Latching) - SEN-14709 - SparkFun Electronics.
Connect it to digital pin, set the pin as input and read the pin. See: digitalRead() - Arduino Reference

How many do have of those ? If you try 5V on the wrong legs they could release the magic smoke.

on the hall sensor is written-49E 822BC
Is that what you meant?

A Google search for "49E 822BC" found this page. That page also has printing to an I2C LCD. Besides the initialization the commands are the same for a parallel wired LCD.

822BC may be codes for date of manufacture and package type.

I like the hd44780 library for character LCDs (1602, 2004). It is a better and more maintaned library than any of the many LiquidCrystal libraries. The hd44780 library is available through the IDE library manager. There is extensive documentation included with the library.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.