I’ve been banging my head over this for the last couple of days but can’t get it working. I downloaded the IR library and have been able to use the IRRecvDump file to get the raw data from my IR receiver (from a Vizio TV remote). However I cannot for the life of me figure out how to get the raw data to output the code back to my Vizio TV.
Here is some info:
I have the IR LED (940nm from Radioshack) wired from GND to the cathode, anode to a resistor to pin 3. I was able to use Adafruit’s code to get my Nikon camera to flash from across the room so I don’t think wiring is the problem.
My code (actually Ken Shirriff’s code slightly modified for raw output)
/*
* 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;
// just added my own array for the raw signal
unsigned int irCode[68] = {4450,4500,550,1700,500,1750,500,1750,500,600,550,600,500,600,550,600,500,600,550,1700,550,1700,550,1700,500,600,550,600,500,600,550,600,500,650,500,600,550,1700,500,650,500,600,550,600,500,600,550,600,500,600,550,1700,550,600,500,1700,550,1700,550,1700,550,1700,500,1750,500,1750,500};
void setup()
{
Serial.begin(9600);
}
void loop() {
// altered the code just to send/test my raw code
irsend.sendRaw(irCode,68,38);
delay(100);
}
I have looked through a number of tutorials and some recommended removing the first raw number or changing the frequency (38) to 40. Neither helped.
Is there any chance the Vizio TV uses a different frequency than 38khz? Or any other ideas?