DHT11 Sensor

阅读这篇DHT11传感器文章后, 决定自己动手实验. 树莓派GPIO时好时坏, 换了两次系统, 又换了两次派, 问题仍然存在. 差一点以为树莓派坏了, 后来才发现杜邦线有问题, 谁会去怀疑连电线都有问题?! 去年为了贪便宜, 低价购买杜邦线/DHT11, 做工非常差, 不值得拥有. 卖杜邦线/DHT11的淘宝店: https://telesky.tmall.com/ Using C Code #include <wiringPi. »

GPIO Programming

#!/usr/bin/env python # # BUTTON PWMLED # ------ ------ # pressed on # released off # held pulse # from gpiozero import Button, PWMLED from signal import pause btn = Button(20) »

GPIO on OpenWrt

在树莓派上安装了OpenWrt系统, 对右下角两个GPIO进行控制. GPIO 20 - INPUT - BUTTON GPIO 21 - OUTPUT - LED # install package $ opkg update $ opkg install gpioctl-sysfs # output mode $ echo 21 > »