I added my modification so it works on a Raspberry pi