bmellink / IBusBM

Arduino library for RC IBUS protocol - servo (receive) and sensors/telemetry (send) using hardware UART
GNU General Public License v3.0
205 stars 51 forks source link

Library not compatible with ESP32-Cam #10

Closed Hans007a closed 4 years ago

Hans007a commented 4 years ago

Hello,

I get after IBus.begin(Serial2,n,16,13); (n was greater as 2) errors. When I initialise the IBus before the cam I get this: Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. decoded: 0x400d3fe9: timerAttachInterrupt at d:\Arduino\arduino-1.8.3\portable\packages\esp32\hardware\esp32\1.0.4\cores\esp32/esp32-hal-timer.c line 174 0x400d37ec: onTimer() at D:\Arduino\arduino-1.8.3\sketch\libraries\IBusBM\src/IBusBM.cpp line 243 and after the cam: [E][camera.c:1049] camera_probe(): Detected camera not supported. [E][camera.c:1249] esp_camera_init(): Camera probe failed with error 0x20004 Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. decoded: 0x400d130c: index_handler(httpd_req*) at d:\Arduino\arduino-1.8.3\sketch\build\sketch/app_server.cpp line 421 0x400d130c: index_handler(httpd_req*) at d:\Arduino\arduino-1.8.3\sketch\build\sketch/app_server.cpp line 421 0x400d490f: Print::printf(char const*, ...) at d:\Arduino\arduino-1.8.3\portable\packages\esp32\hardware\esp32\1.0.4\cores\esp32/Print.cpp line 234 0x4008f165: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 355 (discriminator 1) the first are comming, because the cam is not initialised.

I set the SDCard to the 1bit mode, that the other pins are free.

Can You help me on this Problem?

Thank You

Hans

bmellink commented 4 years ago

I do not have the ESP32-Cam module, so I have to look at the specs. I like the module, so I may order one. Here a few suggestions: You are using serial2 in the IBus.begin() and also initialize a timer. In your case I would try 2 things:

  1. disable the timer (see example with IBUSBM_NOTIMER) and use polling
  2. try using serial1. The ESP32-Cam module does not gpio 17 (U2TXD) exposed and maybe it conflict with the camera. I see you overrule it to use gpio 13 but there is some issue with the core serial lib functions to override the pin. Did you make any more progress?