香蕉派M3 GPIO点亮LED (下):一些补充内容
之前的两篇文章详细讲述了如何使用香蕉派版本的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
Vote For Me As Witness
https://steemit.com/~witnesses type in oflyhigh and click VOTE
Vote @oflyhigh via Steemconnect
Thank you!
Leave 香蕉派M3 GPIO点亮LED (下):一些补充内容 to:
Read more #cn posts
Best Posts From oflyhigh
We have not curated any of oflyhigh's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.