Can't find driver/rmt_rx.h: No such file or directory

May be I'm overlooking something very simple, but I can't figure it out.

Want to use a library (DShotRMT.h by DrGlaucous) to implement a DShot protocol on my Arduino ESP32 using the newer RMT backend infrastructure introduced with espidf 5.0.0.

To enable this for the Arduino env, DrGlaucous made an additional library (ESP-RMT-NEO) since Arduino still uses the 4.x version of espidf.

However, I can't get it to work. This is the error message after compiling this piece of code.

#include <DShotRMT.h>

const byte p_FL = 7;  //
DShotRMT motorFL(p_FL, RMT_CHANNEL_0);

void setup() {
  motorFL.begin(DSHOT300);
}

void loop() {
  motorFL.send_dshot_value(48);
}

Can't find driver/rmt_rx.h: No such file or directory

Installed both libs using Sketch->Include library->Add .ZIP library.... all good
Libs are in the right place (arduino->libraries->DShot-rmt and rmtNEO), 'src' directory is in the right place, 'driver' subdirectory is in the right place.

libraries/

  └── DShot-rmt/
    └── dev, examples, etc
    └── src/
      └── DShotRMT.cpp
      └── DShotRMT.h

  └── rmtNEO/
    └── .json, .properties, readme, etc
    └── src/
      └── clk_tree_defs.h
      └── driver/
        └── rmt_rx.h
        └── <other .h files>

And still no success.

What am I doing wrong here?

Idk if this is exactly your case, but read this thread, they seem to have solved the issue:

Thanks for your reply. However, I can not find a file called "CMakeLists.txt " in any of the used libraries.

Still not knowing the specific libray, It looks like as "driver" directory isn't part of the DShot-rmt library structure, so obviously the path "driver/rmt_rx.h" fails.

I don't know if it's kinda problem of both libraries and/or the way they've been installed, but even the enclosed example has the same #include of your sketch and it should work (not in your environment).

Anyway, I see the "DShotRMT.h" file includes those paths:

#include <driver/gpio.h>
#include <driver/rmt_tx.h>
#include <driver/rmt_rx.h>
#include <driver/rmt_types.h>

They seem to be part of that other "rmtNEO" library, so perhaps something went wrong with the installation or configuration, I don't know.

I think you should first double check the libraries you installed (are there others to do the same? Or newer versions? Do they need to be installed separately or using a specific procedure?). Then, if everything fails, contact the library author.

I think @docdoc is onto something.

When you compile a sketch, Arduino IDE searches for the library that provides each of the header files specified in the #include directives of your sketch program's code (both the code in the sketch itself, and in the libraries used by the sketch). It then adds the paths of the discovered libraries to the compiler's "search path". However, this "library discovery" system only searches the root of the library source folders, so it won't discover libraries for which the #include directive specifies a header file in a subfolder of the library.

So the way to fix this problem is to cause Arduino IDE to discover the "rmtNEO" library that provides the driver/rmt_rx.h header file, making sure the discovery occurs prior to reaching the #include directive for the header file in the subfolder of the library. You can do that by adding an #include directive for a header file from the source root folder of the library above the #include directive for DShotRMT.h (which transitively provides the #include directive for driver/rmt_rx.h).

So add the following code to the top of your sketch:

#include <clk_tree_defs.h>

Then compile the sketch again. When I did that, I found that the "driver/rmt_rx.h: No such file or directory" error no longer occurred. I did encounter an new error:

C:\Users\per\Documents\Arduino\sketch_jun7a\sketch_jun7a.ino:5:24: error: 'RMT_CHANNEL_0' was not declared in this scope
 DShotRMT motorFL(p_FL, RMT_CHANNEL_0);
                        ^~~~~~~~~~~~~
Using library rmtNEO at version 0.0.3 in folder: C:\Users\per\Documents\Arduino\libraries\rmtNEO 
Using library DShot-rmt at version 4.3.0 in folder: C:\Users\per\Documents\Arduino\libraries\DShot-rmt 

but at least it gets you past the library discovery problem.

Thanks very much for your help. Works!!

And yes, time to deal with the next hurdles :wink:

You are welcome. I'm glad if I was able to be of assistance.

Regards, Per