-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when compiling %moddable%\examples\rmt\write example #1296
Comments
Yes, unfortunately the ESP-IDF v5 APIs changed completely. This module was broken as a result. It is a non-trivial project to rewrite for the revised APIs. |
Is there an alternative for RMT for writing pulses at different pulse-times? |
Em.... I hit this problem too. I'll try to put something together in the coming week. |
@linfan68 Thx for hinting to the neopixel implementation with RMT. Unfortunately, I am not a C-programmer. It is a pity that espressif decided to change the specs of RMT and maybe they will do that again in the furure. |
In Espressif's defense, when they introduce incompatible APIs, they are almost always an improvement over what was there before. However, the change can be very disruptive to the ecosystem because the APIs are often a complete redesign. ESP-IDF 5 migration was a big project for us because of a bunch of API changes. |
I'm using RMT module quite extensively, andI could totally understand why they redesigned the API. The legacy one was pretty buggy and quite convoluted. As a matter of fact, the new RMT api was one of the reasons we updated our system to IDF 5. |
I will give it a try to update RMT module to IDF 5 API. @phoddie do you think I should try to keep the JS interface (mostly the configuration object) unchanged? |
@linfan68 – in a perfect world the JavaScript API would be stable. If that is impractical because of significant changes to the underlying APIs, then it would make sense to reshape the API around that. |
@linfan68. Maybe a Javascript api around RMT, that resembles the setWatch/diditalPulse functionality of Espruino? I keep trying... |
emmm… this layer of api (under module/pins ) does not work in this way. They have very minimal and standard read/write methods. But with read/write you can wrap a higher level api easily. |
@louisvangeldrop I have a simple demo working (with the new RMT module an a test js app): Only TX, and notice I changed the way JS sends sequence encoding to the C side to match the RMT protocol (also save some memory), for details check the .js code.: You should see waveform like this: LOTS of things missing:
I'm still struggling about how to match the RMT design with the JS interface. For example, the RMT native module supposed to work with an "encoder" that transform byte data into RMT sequence on-the-fly, but that encoder needs to be implemented with the native code (because it's time critical, and needs to be placed in IRAM), which is not achievable by JS code. |
That seems like a practical first step. If the sequence is not too long, it should be fine. It looks like that is what the IDF v4.x implementation does. |
@linfan68 . Thank you very much for the RMT-TX demo. I going to try it out with a RF433-switch as soon as possible. |
@linfan68 . I have tried your demo, but maybe I'm missing a library. In manifest.json there is a reference to "../../modules/rmt/manifest.json". However the folder "modules" is missing. |
There are two folders in the zip (rmt and rmt-test), you need to extract
rmt folder somewhere in your tree and change the reference path to the
manifest file in it.
If you extract both folders in the same dir, try to change that line into:
"../rmt/manifest.json"
Louis van Geldrop ***@***.***>于2024年2月18日 周日下午11:09写道:
… @linfan68 <https://github.com/linfan68> . I have tried your demo, but
maybe I'm missing a library. In manifest.json there is a reference to
"../../modules/rmt/manifest.json". However the folder "modules" is missing.
—
Reply to this email directly, view it on GitHub
<#1296 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABFQYSFRPU5642VGCI6YE5LYUIKRXAVCNFSM6AAAAABB7A2ONCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGM2TGNBSG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I have changed the link into "../rmt/manifest.json". However it freezes after:
|
In the meantime I have tried to use the Digital-class to implement the digitalPulse function with success with respect to RF433. It turns out that the following function works:
|
Emmmm… if what you need is a simple square wave, checkout the PWM module. This implementation is very inefficient, what is the frequency of the signal you need? |
The times do vary from 25 microseconds to 2000 microseconds. |
Build environment: Windows
Moddable SDK version:
Target device: ESP324.3.8-17-g595da4b7a
Error
Steps to Reproduce
The text was updated successfully, but these errors were encountered: