Solved:
following this blog post:
and using the github example IRrecord:
I can record the raw codes using IRrecord:
Raw (36): 15716 8950 -4450 500 -2200 550 -2200 500 -2200 550 -2200 500 -4450 550 -4400 550 -2200 500 -2250 500 -2200 550 -2200 500 -2200 550 -2200 500 -4450 550 -2200 500 -4450 500 -4450 550
put in text file rawcodes.txt
use sed to remove '-' signs:
sed -i "s/find/replace/" test.txt ---> sed -i "s/-//" rawcodes.txt
use sed to add commas:
sed -i "s/ /,/" test.txt ---> sed -i "s/-//" rawcodes.txt
use in .pde!
/*
* IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
* An IR LED must be connected to Arduino PWM pin 3.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
IRsend irsend;
const int buttonPin = 12;
int buttonState = 0;
unsigned int rawCodes[] = {8850, 4550, 450, 2300, 450, 4500, 450, 2250, 500, 4500, 450, 2250, 500, 2250, 450, 2250, 500, 2250, 450, 2300, 450, 2250, 500, 2250, 450, 2250, 500, 2250, 450, 4500, 500, 4500, 450, 2250, 500};
void setup()
{
pinMode(buttonPin, INPUT);
}
void loop() {
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH) {
for (int i = 0; i < 3; i++) {
irsend.sendRaw(rawCodes, 35, 38);
delay(100);
}
}
else {}
}