IR Communications
Humanoido
Posts: 5,770
Are there any references to infrared communications between two props?
One program would have the prop send a character(s) to the other prop.
Another program would receive the character(s).
One program would have the prop send a character(s) to the other prop.
Another program would receive the character(s).
Comments
Data transfer can be fast, intermediate or slow.
Of course, simple and fast is preferred, but the emphasis is on simple.
Timing.spin is actually from here: http://obex.parallax.com/objects/113/
This object also helped a lot in getting to grips with IR stuff: http://obex.parallax.com/objects/37/
The LED I'm using is a·TSAL6100 and I'm using a mosfet to turn it on/off (the IR object in the obex mentioned has an example circuit diagram), a counter handles the carrier signal ('Carrier' constant in the files, I use 56khz but 38-40khz is common for remote controls).·The receiver I'm using is a TSOP4856, which runs fine on 3.3v and can hook straight to an I/O pin (datasheet recommends a 100ohm resistor on the 3.3v line before the receiver and a 0.1uF capacitor across it, but these are optional to "improve robustness against electrical overstress").
The files attached have methods for sending bytes or longs (or any number of bits, for RX you say how many bits you are expecting to receive, if it times out waiting it should return -1). I can't comment as to the actual speed or throughput, as it is not a big issue for my application. At any rate it should give you a starting point if nothing else.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
My addition is probably a bit pointless now anyway, that object JonnyMac linked to is compatible with the standard serial objects and that sounds like more what you're after.
humanoido
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
Post Edited (JonnyMac) : 2/18/2010 3:54:03 PM GMT