Use wiringpi delay function for Python version instead of Python's sleep function