We recently published a post on our blog, showing how to send IR signals on Arduino using simple PWM.
As we recently received our Photon, we decided to update it to cover the photon as well. The photon looks like an interesting platform for IR projects.
The blog is part 2 of a 3 part series covering this method and can be found here:
(Part 1 is also available & Part 3 which shows how to send IR signals from Binary/Hex values will be published soon for both Arduino & Photon)
We have checked the carrier frequencies & duty cycles generated by the Photon using this approach on the scope & the accuracy is fine for 95%+ of projects. (i.e. 30, 33, 36, 38, 40, 56 kHz)
D6 is used for the IR out pin, but you can change it to any other IO pin in the definitions.
You will find a link to the Photon sketch near the end of the post.
Here are some images of the generated signals:
NEC 32 bit IR Signal (With partial repeat visible)
Mitsubishi 88 bit Air Conditioner Signal
The signals were captured with AnalysIR, automatically cleaned & the buffer contents in the sketch automatically generated in ‘C’ format for inclusion in the sketch.
Feel free to ammend the code to suit your own needs.
Spark Core version: Unfortunately as we do not have a Core, we are unable to make a version available.