Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the simply-static domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wp-includes/functions.php on line 6121
light led

light led

import RPi.GPIO as GPIO   #导入树莓派提供的python模块
import time   #导入时间包,用于控制闪烁
GPIO.setmode(GPIO.BCM)   #设置GPIO模式,BCM模式在所有数码派通用
GPIO.setup(26, GPIO.OUT)   #设置GPIO18为电流输出
while True:
    GPIO.output(26, GPIO.HIGH)   #GPIO18 输出3.3V
    time.sleep(1)   #程序控制流程睡眠0.05秒
    GPIO.output(26, GPIO.LOW)    #GPIO18 输出0V
    time.sleep(1)   #程序控制流程睡眠0.05秒