Comments 35
Portable Arduino Temp/Humidity Sensor with LCD about 1 year ago
Portable Arduino Temp/Humidity Sensor with LCD about 1 year ago
What do you mean? You want extra LEDs to signify if the temp goes above or below a certain value?
If that is the case, just declare your LED pins in the setup and make an if statement in the loop
if (f > 80){
digitalwrite(highTempLED, HIGH);
} else {
digitalwrite(highTempLED, LOW);
}if (f<32){
digitalwrite(lowTempLED, HIGH);
} else {
digitalwrite(lowTempLED, LOW):
}Portable Arduino Temp/Humidity Sensor with LCD about 1 year ago
First, thanks for viewing my tutorial. I am glad you like it and it is working for you.
For your question, yes you can do that. Have a look here for one way to do it.
https://learn.adafruit.com/adafruit-arduino-lesson-12-lcd-displays-part-2/arduino-codeI also believe I posted another way to do it in the comments either here or on my instructables post.
https://www.instructables.com/id/Portable-Arduino-Uno-Temperature-and-Humidity-Sens/Portable Arduino Temp/Humidity Sensor with LCD over 1 year ago
Glad you figured it out! Happy building and hacking
Portable Arduino Temp/Humidity Sensor with LCD over 1 year ago
I’m not sure why it isn’t working. I would go through the steps again and make sure everything is wired correctly. For the DHT11, the left pin is + the middle pin is your signal that goes to the Arduino and the right pin is - should be pretty simple to wire up
I suggest you insert some print statements to see help debug. That would tell you if it is software flor hardware and what hardware is causing the issue
Portable Arduino Temp/Humidity Sensor with LCD over 1 year ago
Crap. Sorry. The Pot is for the LCD contrast. You will need that still
Portable Arduino Temp/Humidity Sensor with LCD over 1 year ago
That is a 10k pot for the LCD backlight brightness. You can use a fixed resistor if you want.
Portable Arduino Temp/Humidity Sensor with LCD over 1 year ago
You need to install the library to your computer
https://github.com/adafruit/DHT-sensor-libraryPortable Arduino Temp/Humidity Sensor with LCD over 1 year ago
If you have a RGB LCD screen, have a look at this. This should help you
I am assuming you want to push a button to read status:
change the code to this.
First, declare a button pin
Second, change the loop() code to a new class
Third, have the loop() code to listen to the button and check status// include the library code:
#include <LiquidCrystal.h>
#include "DHT.h"// set the DHT Pin
#define DHTPIN 8// set button pin
int statusButton = 6;// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
#define DHTTYPE DHT11
DHT dht(DHTPIN, DHTTYPE);void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
dht.begin();// set statusButton
pinMode(statusButton, INPUT);// Print a message to the LCD.
lcd.print("Temp: Humidity:");
}void loop() {
if (statusButton == HIGH) {
getStatus();
}
}void getStatus() {
//delay(500);
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// read humidity
float h = dht.readHumidity();
//read temperature in Fahrenheit
float f = dht.readTemperature(true);if (isnan(h) || isnan(f)) {
lcd.print("ERROR");
return;
}lcd.print(f);
lcd.setCursor(7,1);
lcd.print(h);
}Portable Arduino Temp/Humidity Sensor with LCD over 1 year ago
Yes. You can use a latching switch (on/off) with no code changes.
Portable Arduino Temp/Humidity Sensor with LCD over 1 year ago
It means you never installed the DHT library
https://github.com/adafruit/DHT-sensor-library
Follow the instructions herePortable Arduino Temp/Humidity Sensor with LCD over 1 year ago
I would love to help but do not have either displays myself. If you look around this site you will see a lot of projects with the Nokia or OLED screen and is should be pretty easy to modify the code to fit. I would assume it is just some display hardware changes and changes in the display library code
Portable Arduino Temp/Humidity Sensor with LCD over 1 year ago
Just change the define dthtype to dht22 instead of dht11. Everything should work the same then
Portable Arduino Temp/Humidity Sensor with LCD over 1 year ago
Thanks for the comment. I try
To change the code to a DHT22, just change line 10 to DHTTYPE DHT22
Portable Arduino Temp/Humidity Sensor with LCD almost 2 years ago
The pinout should be the same. I had a weird screen for this project and my LCD backlight pins were moved around. Generally they are pins 15 & 16
Portable Arduino Temp/Humidity Sensor with LCD almost 2 years ago
Glad you found the problem. Don't you just love how it mostly ends up being something simple?
Portable Arduino Temp/Humidity Sensor with LCD almost 2 years ago
@bob1334,
Double check your connection to the DHT sensor. You will get that get that "ERROR" if the arduino cannot read the temp or humidity from the DHT.Portable Arduino Temp/Humidity Sensor with LCD almost 2 years ago
From what I can tell what you are talking about, the arduino is having issues reading the Temp or Humidity from the DHT. Please check your hardware and make sure you are hooked up correctly. Double check that you have power (not being condescending, I have made that mistake TOO many times).
check this site out as well
https://forum.arduino.cc/index.php?topic=467872.0Portable Arduino Temp/Humidity Sensor with LCD almost 2 years ago
If you want to buy something similar, check the thermometer section of almost any store. They have weather stations like this. If you want to build your own like this, I bought the dht sensors on eBay. You can get most or all of these parts on eBay, amazon, sparkfun or adafruit.
Smoke Detection using MQ-2 Gas Sensor almost 2 years ago
Honestly, I have never worked with these modules or this library. If you have a gas sensor that is on a board with the pins available, usually you will have 3 (Vcc, Gnd, Sig)
Just connect your analog pin to Sig, 5v to Vcc and Gnd to GndSmoke Detection using MQ-2 Gas Sensor almost 2 years ago
I do not see why not. Check this out
https://hackaday.io/project/3475-sniffing-trinket/log/12363-mq135-arduino-librarySmoke Detection using MQ-2 Gas Sensor almost 2 years ago
That shouldn't be a problem. Just make sure your pinouts are correct
Portable Arduino Temp/Humidity Sensor with LCD about 2 years ago
If you want it to read in Celsius, just remove the "true"
This is Adafruit's DHT library.
dht.reatTemperature() == Celcius
dht.readTemperature(true) == FahrenheitPortable Arduino Temp/Humidity Sensor with LCD about 2 years ago
The DHT piece has 4 pins. Most of the pieces sold are attached to a PCB that breaks out the 3 pins used. Fritzing does not have a part with the DHT on the PCB. The 4th pin is not used by the part. You just need VCC, GND and SIG
Yes, the wiring will be the same. The pins will be broken out different from the UNO, but everything should work the same. Just make sure you are using a 5V module. I am not sure how a 3.3V will work with the LCD.
Portable Arduino Temp/Humidity Sensor with LCD about 2 years ago
I have attached a schematic with a half size board
Portable Arduino Temp/Humidity Sensor with LCD about 2 years ago
Yes. The button is just for the backlight of the LCD. I do not see why you can't do it programmatically. Just use a transistor as a switch and connect it to an extra pin.
Portable Arduino Temp/Humidity Sensor with LCD about 2 years ago
Happy to hear it!
Portable Arduino Temp/Humidity Sensor with LCD about 2 years ago
What are you using for power? USB from a computer?
Portable Arduino Temp/Humidity Sensor with LCD over 2 years ago
Can you either post a picture or write the actual error message out?
Portable Arduino Temp/Humidity Sensor with LCD over 2 years ago
I am still not sure what you mean. Can you be more specific?
Portable Arduino Temp/Humidity Sensor with LCD over 2 years ago
I am not sure what you mean. Can you explain?
Portable Arduino Temp/Humidity Sensor with LCD over 2 years ago
Where is says dht.readTemperarure(true),
Remove the "true" and it will display in CelsiusCreate Mobile Apps for Android and iOS Connecting to the MKR over 2 years ago
No luck for me yet. I have not dabbled in EVOthings yet. I am going down a path or MQTT to see how and how well that functions. I am not using my MKR1k as AP. Currently, I have a RPi model B as a flask server/hub/MQTT broker
Create Mobile Apps for Android and iOS Connecting to the MKR almost 3 years ago
Very nice. I am going to have to give this one a try. I am currently working on monitoring and controlling my garage doors with the MKR1k via my phone and (hopefully) my Pebble Time. So many languages, so little time.
Portable Arduino Temp/Humidity Sensor with LCD almost 3 years ago
That would be awesome! I would prefer to add wireless to it to a RPi web server.
The 1602 lcd I used was scrapped from a security panel. I had to figure out the Pinout as I went. Yours might be different.
For the DHT pins.. your module might be different. Mine is not pinned out that way.
This project is not to teach you how a DHT11 sensor works. It was to show you how to hook it up to an Arduino and make it work for you. A lot of people have worked very hard to design the hardware, create libraries and set up how to tutorials to make is easy for us shmucks. I will take advantage of that.