快捷导航
2 5403

how to controll GPIO

taniguchi 于 2020-10-5 17:51 发表 [复制链接]
本帖最后由 taniguchi 于 2020-10-5 18:27 编辑

#switch to rootsudo su -
#set GPIO to high
echo 1 > /sys/class/gpio/gpio339/vlaue
#set GPIO to low
echo 0 > /sys/class/gpio/gpio339/vlaue

I tried this command but it showed  Permission denied.How can I controll GPIO?


举报 使用道具
| 回复

共 2 个关于本帖的回复 最后回复于 2020-10-9 11:24

taniguchi 游客 发表于 2020-10-8 14:16 | 显示全部楼层
I was able to control GPIOs by adding users to a privileged group.
On the other hand, setting the output of the DO to high does not allow current to flow. I would appreciate your solution.
大米力 超级版主 发表于 2020-10-9 11:24 | 显示全部楼层
there is no GPIO 339, 339 is just a sample, please follow the instruction

GPIO Please change the code in <> to your GPIO export value #switch to root sudo su - #set GPIO to high echo 1 > /sys/class/gpio//vlaue #set GPIO to low echo 0 > /sys/class/gpio//vlaue For auto config, write above commands to file /etc/rc.local. UART Open device node in /dev/. Then use stty command to set parameters. See stty command manual for details, please change the code in <> to your UART device node. #config UART $ sudo stty -F /dev/ speed 115200 cs8 -parenb -cstopb -echo #send data...
您需要登录后才可以回帖 登录 | 点我注册

精彩推荐

  • canbus与vcu相连接,出现bus-off状态
  • 有线连接失败
  • Apex 串口通讯
  • 关于SPI通信问题咨询
  • MIIVII APEX DUAL ORIN米文域控制器产品合

明星用户