Use wiringPi python library.