Back

CS 122A: Brightness and Humidity Checker

April 2022

See project files

See documentation


I measured temperature and humidity with Arduino project that had breadboard, LEDs, and resistors.

Every 1000 ticks (1 second), the machine does 2 tasks:

  1. Check the brightness of the surroundings
  2. Check the temperature and humidity of its surroundings.

The photoresistor checks the brightness of its surroundings and returns a number. The number is between 0 and 1024, where 0 is maximum brightness and 1024 is minimum brightness.

            if number is less than 600: 
               1 LED light will turn on
               if number is less than 400:
                   a second LED will also turn on (2 LED lights will be on)
            
          
Breadboard connected to 2 blue LED lights. Left LED light is on. Right LED light is off.

1 LED is on. The LED brightness is less than 600.

Breadboard connected to 2 blue LED lights. Both left and right LEDs are on.

2 LEDs are on. The LED brightness is less than 400. The brightness is higher than the brightness in the previous picture.

In the Arduino system, I used Serial.print() statements to make sure the functions worked as intended.The serial monitor printed out the brightness, temperature, and humidity.

Home Page