Trying to change some things to get this code to work on the beaglebone...