GPIOを使ってLEDを点滅させてみました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import RPi.GPIO as GPIO import time led_pin = 14 GPIO.setmode(GPIO.BCM) GPIO.setup(led_pin, GPIO.OUT) for i in range(20): GPIO.output(led_pin, True) time.sleep(0.5) GPIO.output(led_pin, False) time.sleep(0.5) GPIO.cleanup() |
The following two tabs change content below.
Keita N
最新記事 by Keita N (全て見る)
- PySimpleGUI のメモ - 2022年12月15日
- dezeroでニューラルネットワーク2 model, optimizer, MSEをフル活用 - 2022年11月27日
- dezeroでニューラルネットワークを使った回帰をやってみる - 2022年11月26日