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;

How to make an IR toggle switch

Hello, today I will show you how to make an IR toggle switch with Arduino and a Mosfet, it has far more detection range than capacitive touch device and easy to build. The circuit is easy to use and use minimal components to make a job done, now let's start

Components list:
R1 = 100 ohms resistor
R2 = 470 Kilo-ohms resistor
R3 = 10 Kilo-ohms resistor
R4 =1000 ohms or 1 kilo-ohms
IR1 = infrared led
IRR1 = infrared receiver
led = low forward voltage led, you can find it on any electronic part store
Tube1 =Shrink tubing
1 x irf9540n p-type Mosfet

If you have the components I list ready, it's time to upload this code to your Arduino UNO r3

/* switch
 * Each time the input pin goes from LOW to HIGH (e.g. because of a push-button
 * press), the output pin is toggled from LOW to HIGH or HIGH to LOW.  There's
 * a minimum delay between toggles to debounce the circuit (i.e. to ignore
 * noise).  
 * David A. Mellis
 * 21 November 2006
* little edit by
*16 January 2018

int inPin = 2;         // the number of the input pin
int outPin = 13;       // the number of the output pin

int state = LOW;      // the current state of the output pin *change it from high to low because the circuit turn on when connecting to a power supply
int reading;           // the current reading from the input pin
int previous = HIGH;    // the previous reading from the input pin

// the follow variables are long's because the time, measured in miliseconds,
// will quickly become a bigger number than can be stored in an int.
long time = 0;         // the last time the output pin was toggled
long debounce = 200;   // the debounce time, increase if the output flickers

void setup()
  pinMode(inPin, INPUT);
  pinMode(outPin, OUTPUT);

void loop()
  reading = digitalRead(inPin);

  // if the input just went from LOW and HIGH and we've waited long enough
  // to ignore any noise on the circuit, toggle the output pin and remember
  // the time
  if (reading == HIGH && previous == LOW && millis() - time > debounce) {
    if (state == HIGH)
      state = LOW;
      state = HIGH;

    time = millis();    

  digitalWrite(outPin, state);

  previous = reading;

Now let's make the project done by watching it in my video