Modified Python and Arduino code to play nicely with eachother