edrumulus
edrumulus copied to clipboard
EEPROM -> Preferences for ESP32
For ESP32 : implement Preferences for settings storage as it "should be considered as the replacement for the Arduino EEPROM library".
Thanks, I use to code with python... I guess I need to learn to define and type constants ! Is it OK now ?
Could you approve this workflow message @corrados ? Maybe these workflows approvals should be approved automatically?
I changed something in the settings. So, hopefully now it works without the need for approval.
Just to give you a bit of history regarding settings storage on the ESP32:
As I pointed out, I already had an implementation ready for this which seemed to work perfectly. So, I used this for my Protoype 3 (HD-1) which I used regularly. I could play for days without any issues. Then suddenly, one pad did not work anymore. I thought that this would be an electrical contact issue of some sort and did investigating the hardware. This process took me hours and finally I found out that simply the MIDI note in the Edrumulus settings had suddenly changed to a different value. That caused that no sound came out of the headphones for this particular pad. So, in the end, it was not a hardware issue but a settings issue. That was very annoying for me (and would be for other Edrumulus users as well).
Therefore, I am very cautious about settings storage on the ESP32. You are using a different library than I did which may solve that issue. But it may also be the case that internally in the library you now use, the same ESP functions are used which I used in the past.
Therefore, before I merge this code, I need you (and maybe @thijstriemstra) to extensively test it over a couple of days (maybe even weeks) to really make sure that it works reliable.
BTW, the problem I see here is that you are using it only on the ESP32-S3 but I saw the problems when I was testing it with the older ESP32. Therefore, it may work for the S3 but not for the old ESP32. These are problems you have if you support multiple different types of hardware. Testing and verifying can be a nightmare...
You are using a different library than I did which may solve that issue.
The Preferences classes are part of official esp32 codebase (it's not a 3rd party library) and should be very stable (at least in my projects).
It'll need some testing though.
I agree, but I'm not yet with a setup that could be used daily for extensive tests... I'll need to build the hardware first, but for now I'm trying to make the algorithms work with my mps850 pads #138 . Not easy to understand how to tune each parameters...
I would start with playing with the existing pad types. Maybe you find some which give you good results. But not only play with the pad types but also with threshold, sense, etc. parameters
It's a while ago since you submitted this code. Have you had time to test it a lot? Did it work reliably for you?
Hi @corrados , Sorry, I didn't have much time to work with edrumulus yet. I only have a test hardware with 2 inputs. For now, I've tried in vain to adjust both resistors and parameters to work on my positional sensing issue #139. I hope I'll have more time to play with that next weeks. Did someone else try this Preferences fork ?
Sorry, I didn't have much time to work with edrumulus yet.
Absolutely no problem. Just wanted to check for updates. No hurry at all, just take your time :-)
@thijstriemstra You approved this merge request. Does that mean that you have tested this code and are happy with the results?
I'll integrate the code now. Thanks for the contribution.