RyoKosaka / HelloDrum-arduino-Library

This is a library for making E-Drum with arduino.
https://open-e-drums.com/
MIT License
234 stars 57 forks source link

Esp32 #27

Closed sgllab closed 3 years ago

sgllab commented 3 years ago

I'm having an issue with the velocity reading being inverted on an esp32. I added a quick velocity =1023-velocity in the single piezo function but I can't figure out what's doing it. I tried uncommenting the pull-up define but that wrecked more havoc so I think there's something somewhere doing it prior that I can't find. If you could point me what I'm doing wrong, that'd help me a good bit. Thanks for all the hard work and help.

RyoKosaka commented 3 years ago

Thanks for pointing that out. I tested it and reproduced the same phenomenon. I don't know where I went wrong, but I guess I didn't check it enough.

I'll fix it in the next release, but in the meantime, the following should work.

in hellodrum.cpp, line 145 piezoValue = 1023 - piezoValue / 4;

Thank you.

sgllab commented 3 years ago

Thank you! Great programming btw. Saved me a ton of work. Best.

NinjaPanas commented 3 years ago

Thank you! Great programming btw. Saved me a ton of work. Best.

His work is just awesome, that's true. He is my hero! :)