Hi, everyone. I'm from VietNam, i started use Arduino a few month and now i have a trouble with my arduino. I sorry, because my English's not good so i can make trouble with you. But I really hope everyone can help me. And i want to improve my English when i joined this group, too. I really need your helps. Thank for your attention!
My trouble:
#include <DHT.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2);
const int DHTPIN = 2;
const int DHTTYPE = DHT11;
DHT dht(DHTPIN, DHTTYPE);
byte degree[8] = {
0B01110,
0B01010,
0B01110,
0B00000,
0B00000,
0B00000,
0B00000,
0B00000
};
void setup() {
lcd.init();
lcd.backlight();
lcd.print("Nhiet do: ");
lcd.setCursor(0,1);
lcd.print("Do am: ");
lcd.createChar(1, degree);
dht.begin();
}
void loop() {
float h = dht.readHumidity();
float t = dht.readTemperature();
if (isnan(t) || isnan(h)) { // Kiểm tra xem thử việc đọc giá trị có bị thất bại hay không. Hàm isnan bạn xem tại đây isnan() | Cộng đồng Arduino Việt Nam
}
else {
lcd.setCursor(10,0);
lcd.print(round(t));
lcd.print(" ");
lcd.write(1);
lcd.print("C");
lcd.setCursor(10,1);
lcd.print(round(h));
lcd.print("%");
}
}
After i compile my code, i recieve message:
Error compiling for board Arduino/Genuino Uno
Exit status 1