@valentin after reviewing the Yun code, I realized that you are using serial port communication exclusively.
By copying and modifying the code you had in place, it was fairly trivial to enable the same for the Pi. The only “gotcha” is that the default OS install ties the Pi’s serial communication channel to the console (for login purposes). This is easy to disable, but it’s a manual process, so I updated the README with the appropriate steps.
Here’s the pull request, with Pi support. I wasn’t sure what to do about the copywrite info, because it’s largely borrowed code, so I left your standard header on the new file.