IR Send and Receive
The Infrared Emitter is used to transmit infrared signals through an infrared LED, while there is an Infrared receiver to get the signals on the other side . An infrared LED is like any other LED, with its color centered around 940nm. We can use the emitter not only to transmit data or commands, but also to emulate remotes to control your home appliance using an Arduino. The Infrared Emitter can transmit signals reliable up to 10 meters. Beyond 10 meters, the receiver may not get the signals.
The Infrared Receiver is used to receive infrared signals and also used for remote control detection. There is a IR detector on the Infrared Receiver which is used to get the infrared light emitted by the Infrared Emitter. The IR detector have a demodulator inside that looks for modulated IR at 38 KHz. The Infrared Receiver can receive signals well within 10 meters. If more than 10 meters , the receiver may not get the signals. We often use the two Twigs-the Infrared Receiver and the Infrared Emitter to work together.
This library include 2parts, ir send and ir receive.
You can use this function to send a buf:
void Send(unsigned char *dta_buf, unsigned char ifreq);
dta_buf len of the buf(not include dta_buf)
dta_buf start signal high time
dta_buf start signal low time
dta_buf bit high time
dta_buf bit low time
dta_buf data lenght(how many byte to send)
dta_buf dta_buf[n] : data to send
ifreq: frequence, eg:38(means 38k)
IR.Init(pin); // pin to receive
IR.IsDta(); // if get data, return 1
IR.Recv(unsigned char *dta);
For more information, please refer to wiki page.
Contributing to this software is warmly welcomed. You can do this basically by
forking, committing modifications and then pulling requests (follow the links above
for operating guide). Adding change log and your contact into file header is encouraged.
Thanks for your contribution.
Seeed Studio is an open hardware facilitation company based in Shenzhen, China.
Benefiting from local manufacture power and convenient global logistic system,
we integrate resources to serve new era of innovation. Seeed also works with
global distributors and partners to push open hardware movement.