lbernstone / ir32 Goto Github PK
View Code? Open in Web Editor NEWInfrared remote using rmt peripheral on esp32
License: MIT License
Infrared remote using rmt peripheral on esp32
License: MIT License
I get the following error in console when trying to run the loopback example:
ets Jun 8 2016 00:22:57
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:9232
load:0x40080400,len:6400
entry 0x400806a8
real tick set to: 100.000000ns
/Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/event_groups.c:350 (xEventGroupWaitBits)- assert failed!
abort() was called at PC 0x4008554b on core 1
Backtrace: 0x40089720:0x3ffb1f20 0x4008994d:0x3ffb1f40 0x4008554b:0x3ffb1f60 0x400d0c4a:0x3ffb1f90 0x400d201d:0x3ffb1fb0 0x40085759:0x3ffb1fd0
Rebooting...
Hello,
When trying to compile on ESP32C3 i got an error with vector, any idea?
IRRecv.h:35:10: error: 'vector' in namespace 'std' does not name a template type std::vector<uint8_t> _preferred;
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
After inspecting the signal with logic analyser, I found that it definitely does not have 38kHz carrier freq.
In the IRSend / IR32 files, there is a mismatch in units (says kHz, but constants are in Hz already and then multiplied by 1000 again)
The example code works fine on my ESP32, but when I integrate your lib in a much bigger code base that uses DMA and probably one code to push to the RGBPanels (in the SmartMatrix library), your library crashes here:
uint32_t IRRecv::read(char* &timingGroup, bool preferredOnly)
{
if (!available()) return 0;
size_t rx_size = 0;
rmt_item32_t* item = (rmt_item32_t*) xRingbufferReceive(_rb, &rx_size, RMT_RX_BUF_WAIT); <<<
0x4008a1b0: invoke_abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 155
0x4008a3e1: abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 170
0x4008600b: xRingbufferReceive at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp_ringbuf/ringbuf.c line 845
0x400e221e: IRRecv::read(char*&, bool) at /home/merlin/Arduino/libraries/IR32/src/IRRecv.cpp line 128
0x400ded35: check_IR_serial() at /home/merlin/arduino/prg/Neopixel/NeoMatrix-FastLED-IR/NeoMatrix-FastLED-IR.ino line 2273
0x400dfb93: setup() at /home/merlin/arduino/prg/Neopixel/NeoMatrix-FastLED-IR/NeoMatrix-FastLED-IR.ino line 3158
0x400e46b3: loopTask(void*) at /home/merlin/Arduino/hardware/espressif/esp32/cores/esp32/main.cpp line 14
0x400861f1: vPortTaskWrapper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/port.c line 143
19:24:56.431 -> Backtrace: 0x4008a1b0:0x3ffb1ea0 0x4008a3e1:0x3ffb1ec0 0x4008600b:0x3ffb1ee0 0x400e221e:0x3ffb1f20 0x400ded39:0x3ffb1f50 0x400dfb93:0x3ffb1f80 0x400e46b3:0x3ffb1fb0 0x400861f1:0x3ffb1fd0
19:24:56.431 ->
19:24:56.431 -> Rebooting...
19:24:56.431 -> ets Jun 8 2016 00:22:57
19:24:56.431 ->
19:24:56.431 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
19:24:56.504 -> configsip: 0, SPIWP:0xee
19:24:56.504 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
Is there a way to make this compatible with SmartMatrix?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.