Humidity sensor with led alarm | Arduino project

This page contains Arduino Humidity sensor with led alarm source code. This project is good for someone who wants to make a humidity meter or hygrometer with led alarm if humidity and temperature over a threshold. It's easy to make and doesn't require an external power supply, just use power from an Arduino UNO R3 board (USB power compatible with this project).

Electronic components list:
1 x Arduino Uno R3
1x 20 x4 I2C LCD display
1 x AM 2320 humidity/temp sensor
1 x 5 mm led ( 2 x if you plan to use led for pin 13 instead built-in led)
1 x 1000 ohms resistor ( 2 x if you plan to use led for pin 13 instead built-in led)
Any USB power adapter, 500 mA current at least.

Here is the Arduino code:
AM 2320 library
LCD display i2c library

#include <Wire.h>
#include <AM2320.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x3F, 20, 4);
AM2320 th;
int led2 = 12;

Hall effect sensor wiring diagram and test video

Hall effect sensor switch is a switch that turns on when enough magnetic field near the IC. You can use hall effect sensor to make many Diy projects such as rpm meter, magnet detector, and more project involves with a magnet.

Did you know? Hall effect sensor uses in many electric machines, example; when you open washing machine door and the machine stop spinning, or when you open microwave door then it pauses and send beeping sound until you close the door.

Hall effect sensor IC in this post is A3144(old component but work well and low cost) Send output low (0 volts) when strong magnetic field near a sensor, that why somebody asked on the internet why his project involves hall effect sensor didn't work.

Hall effect sensor wiring diagram.
You can see an above image that a load(LED in this picture) connect to positive electrode and output instead output and ground. That's the reason why some projects don't work and will never work because the output low when magnet near the IC

If you want to use hall effect sensor with Arduino board, you must add 10 kilo-ohms resistor between a positive electrode and an output of hall effect sensor to make the output from IC high (5 volts).

Note: 1 kilo-ohms resistor use as a current limiter for an LED  you can lower value if  you want an LED brighter.

See a testing video to see how it works.