Hello Everyone,
I'm just getting my pinscape project setup and wanted to get the IR feature working so I can turn on my playfield tv . But I cant seem to find any info on where and how to connect the ir unit and the receiver to the freedom kl25z and then how to teach/ learn the code for my tv .
Can anyone point me in the right direction ?
Sorry about this being still undocumented. If you're using the expansion boards, it's just a matter of plugging the IR LED and IR sensor into the corresponding slots, but if you're using the KL25Z directly, it's a little more difficult since there are a few external components you have to include. If you know how to read a schematic, you can find the necessary circuits on the expansion board schematics, which you can find here:
http://mjrnet.org/pi...rd/download.php
Here's the IR section excerpted so you don't have to go looking for it:

The connections labeled IR_OUT and IR_IN are KL25Z GPIO pins of your choosing - you configure the pin selections in the Config Tool. The defaults are PTC9 for IR_OUT and PTA13 for IR_IN. The IR_OUT pin has to be PWM-capable, which limits the choice of pins; the Config Tool shows you the valid options.
The schematic above is for the IR transmitter and IR sensor. You also need a separate circuit block for "power sensing", which the firmware uses to detect when the TV ON command is needed. That's also on the expansion board schematics; here's the excerpted section for that one:

This one needs two additional GPIO pin inputs, also configurable via the Config Tool. These pins don't have any special requirements, so you can assign them to any free GPIO pins. The defaults are PSU2_STATUS_SENSE = PTD2 and PSU2_STATUS_SET = PTE0.
The power sensor circuit makes it all completely automatic - the firmware monitors the power status via the sensor circuit, and automatically sends the commands when it detects a power-on event. But if you wanted to simplify the hardware build part, you could potentially skip the sensor circuit, and instead use a Windows CMD script at system startup to send the IR commands. There's a command-line program, "PinscapeCmd", included with the Config Tool download that (among other things) can send IR commands from the Windows command line.
You can program the IR codes via the Config Tool. Once you've set up the hardware and configured the right pin connections in the firmware, you go to the IR Remote section in the Config Tool for programming. That lets you teach it IR codes pretty much like a typical learning remote - you press the "learn" button in the Config Tool UI and then point your remote at the IR sensor and press the button you want it to learn.