之前的两篇文章详细讲述了如何使用香蕉派版本的RPI.GPIO来控制香蕉派M3的GPIO点亮LED。
其实控制香蕉派的GPIO还有好多种方法,比如说使用香蕉派版本的Wiring Pi或者直接插入gpio-sunxi.ko
内核模块后,直接读写设备来实现。
cd /lib/modules/3.4.39-BPI-M3-Kernel/kernel/drivers/gpio
sudo insmod gpio-sunxi.ko
cd /sys/class/gpio_sw
就可以看到一大堆类似如下的目录(链接)
进到针脚对应的目录,就可以直接操作data啦,至于这些都对应哪个针脚,要去对照原理图,我就不去细挖了。
学知识要避免两个极端,一是不求甚解
,二是太求甚解
。有时候研究研究就忘记了自己原本是要做什么,所以要牢记初心,避免自己走得太远偏离了方向。
其实香蕉派还是非常好玩的,我找到我以前玩香蕉派时的一些图片:
看了一下1602的时钟,竟然已经过了4年半啦,时间过得真快啊。
相关链接
相关资料
- https://www.banana-pi.org.cn/m3.html
- https://github.com/BPI-SINOVOIP/RPi.GPIO
- http://wiki.banana-pi.org/Getting_Started_with_M3#Using_RPi.GPIO
- http://wiki.banana-pi.org/Banana_Pi_BPI-M3#GPIO_PIN_define
- https://sourceforge.net/projects/raspberry-gpio-python/
- https://sourceforge.net/p/raspberry-gpio-python/wiki/BasicUsage/
- https://github.com/BPI-SINOVOIP/BPI-WiringPi2
https://steemit.com/~witnesses type in
oflyhigh
and click VOTE
Vote @oflyhigh via Steemconnect
Thank you!
恭喜你!您的这篇文章入选 @justyy 今日 (2019-06-24) 榜单 【优秀的文章】, 回复本条评论24小时内领赏,点赞本评论将支持 @dailychina 并增加将来您的奖赏。
@justyy 是CN区的见证人,请支持他,给他投票,感谢!
Congratulations! This post has been selected by @justyy as today's (2019-06-24) 【Good Posts】, Steem On! Reply to this message in 24 hours to get rewards. Upvote this comment to support the @dailychina and increase your future rewards! ^_^
SteemIt 工具、API接口、机器人和教程
SteemIt Tools, Bots, APIs and Tutorial
*Join cnsteem Discord channel: *https://discord.gg/SnNaaYS
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
thx
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit