Last active
November 1, 2015 07:21
-
-
Save ks-t0/b152d6a85d2d9eb16972 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# | |
# ライブラリ呼び出し部 | |
import RPi.GPIO as GPIO # GPIOライブラリを呼び出し | |
import time # 時間関連のライブラリを呼び出し | |
# 初期設定部 | |
GPIO.setmode( GPIO.BOARD ) # GPIOを端子番号で指定する | |
GPIO.setup( 16, GPIO.OUT ) # 16番端子を出力に設定する | |
# プログラム本体 | |
while True: # 繰り返しを行う | |
GPIO.output( 16, GPIO.HIGH ) # LEDを点灯する | |
time.sleep(1) # 1秒待機する | |
GPIO.output( 16, GPIO.LOW ) # LEDを消灯する | |
time.sleep(1) # 1秒待機する |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment