sorry for the long delay. I moved the transmitter next to the the sensor and still not working. weird thing is that when i set the transmitter to any pins, i get an red excalamtion point in pinscape software. its on PTA1 and the error says "This pin is assigned to multiple functions (IR LED transmitter output pin and Output Port 1). im using the pinscape to emulate a joystick and not sure if that is the issue. I only need the tv on, buttons and nudge.
Aha! The "multiple function" error is probably the problem. Any given GPIO pin can only be assigned to one function because the assignment controls its electrical connections inside the KL25Z.
Here's how you clear up the conflict. Open up the Pinscape Config Tool, to to the Settings page, and scroll down all the way to the bottom, to the "Feedback device outputs" section. Find port #1 in the list - it's probably showing as assigned to PTA1 given that's what the error is saying. Click somewhere in the row, which should bring up a dialog box with other GPIO pins you can assign to the port. Click the "Virtual Out" icon in the panel on the right side (you might have to scroll down to see it). Another "Virtual" icon should appear in the middle of the dialog box now - click that to assign the port to "virtual". That will remove the GPIO pin from the port, which will free it up for the IR transmitter.
"Virtual" means that the output port will still exist as far as the PC software is concerned, but isn't connected to anything electrically. ("Virtual" in the sense of "imaginary".) Since you're not using the output controller features, you don't need the output ports connected to anything, so you can free up the physical GPIO pins by un-assigning them like this. If you need any other GPIO pins in the future that are currently claimed for other output ports, you can free them up the same way.
Edited by mjr, 20 August 2018 - 04:22 AM.