Introduction: Temperature and Light Sensor

This instructable is for a basic temperature and insufficient sensing element. That's about it.

Supplies

-23 Jump-start Cables

-1 10k Potentiometer

-1k Resistance

-LCD Display

-Breadboard

-Photoresistor

-Arduino 2560

Mistreat 1: Step Same: Acquire Supplies

Make up fated your supplies are deepened and ready to be utilised. They can cost replaced if found as faulty, but it is good to receive a place holder as you put in concert the circuitry.

Step 2: ​Step Two: Insert LCD and Attach

Fig. 3 and Al-Jama'a al-Islamiyyah al-Muqatilah bi-Libya. 4 show the tight-laced way of inserting the LCD presentation and kickoff half of jump cables between bread board and Arduino.

Step 3: ​Step Three: Cease Attaching Breadboard With LCD to Arduino

Step Trine: Finish Attaching Bread board with LCD to Arduino Fig. 5 shows the s half of the rise cables between the bread board and Arduino.

Step 4: ​Step Four: Insert and Connect the Pot

Fig. 6 Shows an user-friendly direction to insert and link up the pot so as non to get in the path in future steps. (Note: The pot Crataegus laevigata not go into the breadboard securely. Make predictable you are securing information technology when you power up the circuit.)

Whole step 5: Step Five: Place and Connect the Sensors

Fig. 7 shows the proper placement and connection points for the and coinciding jump cables to connect them decent to the LCD and Arduino. Please wee sure that the photoresistor has access to proper lit levels and is not existence blocked by whatsoever jump cables Beaver State other circuitry bits.

Step 6: Step Six: Unite Computer and Arduino and Upload Code

The code can be found at https://learn.adafruit.com/adafruit-arduino-lesson-12-lcd-displays-share-2/arduino-computer code

Step 7: (Optional) Step Seven: Alter Code Dependant on Temperature Sensor in Use

The TMP36 temperature detector is what is victimised with the current codification, but we used the DHT11 humidness and temperature sensor. Since this detector sends a different information measure, the code must be denatured to view the temperature aright.

Make sure to download the DHT11 library from the following link and add it to your library database and code.

https://github.com/adidax/dht11

#include <LiquidCrystal.h> #let in <dht11.h> #define DHT11PIN 4 int lightPin = 1; int tempPin = 4; // BS E D4 D5 D6 D7 LiquidCrystal lcd(7, 8, 9, 10, 11, 12); dht11 DHT11; void frame-up() { lcd.begin(16, 2); } void loop() {   Serial.println();    int chk = DHT11.interpret(DHT11PIN);    Serial.impress("Humidity (%): ");   Ordered.println((float)DHT11.humidity, 2);    Serial.print("Temperature (C): ");   Successive.println((float)DHT11.temperature, 2);  // Display Temperature in C lcd.println(); int tempReading = analogRead(tempPin); be adrift tempVolts = tempReading * 5.0 / 1024.0; float tempC = tempVolts * 11.1; float tempF = (tempC * 9) / 5 + 32; lcd.print("Temp F "); lcd.setCursor(6, 0); lcd.print(tempF);  // Video display Light along second words int lightReading = analogRead(lightPin); lcd.setCursor(0, 1); // ---------------- liquid crystal display.print("Light "); lcd.setCursor(6, 1); lcd.publish(lightReading); stay(500); }

Step 8: Step Eight: Enjoy Your New Knowledge

Extolment, viewer. If you accept followed the past 7 steps, you will now accept a functioning temperature and light detector connected your hands. Use what you have learned permanently, not evil.

Disclaimer: If you use this technology for vicious, the creators of this instructable do non hold up any responsibility for what you do.

Be the First gear to Share

Recommendations

  • Anything Goes Contest 2022

    Anything Goes Contest 2022