我根据官方提供的排针定义图,做了一个扩展板,用来控制三路继电器,分别用的GPIO1_D0,GPIO1_D1,GPIO1_D2,其中D0,D1上电就输出高电平,改变io方向也一样无法控制 echo 56 > /sys/class/gpio/export echo 57 > /sys/class/gpio/export echo 58 > /sys/class/gpio/export echo "out" /sys/class/gpio/gpio56/direction echo "out" /sys/class/gpio/gpio57/direction echo "out" /sys/class/gpio/gpio58/direction echo 0 /sys/class/gpio/gpio56/value echo 1 /sys/class/gpio/gpio56/value echo 0 /sys/class/gpio/gpio57/value echo 1 /sys/class/gpio/gpio57/value echo 0 /sys/class/gpio/gpio58/value echo 1 /sys/class/gpio/gpio58/value ls /sys/class/gpio/gpio58 cat /sys/class/gpio/gpio58/direction cat /sys/class/gpio/gpio58/value |
-
1.72 KB, 下载次数: 1, 下载积分: 灯泡 -1 , 经验 -1