本帖最后由 风火轮用户97845 于 2019-1-18 16:05 编辑
wiringPi for Python在M4的安装zhihou 创建一个python源文件: vi led.py
然后键入如下代码: import wiringpi as wpiimport time
wpi.wiringPiSetup()
wpi.pinMode(7, 1)
while True:
wpi.digitalWrite(7, 1)
time.sleep(1)
wpi.digitalWrite(7, 0)
time.sleep(1)
运行:
报错,出现错误
err:wiringPiSetup:must be root .(Did you forget sudo?)
|