DJ Namaste
Active member
Hello, using Ken Shirriff's irremote library, I want to send data using a remote to one teensy and have it relay that same code to another teensy. So one relays to the other the same value. I have a sketch that is set up to send and receive the data The IR emitter is connected to pin 5 on teensy, the ir receiver is on pin 6.
The original emitter sketch example does not define the emitter pin and requires pin 3 on arduino uno. On teensy it requires pin 5 according to the website. Any guidance?
The original emitter sketch example does not define the emitter pin and requires pin 3 on arduino uno. On teensy it requires pin 5 according to the website. Any guidance?
PHP:
#include <IRremote.h>
IRsend irsend;
const int RECV_PIN = 6;
const int pinSendIR = 5;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
irrecv.blink13(true);
}
void loop() {
if (irrecv.decode(&results)) {
irsend.sendSony(0x68B92, 20);
delay(100);
irsend.sendSony(0x68B92, 20);
delay(100);
irsend.sendSony(0x68B92, 20);
delay(300);
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
}