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 (全て見る)
- python MNIST問題 - 2020年12月19日
- python バフェット流 バリュー投資判断 - 2020年12月19日
- Python:webカメラとOpenCVで動体検知してLine Notifyで画像を通知する - 2020年12月19日