Hi TinyCircuits,
Question: Is it possible to use the Wireling IR-Emitter and Wireling IR-Receiver to detect simple beam breaks using a TinyZero?
I'm trying to convert a circuit I built using a TinyZero, to Wirelings. This had used a simple non-wireling IR-emitter LED and IR-detector pair (
https://www.sparkfun.com/products/retired/241), soldered in to a tiny shield with appropriate resistors; the IRD required a 10kOhm pull-up resistor. (It reports a beam break when you block a porthole with an IR illuminator-detector pair on either side, at a sample rate of about 20ms, and writes to microSD.)
I was able to get this working with the same resistors by cutting a Wireling cable and soldering the old IR-emitter and detector up with their same appropriate resistors inline (including the 10k Ohm pullup for the IRD and a 220ohm resistor for the IRE) to the Wireling cable. This uses the Wireling library, but doesn't use the IRremote library.
But it would be much nicer to use the actual Wireling IR Emitter and Wireling IR Receiver and avoid the need to solder in resistors!
I've gotten the Wireling IRE and IRD to send and receive "IR codes" from your tutorial examples on my TinyZero (although the interrupts were a bit of a mystery), but can't seem to get the IRD to recognize the mere presence or absence of a signal from the IRE - and am not even sure if have managed to send the signal in that mode.
I'm attempting to adapt this code :
http://www.righto.com/2010/03/detecting-ir-beam-break-with-arduino-ir.htmlOne problem : The Wireling IRD TSOP572 datasheet says it suppresses "Continuous signals at any frequency", which that page says will prevent the code from working -- There's some workarounds for this in some comments on that page but I have not been able to get them to work. I don't have a good enough understanding of how the IRremote library and Wirelings work together to adapt them to get the IR-emitter to simply send a continuous signal and the IR-detector to simply detect its presence or absence.
I'd be grateful for any suggestions!
(edit: had another question about pull-up resistor use, posted that separately).