Simple IRremote question

Status
Not open for further replies.

A. Williams

Well-known member
I'm sorry to bother you guys with this seemingly very simple question, but I don't exactly understand, and there doesn't seem to be any documentation explaining what piece of information goes into the "numBits" field when transmitting an IR signal from teensy.

irsend.sendNEC(IRcode, numBits);


Wouldn't the IRcode itself denote the number of bits being sent? what exactly would the numBits value be in this case?


Also, for the record, this is the message I'm trying to send (but I don't know what to fill in the question marks:
irsend.sendNEC(0x00602, ??);

ANY additional information about "numBits" would be extremely helpful as I haven't been able to find any. Thanks for your time!
 
Just quickly scanning the IRremote page, it looks like numbits is the actual number of bits in the IRcode, ie 0x00602 = 5 hex nibbles = 20bits.

Just a guess on my part, though, YMMV.
 
hmmm ok. What if I just wanted to send a logical "1" ? would I write a speck of code like "irsend.sendNEC(1,1);"
 
So following this guide http://www.sbprojects.com/knowledge/ir/nec.php
It would appear I need to first send a 9 ms burst of the infrared led then a 4.5ms space of "silence" before I even transmit my message? Just selecting the IR format as sendNEC would these pulses be included in the transmission or do I have to manually include them by doing something like "digitalWrite(IRpin,HIGH); delayMicroseconds(9000); digitalWrite(IRpin,LOW); delayMicroseconds(4500);"?

While this seems like a really helpful library, there are so many small things that have not been explained, and it's making the debug process really frustrating :p
Any help would be very much appreciated!
 
Status
Not open for further replies.
Back
Top