Skip to content
FunkyFab edited this page Mar 27, 2022 · 9 revisions

My ESP32 works initially well, but it stops after a while. Why?

Some batteries stop when they think nothing is connected. And the ESP32 takes so little amps that the battery may think that nothing is connected.

Why the hell such a complicated code? Couldn't it be more simple?

Yes it could. But, for the same reason as for the previous question, if Wifi is turned off on my ESP32, the device take so little amps that the battery stops. And that's not the case when the Wifi is up (draining more current). I wanted the device to operate as quickly as possible when plugged in. That's the reason why there's multitasking: the device can start reacting to the pedals, and go on with Wifi initialization. With that approach, the device is ready in 500ms whereas the Wifi is ready few seconds after. Then, with Wifi up, I decided I would have OTA (Over The Air) updates possible (new programs can be uploaded to the ESP32 through the network, and not the USB cable).

After a system update on the tablet, the pedal no longer works

After an update, the services are reset to default. The step enable the host modehas to be performed once more.

Your code is crappy. It doesn't not compile

3 answers to that:

  • Some libraries are necessary. It's pretty easy to install libraries from Arduino IDE. I don't remember the ones I used ...
  • Maybe you forgot to create a 'secrets.h' file containing the Wifi SSID, password and OTA password
  • Well... maybe you can try to find the problem, and give me the solution. I'll let the community enjoy

Clone this wiki locally