I know about this library, https://github.com/z3t0/Arduino-IRremote , I contributed the ESP32 support for it 2 years ago.
That being said, that library is all interrupt driven and the ESP32 support I added doesn't make use of RMT, which would be a pretty complex change in that library.
Has anyone written another ESP32 RMT IR receive library that I may be able to use?
Has anyone made an RMT IR Receive library for ESP32/arduino?
-
- Posts: 30
- Joined: Mon Apr 17, 2017 12:50 am
Re: Has anyone made an RMT IR Receive library for ESP32/arduino?
I was struggling to find a RMT library to deal with 433MHz data delivered on a GPIO pin. There simply is none in the public, so I wrote my own classes to handle that. It works quite nicely now, but it is special from the point where the RMT has delivered the captured signal data into the ring buffer.
I attached the relevant files*; basically, the ManchesterRX class will process the RMT output in a separate task, generating BitStream buffers with the found signal sequences in binary form. The host will have to process the BitStreams as seems fit and release the buffers again for re-use by ManchesterRX.
The speciality comes from the omission of any other signals than Manchester or PWM encoded messages (the latter with two different phase lengths only) - for IR you certainly will have to extend it.
Feel free to use anything you may need. I will be happy discussing what you may find
*it seems not to be possible to add more than three files to a post here, so please find the BitStream files in the next.
I attached the relevant files*; basically, the ManchesterRX class will process the RMT output in a separate task, generating BitStream buffers with the found signal sequences in binary form. The host will have to process the BitStreams as seems fit and release the buffers again for re-use by ManchesterRX.
The speciality comes from the omission of any other signals than Manchester or PWM encoded messages (the latter with two different phase lengths only) - for IR you certainly will have to extend it.
Feel free to use anything you may need. I will be happy discussing what you may find
*it seems not to be possible to add more than three files to a post here, so please find the BitStream files in the next.
- Attachments
-
- ManchesterRX.h
- (1.8 KiB) Downloaded 1080 times
-
- ManchesterRX.cpp
- (9.63 KiB) Downloaded 1102 times
Re: Has anyone made an RMT IR Receive library for ESP32/arduino?
BitStream files included here.
- Attachments
-
- BitStream.h
- (1.76 KiB) Downloaded 1009 times
-
- BitStream.cpp
- (2.9 KiB) Downloaded 1015 times
-
- Posts: 30
- Joined: Mon Apr 17, 2017 12:50 am
Re: Has anyone made an RMT IR Receive library for ESP32/arduino?
Thanks for sharing. I think Infrared is 38Khz, but I'll see if your code can be made to used anyway.
Re: Has anyone made an RMT IR Receive library for ESP32/arduino?
It all depends on the clock divider in rmt_config. The RMT is capable of up to 4MHz AFAIK. I am using a relatively high divider of 150, giving a sampling rate of 80MHz/150=533 kHz. Even that would be about 14 times oversampling for a 38kHz signal.
Oh, BTW: I am sampling a 2000bd signal, not the 433MHz carrier
Oh, BTW: I am sampling a 2000bd signal, not the 433MHz carrier
-
- Posts: 30
- Joined: Mon Apr 17, 2017 12:50 am
Re: Has anyone made an RMT IR Receive library for ESP32/arduino?
I was pointed to https://github.com/lbernstone/IR32 and was able to use it.
It has some small unreliabilities I'm still working with, but overall it works.
It has some small unreliabilities I'm still working with, but overall it works.
Re: Has anyone made an RMT IR Receive library for ESP32/arduino?
Hi
I am struggling with trying to receive 433 Mhz data myself. My data is not manchester encoded. I am not sure how to use your bitstream lib.
I need to detect the start of a transmission. 15.6 MS LOW followed by 2.6 MS HIGH then capture 64 bits.
A Logic 0 is 0.88 ms low and 0.44 HIGH and a Logic 1 is 0.44 LOW and 0.88 HIGH.
I have tried using digital read but cannot capture the LOGIC signals in time. I think the RMT is what i need but I am now stuck as no idea how to use it.
Help...
JT
I am struggling with trying to receive 433 Mhz data myself. My data is not manchester encoded. I am not sure how to use your bitstream lib.
I need to detect the start of a transmission. 15.6 MS LOW followed by 2.6 MS HIGH then capture 64 bits.
A Logic 0 is 0.88 ms low and 0.44 HIGH and a Logic 1 is 0.44 LOW and 0.88 HIGH.
I have tried using digital read but cannot capture the LOGIC signals in time. I think the RMT is what i need but I am now stuck as no idea how to use it.
Help...
JT
Who is online
Users browsing this forum: No registered users and 73 guests