I had this idea to hook up an IR universal TV/DVD/VCR remote control into something that can control my computer or send MIDI data to my computer...
for now i just want to test out the idea by controlling a tri color LED with the remote.
I made this shield for my project... Its got 5v hooked up to an IR reciever, with the output going to digital pin 11, and the ground from the IR reciever going to ground on arduino.
I've also got a tri color LED hooked up, from pins 3, 5, and 6 with 330 ohm resistors leading up to the RGB pins on the tri color LED. and i've got the LED grounded to the same ground as the IR receiver...
NOW THEN... I've coded the following sketch for my arduino to work with my shield, but for some reason, when i run the code my IR reciever work fine but the LED doesn't light up at all...
its just strange because when i hook up the 5v and ground pins to the wrong ports on the arduino, it will work... like if rather than hooking it up correctly to the 5v and ground, i hook it up to 3.3v and 5v... for whatever reason, even though it's not grounded, it will make it so that the LED works but not the IR receiver... strange... i can't get one working without the other one not working...
here are some pictures of my shield, and the code i am using right now to try to light up the LED...
/*
* IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
int lightX = 0;
int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
digitalWrite(3, HIGH);
digitalWrite(5, LOW);
}
void loop() {
digitalWrite(3, HIGH);
digitalWrite(5, LOW);
if (irrecv.decode(&results)) {
digitalWrite(3, LOW);
digitalWrite(5, HIGH);
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}
if anybody can help me figure out why this isn't working please let me know... I really appreciate all the help i've gotten from this forum so far, its been a great place to learn.




