#include "IRremote.h"
#include "IRremoteInt.h"
IRsend irsend;
int initPin = 4;
void setup()
{
pinMode(initPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
if (Serial.read() != -1) {
for (int i = 0; i < 3; i++) {
irsend.sendSony(0xa90, 12); // Sony TV power code
delay(100);
}
}
}
I get this:
In file included from main.cpp:12:
C:\Users\Robert\Desktop\arduino-1.0\libraries\IRremote/IRremoteInt.h:15:22: error: WProgram.h: No such file or directory
In file included from main.cpp:12:
C:\Users\Robert\Desktop\arduino-1.0\libraries\IRremote/IRremoteInt.h:87: error: 'uint8_t' does not name a type
C:\Users\Robert\Desktop\arduino-1.0\libraries\IRremote/IRremoteInt.h:88: error: 'uint8_t' does not name a type
C:\Users\Robert\Desktop\arduino-1.0\libraries\IRremote/IRremoteInt.h:89: error: 'uint8_t' does not name a type
C:\Users\Robert\Desktop\arduino-1.0\libraries\IRremote/IRremoteInt.h:92: error: 'uint8_t' does not name a type
Note for Arduino 1.0
I haven't had time to update the library yet, but several helpful people have told me that to use the library with Arduino 1.0, you need to change #include <WProgram.h>
to #include <Arduino.h>
in IRRemoteInt.h.
and I have no idea what that means.
Thanks to anyone who helps!!!!!!!!!!!!!
go to where you installed arduino IDE, and go to the IRremote library folder and find IRremoteInt.h ex "C:\Users\Robert\Desktop\arduino-1.0\libraries\IRremote\IRremoteInt.h"
towards the top of this text file you should see something like:
Thank you both for the quick reply! It seems to have worked.
Now I get the error:
main.cpp.o: In function `main':
C:\Users\Robert\Desktop\arduino-1.0\hardware\arduino\cores\arduino/main.cpp:11: undefined reference to `setup'
C:\Users\Robert\Desktop\arduino-1.0\hardware\arduino\cores\arduino/main.cpp:14: undefined reference to `loop'
compiled fine with me. i attached my working library. replace the IRremote folder in your Arduino IDE library folder with the IRremote folder in the zip. maybe just try restarting IDE if you didnt? sounds like something non library related