8 years, 10 months ago.

IR data question

Hi, buddy:

I don't know how to build a IR data string("bftj ir data") from lirc-remote-codes? can you show me an example?

Question relating to:

/ ir-puck Featured
The IR Puck can mimic arbitrary infrared remote controls. Built on the Puck IOT platform. Beacons, Bluetooth 4.0, bluetooth LE, iBeacon, IOT, IR, IR Blaster, mbed, Nordic, nRF51822, puck, things

1 Answer

8 years, 10 months ago.

Hi,

The "bftj ir data" data should be an array of microsecond timings. IR codes typically work by PWM-coding short binary signals (https://learn.adafruit.com/ir-sensor/ir-remote-signals), alternating between a fast square pulse and no oscillation. The first timing in the array is the number of µs it should oscillate, the second timing in the array is the number of µs it should pause, the third is the number of µs it should oscillate after that again, the fourth is the number of µs it should pause after that, etc.

Typically, a remote control will code binary 1s as a long oscillation burst and a short pause, and 0s as a short oscillation bust and a short pause. Then, an arbitrary signal can be sent by chaining two and two timings representing 1s and 0s. An example of this can be seen in the Android Puck Central companion app: https://github.com/NordicSemiconductor/puck-central-android/blob/master/PuckCentral/app/src/main/java/no/nordicsemi/puckcentral/actuators/IRActuator.java#L129 . The exact timings of these bursts vary from remote control to remote control, hence the enormous lirc database with the exact microsecond timings for each remote control's schemes.

Hope this helps!

Accepted Answer