As sendRaw is a very popular methos of sending unknown or AC signals, I though it would be very useful to include and example of same with the library.
The code in this new example is tested and verified as working with the latest Master.
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.
looks like this multiplier was omitted and needs to be include to make the output meaningful/useful???
Would also explain some weird output I have seen posted.
parameters changed from int to unsigned int to allow longer mark/space durations and signal length.
hz changed to allow for potential future use of 455kHz carrier frequency. (Ther may be existing modes to the library, using this frequency)
parameters changed from int to unsigned int to allow longer mark/space durations and signal length.hz changed to allow for potential future use of 455kHz carrier frequency. (Ther may be existing modes to the library, using this frequency)
removed "asm" workaround for compiler, because it was not need ed on my system.
Original autor should verify this again. It could be alternatice compiler optimization settings?
Alternatively, place the volatile keyword before the variables in the function to avoid the "optimization out"
Use micros() to delay based on "real-time" instead of approximation with
delay() or delayMicroseconds()
Changed name to _usec to correspond to MicroSeconds.
_ms is MilliSeconds.