Skip to content
IRSendRev v1.0
Branch: master
Clone or download
Latest commit f434293 Apr 10, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples update Jul 7, 2015
.gitattributes add .gitattributes Apr 10, 2018
.gitignore add .gitignore Apr 10, 2018
IRSendRev.cpp update Jul 7, 2015
IRSendRev.h first blood Jun 25, 2013
IRSendRevInt.h Fixed some compilation error for leonardo Aug 29, 2016
LICENSE.txt first blood Jun 25, 2013
README.md Correct links Apr 10, 2018
keywords.txt first blood Jun 25, 2013
library.properties add library.properties Apr 10, 2018

README.md

IR Send and Receive

Grove - Infrared Emitter

Grove - Infrared Receiver

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.

Usage:

This library include 2parts, ir send and ir receive.

Send Data

You can use this function to send a buf:

void Send(unsigned char *dta_buf, unsigned char ifreq);
  • dta_buf[0] len of the buf(not include dta_buf[0])

  • dta_buf[1] start signal high time

  • dta_buf[2] start signal low time

  • dta_buf[3] bit high time

  • dta_buf[4] bit low time

  • dta_buf[5] data lenght(how many byte to send)

  • dta_buf[6] dta_buf[n] : data to send

  • ifreq: frequence, eg:38(means 38k)

Receive Data

Initialize:

IR.Init(pin);		// pin to receive

Check Data:

IR.IsDta();			// if get data, return 1

Receive Data:

IR.Recv(unsigned char *dta);	

For more information, please refer to wiki page.


This software is written by loovee luweicong@seeedstudio.com for seeed studio
and is licensed under The MIT License. Check License.txt for more information.

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.

Analytics

You can’t perform that action at this time.