Open marcmerlin opened 5 years ago
Don't expect real compatibility with IRRemote- the similarity is quite superficial. If you look at the headers, you can see that more complicated configurations will look nothing like IRRemote. Those log notifications indicate that you are getting back a 16-bit value instead of 32-bit. I'll change it to be a warning level rather than error. AFAICT, RMT has no special restrictions on what pins you can use. Espressif is not going to support 5V devices, but for IR, where you are only looking for a rising voltage, it should be fine. IR receivers usually have a wide voltage range, since they are often run on batteries, so it might be worth trying it out at 3V3.
Thanks for the quick reply. Yeah, I know there are very different kinds of remote codes, I guess I'm just lucky that for NEC they work exactly the same with your lib and the IRRemote lib I was using. Makes it convenient to be able to re-use the same codes. As for 3.3 vs 5V, you make a good point that I should power my IR receiver from 3.3V to avoid signal saturation, will change that.
as you guessed, switching to 3.3V power helped a bit, especially with RMT.
With one IR receiver, I'm seeing an endless list of those [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 1 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 1 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 1 bit when I'm not even sending/receiving anything.
With another one, those go away, but I'm still seeing spam lines when proper codes are received and decoded: Received: NEC/0xff1ae5 [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 2 bit Received: NEC/0xff1ae5 [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 2 bit
I hate to comment it out altogether as it would be nice for it to trigger only at the right times.
I'm using this receive only code I sent you as PR: https://github.com/lbernstone/IR32/pull/3/commits/8c33dc3165f14900f0fe3ea1965f64c7fcd6f06d
Also, please check that I didn't mess anything up when I cleaned all compile errors https://github.com/lbernstone/IR32/pull/2
When using my TV remote it doesn't know how to decode, I see [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 12 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 12 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 13 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 13 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 13 bit [E][IRRecv.cpp:94] rx_parse_items(): Item length was only 13 bit
Doesn't need to be fixed, pasting just in case
What is the tv remote? I don't have all the signal groups in there. If you can get IRremote to work with it on a 8266 or the like, you can figure out what the timing rates should be, and add it into IR32.h.
mmmh, that was in April, I don't remember which remote I used, nor do I really need it to work, I was just testing it to see if it was my NEC remote that had an issue or any remote. So let's forget about my TV remote comment (as I have 5 remotes), but duly noted on how to add remotes if needed
The length 2 items are just a start seq and end seq and I think that this is a repeat code.
First, thanks for this code, it works ok enough for me and is the first code I could find that worked with RMT. Also, thank you for making the output compatible with IRRemote.
When I use it though, I get a lot of these output lines. Is that expected spam or an issue with my receiver? I tried switching to another IR receiver that worked ok with the interrupt code, and I get almost no output from it (95% failure), just more lines of spam. I do power it from 5V and have its output line connected directly to the ESP32 input 34. This uses digitalread equivalent, so it's not impacted by the analog input issues on ESP32, and therefore which input pin I use shouldn't matter, correct?
Received: NEC/0xff827d [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit Received: NEC/0xff827d [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit Received: NEC/0xff827d [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit Received: NEC/0xff827d [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit Received: NEC/0xff827d [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit [E][IRRecv.cpp:93] rx_parse_items(): Item length was only 2 bit