What's up guys I'm going insane cause I can't figure out how to fix my code
#include <IRremote.hpp>
#include <Servo.h>
int IRpin = 2;
int servoPin = 9;
int photoPin = A0;
int pushButtonPin = 7;
int servoAngle = 0;
int photoValue = 0;
IRrecv receiver(IRpin);
Servo servo; // Declare the Servo object
decode_results results; // Declare the decode_results object
// Define a custom IR remote code for rewind
const unsigned long REWIND_CODE = 0x40BF4319;
void setup() {
Serial.begin(9600);
receiver.enableIRIn(); // Call enableIRIn without arguments
servo.attach(servoPin);
pinMode(photoPin, INPUT);
pinMode(pushButtonPin, INPUT_PULLUP);
}
void loop() {
photoValue = analogRead(photoPin);
if (photoValue < 300) {
servoAngle = 180;
} else {
servoAngle = 0;
}
if (digitalRead(pushButtonPin) == LOW) {
servoAngle = (servoAngle == 0) ? 180 : 0;
}
servo.write(servoAngle);
if (receiver.decode(&results)) {
switch (results.value) {
case IRremote::KEY_FF:
servoAngle = 180;
break;
case REWIND_CODE:
servoAngle = 0;
break;
}
servo.write(servoAngle);
receiver.resume();
}
}
This is the error i get: case IRremote::KEY_FF:
^~~~~~~~
exit status 1
Compilation error: 'IRremote' has not been declared