Python code for 3d printer on Beaglebone Black