See here for GPIO pin numbers.
pip install wiringpi
led_test.py
import wiringpi
import time
out_pin = 23
wiringpi.wiringPiSetupGpio()
wiringpi.pinMode(out_pin, wiringpi.OUTPUT)
for i in range(0, 5):
wiringpi.digitalWrite(out_pin, 1)
time.sleep(1)
wiringpi.digitalWrite(out_pin, 0)
time.sleep(1)
GPIO HEADER of raspberrypi3 WiringPi function memo
Recommended Posts