ekman:
I have been trying something like this to no avail….
irsend.sendRaw([7350 200 4800 200 4800 250 4800 200 4800 200 4800 250 4800 200 4800 200], 16, 38)
Hey ekman,
Two things:
- The array needs to have the values separated by commas
- The array should be declared outside of that command.
Here's a program i got from THIS BLOG : Digitalduino: Use sonar to control a TV!
#include <IRremote.h>
IRsend irsend;
// just added my own array for the raw signal
unsigned int powerOn[148] = {4400,4250,550,1600,600,1550,600,1550,550,1600,550,500,550,550,550,1550,600,500,550,500,600,500,550,500,600,450,600,1550,600,1550,550,500,600,1550,550,550,550,500,600,500,550,500,550,500,600,500,550,1600,550,1550,600,1550,600,1550,600,1550,600,1550,550,1600,550,1550,600,500,550,500,600,500,550,500,550,550,550,500,600,450,600,500,550,500,550,1600,550,1600,550,500,600,500,550,1600,550,500,550,500,550,550,550,500,600,500,550,500,600,450,600,500,550,500,550,550,550,500,600,1550,600,450,600,500,550,500,550,550,550,500,600,450,600,500,550,500,600,1550,550,500,600,500,600,1550,550,500,600,500,550,500,550,500,600};
void setup()
{
Serial.begin(9600);
}
void loop() {
// altered the code just to send/test my raw code
irsend.sendRaw(powerOn,148,38);
delay(2000);
}
NOTE that you'll have to change "148" to "16" in TWO places in the code...
Also, i hope you removed the first received raw value from the array (more info)