= Raspberry Pi上のサンプルプログラム(Python) = Raspberry Pi上のPythonによる[https://github.com/SWITCHSCIENCE/Watchdog_for_RaspberryPi サンプルプログラム]です。 プログラムの動作は、「1秒に一回、GPIO17にパルスを1回出す。」です。 - blink17.py {{{ #!/usr/bin/env python import RPi.GPIO as GPIO import time LEDPIN = 17 GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(LEDPIN, GPIO.OUT) while True: LEDon = GPIO.output(LEDPIN, 0) time.sleep(0.5) LEDoff = GPIO.output(LEDPIN, 1) time.sleep(0.5) }}}