Hello, I'm trying to make a project with the Remote control, but when i include the display library(Display.h) it says: Error compiling for board Arduino/Genuino Uno. What is the problem here ?
This is my code at the moment and when i comment the Display.h library it starts working, but how should i use the display other way ?
#include <IRremote.h>
const int receiver = 2;
const int PIN_NTC = 15;
const int NTC_R25 = 10000; // the resistance of the NTC at 25'C is 10k ohm
const int NTC_MATERIAL_CONSTANT = 3950; // value provided by manufacturer
const int PIN_LDR = 16;
const int redLed = 4;
const int greenLed = 5;
const int yellowLed = 6;
const int btnTemp = 8;
const int btnLight = 9;
#include <Display.h>
IRrecv irrecv(receiver);
decode_results results;
void setup()
{
Serial.begin(9600);
// In case the interrupt driver crashes on setup, give a clue
// to the user what's going on.
Serial.println("Enabling IRin");
irrecv.enableIRIn(); // Start the receiver
Serial.println("Enabled IRin");
pinMode(PIN_NTC, INPUT);
pinMode(PIN_LDR, INPUT);
pinMode(redLed, OUTPUT);
pinMode(greenLed, OUTPUT);
pinMode(btnTemp, INPUT_PULLUP);
pinMode(btnLight, INPUT_PULLUP);
}
float TempSensor()
{
float temperature, resistance;
int value;
value = analogRead(PIN_NTC);
resistance = (float)value * NTC_R25 / (1024 - value); // Calculate resistance
/* Calculate the temperature according to the following formula. */
temperature = 1 / (log(resistance / NTC_R25) / NTC_MATERIAL_CONSTANT + 1 / 298.15) - 273.15;
return temperature;
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
delay(100);
int btnStateTemp = digitalRead(btnTemp);
int btnStateLight = digitalRead(btnLight);
int valueLDR = analogRead(PIN_LDR);
int valueNTC = analogRead(PIN_NTC);
int switcher;
if (results.value == 0x9716BE3F || results.value == 0xFF30CF)
{
delay(50);
switcher = 1;
Serial.println(switcher);
digitalWrite(redLed, HIGH);
}
/*
if (results.value == 0x3D9AE3F7 || results.value == 0xFF18E7
)
{
digitalWrite(LedB, HIGH);
digitalWrite(Led, LOW);
}
*/
}