I am attempting to send a RAW IR code using the IRremote.h library. The process for capturing IR pulses is easy to find on the web, but the process for sending them again is not. After a few days, i pieced the following code together:
#include <IRremote.h>
IRsend irsend;
void setup() {
}
void loop() {
int IRsignal[] = {
// ON, OFF (in 10's of microseconds)
90, 86,
174, 88,
86, 88,
86, 88,
86, 88,
86, 88,
86, 88,
86, 88,
86, 174,
88, 86,
174, 88,
86, 2340,
88, 86,
174, 88,
86, 88,
86, 88,
86, 88,
86, 88,
86, 88,
86, 88,
86, 174,
88, 86,
174, 88,
86, 0};
irsend.sendRaw(IRsignal, 10, 38);
delay(1000);
}
When I run it, i get the following error:
ir_test.ino: In function 'void loop()': ir_test.ino:65:38: error: invalid conversion from 'int*' to 'unsigned int*' [-fpermissive] In file included from ir_test.ino:3:0: /Applications/Arduino.app/Contents/Resources/Java/libraries/RobotIRremote/src/IRremote.h:143:8: error: initializing argument 1 of 'void IRsend::sendRaw(unsigned int*, int, int)' [-fpermissive] void sendRaw(unsigned int buf[], int len, int hz); ^ Error compiling.
I am not sure what I did wrong, or how to convert the data types. Any tips or ideas?