6 * http://www.ladyada.net/make/tvbgone/
10 //#include "NAcodes.c"
11 //#include "NAcodes2.c"
13 //Maybe you will have to experiment also with this value
17 void fire_code(int outpin, long freq, fuck *code) { //kHz
18 freq = 1000000/(freq*1000); //freq2millis
23 pinMode(ledpin, OUTPUT);
27 for(d=1000/100;d<=1000/20;d++) { // 1000/frequency in kHz
28 //You maybe have to experiment with ^^^ this ^^^ values
29 //Frequency sweeping: 100->20 kHz works, i saw 60->1 too
30 for(i=0;i<bitlen;i+=0.5) {
31 digitalWrite(ledpin, HIGH); delayMicroseconds(d/2);
32 digitalWrite(ledpin, LOW ); delayMicroseconds(d/2);
34 delayMicroseconds(d*bitlen);