Things used in this project

Hardware components:
11113 01
SparkFun Arduino Pro Mini 328 - 5V/16MHz
×1
Graphic LCD 84x48 - Nokia 5110
×1
386 00
DHT11 Temperature & Humidity Sensor
×1
Adafruit industries ada161 image 75px
Photo resistor
×1
Adafruit industries ada258 image 75px
Li-Ion Battery 1000mAh
×1
DC-DC boost module 0.9V ~ 5V
×1
TP4056 5 Volt Mini USB Charger Module
×1

Code

TEMPERATURE_STATION.inoArduino
Just download the (LCD5110_Graph.h) and (dht.h) LIBRARY from internet and include the LIBRARY with Arduino ide and upload the code.
//TEMPERATURE STATION
//MADE BY RUMMAN ISLAM BD
//DATE:24.12.16

#include <LCD5110_Graph.h>                                      //LIBRARY
#include<dht.h>
#define TS 7                                                //TEMPERATURE SENSOR PIN NUMBER

dht DHT;
LCD5110 myGLCD(8,9,10,12,11);
//      LCD PIN NUMBER       
//      SCK  - Pin 8
//      MOSI - Pin 9
//      DC   - Pin 10
//      RST  - Pin 12
//      CS   - Pin 11

extern unsigned char SmallFont[];                               //FRONT SIZE
extern unsigned char TinyFont[];

char lightString [4];     
char tempString [5];
char humiString [4];

String Ttr;
String str;                                                //INITILIZE STRING 
String htr;

int lightIntensity ;                                       //INITILIZE VALUE
int Tempsensor;

void setup()                        
{
  myGLCD.InitLCD();
  myGLCD.setFont(SmallFont);
  randomSeed(analogRead(7));
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop()
{
   
  digitalWrite(LED_BUILTIN, HIGH);                          //FOR BLINKING LED
  delay(100);                       
  digitalWrite(LED_BUILTIN, LOW);    
  delay(100); 
  
  Tempsensor=DHT.read11(TS);                                    // 1ST SENSOR
  int t=DHT.temperature;                                        // 2ND SENSOR   
  int h=DHT.humidity;                                           // 3RD SENSOR 
  lightIntensity = analogRead(A0);   
  lightIntensity = map(lightIntensity, 0, 1000, 0, 100);       //CONVERT THE VALUE INTO %
  delay(1000);



  Ttr =String(t)+"*c";                                //FOR CONVERT THE VALUE   
  htr =String(h)+"%"; 
  Ttr.toCharArray(tempString,5);
  htr.toCharArray(humiString,4);
  str = String(lightIntensity)+"%";
  str.toCharArray(lightString,4);                     //FOR CONVERT THE VALUE  
  delay(1000);
  
  myGLCD.clrScr();
  myGLCD.update();
  myGLCD.setFont(TinyFont);
  myGLCD.print("**WEATHER STATION**",CENTER,0);
  myGLCD.print("MADE BY RUMMAN",CENTER,7);
  myGLCD.print("-------------------------",CENTER,12);
  myGLCD.setFont(SmallFont);
  myGLCD.print("CELCIOUS:",LEFT,18);                    // FOR PRINT IN SCREEN  
  myGLCD.print(tempString,RIGHT,18);
  myGLCD.setFont(TinyFont);
  myGLCD.print("------------------------",LEFT,25);
  myGLCD.setFont(SmallFont);
  myGLCD.print("HUMIDITY:",LEFT,29);
  myGLCD.print(humiString,RIGHT,29);
  myGLCD.setFont(TinyFont);
  myGLCD.print("------------------------",LEFT,36);
  myGLCD.setFont(SmallFont); 
  myGLCD.print("SUN:",LEFT,41);
  myGLCD.print(lightString,RIGHT,41);
  
 
  myGLCD.update();  
  delay(1000);
}

Credits

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Similar projects you might like

Web Piano (Control Buzzer by Web)
Intermediate
  • 11
  • 2

Web Piano (Web-based Buzzer Control with PHPoC Shield for Arduino)

NodeMCU Home Weather Station with Websocket
Intermediate
  • 287
  • 6

Full instructions

NodeMCU and BME280 Home Weather Station that serves a webpage using Websockets

Arduino 101 Clothes Recommender
Intermediate
  • 9
  • 2

Full instructions

Arduino 101 that tells you the inside and outside temperature and recommends what clothes to wear.

Stepper Motor Control
Intermediate
  • 74
  • 3

Full instructions

A full featured Stepper control involving speed and line interpolation for 2 axis motion.

SORT4U
Intermediate
  • 63
  • 2

Full instructions

It's the sorting machine that you've been waiting for. Just throw all your junk in it and let it sort for you.

SORT4U

Team The Avengers

Flightduino 101
Intermediate
  • 438
  • 9

Full instructions

A drone project that uses the Neural Pattern Recognition Module and other aspects of the Curie Module to advantage for creating a cool drone

ProjectsCommunitiesContestsLiveAppsBetaFree StoreBlogAdd projectSign up / Login
Respect project
Feedback