Weekend Project Clock Date Thermometer and Humidity With Arduino Mega

Introduction: Weekend Project Clock Date Thermometer and Humidity With Arduino Mega

Guys, I wanna share my weekend project on creating a clock with humidity and temperature sensor,
It's using DHT11 sensor, RTC DS1307, LCD 16x2 and Arduino Mega 2560,

Keep reading and good luck

Step 1: Prepare All the Parts Needed.....

In this experiment I need to use this parts :

1. Arduino Mega 2560 board
2. RTC DS1307
3. LCD 16 x 2
4. DHT11 sensor
5. 4K7 Resistor
6. 10K trimpot for LCD brightness

Step 2: Connection to Arduino Board :

Here's the connection to arduino board :
//init DHT11 sensor
#define DHT11_PIN 6

// Init the DS1307
DS1307 rtc(20, 21);

// Init the LCD
//LiquidCrystal lcd(22, 24, 26, 28, 30, 31);
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

Step 3: The Main Loop for Displaying .....

Here's the main loop for displaying, I used Arduino 022..

void loop()
{
  // Display time centered on the upper line
  //lcd.setCursor(4, 0);
  //Read the temperature and humidity
   int chk = DHT.read11(DHT11_PIN);
  lcd.setCursor(0, 0);
  lcd.print(rtc.getTimeStr());
  //Read temp sensor
   double temp = Thermister(analogRead(0));  // Read sensor
   //Read Humidity
   //DHT.humidity,1
   //Read Temperature
   //DHT.temperature,1
   //print screen
   lcd.setCursor(9,0);
  //lcd.print(temp);
   lcd.print(DHT.temperature,0);
   lcd.print("C");
  //Display Humidity
   lcd.setCursor(13,0);
   lcd.print(DHT.humidity,0);
   lcd.print("%");

  // Display abbreviated Day-of-Week in the lower left corner
  lcd.setCursor(0, 1);
  lcd.print(rtc.getDOWStr(FORMAT_SHORT));

  // Display date in the lower right corner
  //lcd.setCursor(6, 1);
  lcd.setCursor(3, 1);
  lcd.print(",");
  lcd.setCursor(4, 1);
  lcd.print(rtc.getDateStr());

Step 4: Test and Enjoy My Project.....

Test and enjoy my project.....
Let's watch the video...


Thanks for reading and good luck for your experiment.....
Pocket Sized Electronics

Participated in the
Pocket Sized Electronics

Epilog Challenge V

Participated in the
Epilog Challenge V

Be the First to Share

    Recommendations

    • Leather Challenge

      Leather Challenge
    • Stone Concrete Cement Contest

      Stone Concrete Cement Contest
    • Remote Control Contest

      Remote Control Contest

    6 Comments

    0
    dancopy
    dancopy

    3 years ago

    sketch_dec17a:56: error: 'Thermister' was not declared in this scope

    0
    dancopy
    dancopy

    3 years ago

    Does it work with the current IDE of Arduino Uno? Thank you

    use

    lcd.print((char)223); //degree sign
    lcd.print("C"); to display degree C ;)

    0
    princenk007
    princenk007

    8 years ago on Introduction

    Hi, Very nice project. Keep up. Can you please help me too? Based on this instructable : https://www.instructables.com/id/Environmental-Mushroom-Control-Arduino-Powered/ I have an arduino code written by anthony to control relays for humidifier and heater used with sensor dht22. can you modify the code to use with sensirion sensor - sht75? Thank you.

    0
    Bay Yolal
    Bay Yolal

    8 years ago on Introduction

    How could we connect LCD's connection to Arduino? How; that you didn't show us.

    0
    mweaver8
    mweaver8

    8 years ago

    is there a place that we may get the code?