This may be a stupid topic, but I have officially run out of patience. I've been trying to program my Tiny85 to work as a universal remote and I found this code on the forum here that looked like the best chance I had to get it to work:
#include <IRremote.h>
const byte butonPin = 2; //button input
const byte IRPin = 1; // LED output
void setup()
{
// connect button to ground and input
pinMode(butonPin, INPUT_PULLUP);
IrSender.begin(IRPin);
}
void loop()
{
static bool lastButtonState = HIGH;
bool buttonState = digitalRead(butonPin);
if (buttonState != lastButtonState)
{
if (buttonState == LOW)
{
IrSender.sendNEC(0xED12BF40, 0x12, 0);
}
lastButtonState = buttonState;
}
}
The problem is every time I try to verify it, I get this long error message that says:
In file included from C:\Users(name censored)\AppData\Local\Temp.arduinoIDE-unsaved202465-13288-fj09t4.d31u5\sketch_jul5a\sketch_jul5a.ino:1:0:
c:\Users(name censored)\OneDrive - (location censored)\Documents\Arduino\libraries\IRremote\src/IRremote.h: In member function 'bool IRrecv::decode(decode_results*)':
c:\Users(name censored)\OneDrive - (location censored)\Documents\Arduino\libraries\IRremote\src/IRremote.h:32:9: error: 'Serial' was not declared in this scope
Serial.println(F(""));
^~~~~~
c:\Users(name censored)\OneDrive - (location censored)\Documents\Arduino\libraries\IRremote\src/IRremote.h:32:9: note: suggested alternative: 'Stream'
Serial.println(F(""));
^~~~~~
Stream
exit status 1
Compilation error: exit status 1
Call me crazy or stupid, but I don't see 'Serial' anywhere in the code, so I don't know what correction I need to make. I apologize if the answer is super clear. All I ask is at least for some guidance on what I need to do. Thank you for putting up with my problem.