摘要: RPi.GPIO是通过Python/C API实现的,C代码操作底层寄存器, python通过Python/C API调用这些C接口。这是关于RPi.GPIO项目的介绍。 其中提到了有python 垃圾回收机制,并不适合于实时要求的应用。https://pypi.or... 阅读全文
posted @ 2018-06-24 12:15 feiwatson 阅读(572) 评论(0) 推荐(0) 编辑
摘要: wiringPi其实和BCM2835 library类似,也是通过memmap, IOmap来实现在用户空间直接操作底层寄存器wiringPihttp://wiringpi.com/WiringPi is a PIN based GPIO access library... 阅读全文
posted @ 2018-06-24 12:04 feiwatson 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 在上文中,按照guide, 在树莓派目标板上install bcm2835.因为bcm2835是用户空间应用,所以可以在宿主机上交叉编译,生成binary后在树莓派执行按照guide: InstallationThis library consists of a si... 阅读全文
posted @ 2018-06-23 16:08 feiwatson 阅读(497) 评论(0) 推荐(0) 编辑
摘要: bcm2835 library提供了user space 操作IO的代码。本文不涉及代码分析,先直观的按照user guide完成操作。1. 在Raspberry中安装bcm2835 library2. build LED test3. run led test从ht... 阅读全文
posted @ 2018-06-23 11:01 feiwatson 阅读(705) 评论(0) 推荐(0) 编辑
摘要: 连接USB串口转换器和树莓派GPIO的UART针脚(6/15 GND、8、10号) 配置使能调试串口 在树莓派command终端, sudo raspi-config 在配置选项中找到 在SD的boot分区修改config.txt文件,最后面添加一句: enable_uart=1 重启,在串口打出调 阅读全文
posted @ 2018-06-18 18:37 feiwatson 阅读(703) 评论(0) 推荐(0) 编辑
摘要: 树莓派上Linux驱动,从hello world 开始 ... hello.c #include #include #include MODULE_LICENSE("Dual BSD/GPL"); static int hello_init(vo... 阅读全文
posted @ 2018-06-18 15:54 feiwatson 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 尝试了这几种方式, sftp是成功的。 其他两个有点问题SFTP, nfs, tftp注意: 虚拟机网络设置要配置成bridged模式sftpsftp在树莓派默认是打开的, 在windows host上使用WinSCP. tftp open TFTP Serverht... 阅读全文
posted @ 2018-06-18 15:35 feiwatson 阅读(902) 评论(0) 推荐(0) 编辑
摘要: 默认是user: pi, password: raspberry通过如下设置root密码并启用pi@raspberrypi:~ $ sudo passwd rootEnter new UNIX password: Retype new UNIX password: ... 阅读全文
posted @ 2018-06-17 23:25 feiwatson 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 树莓派3系统SSH是默认关闭的,将SD卡插入linux,在root 分区,修改/etc/rc.local在exit 0前增加一行/ect/init.d/ssh start将SD卡插回树莓派,上电后,Xshell登录, 用户名 pi, 密码raspberry ... 阅读全文
posted @ 2018-06-17 22:28 feiwatson 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 上手树莓派想玩点什么。 BLE5.0? AI? python ? 直接copy 官方的NOOBS是最方便的方式, 仅需如下几步树莓派官方推荐的是使用其官方工具NOOBS安装工具。下载NOOBS工具(https://www.raspberrypi.org/downl... 阅读全文
posted @ 2018-06-16 23:16 feiwatson 阅读(351) 评论(0) 推荐(0) 编辑