hello! i don't know if this thread is still alive, but I created something similar with an arduino and it's kind of working.
feel free to reuse the code (if you make some products out of it please credit me and, if you feel generous, send me one ;) ).
https://github.com/lbrutti/arduinoModPedal...