mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2025-12-13 18:06:15 +00:00
As written this example will cause issues with some IR receivers. On the face of it it sends teh sony signal burst 3 times with a 40ms gap. However, it really continues to send the sony signal forever with a 40ms gap. There needs to be a reasonable gap between signals sent & I have added in a 5 sec gap as a reasonable figure. Without a gap, many IR receivers will treat this signal as noise as it send continuous sony bursts with a 40 ms gap.
25 lines
414 B
C++
25 lines
414 B
C++
/*
|
|
* 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;
|
|
|
|
void setup()
|
|
{
|
|
}
|
|
|
|
void loop() {
|
|
for (int i = 0; i < 3; i++) {
|
|
irsend.sendSony(0xa90, 12);
|
|
delay(40);
|
|
}
|
|
delay(5000); //5 second delay between each signal burst
|
|
}
|