MMDVM 安装NextionDriver显示以更多信息
树莓派存储空间手动扩大到整张TF卡
烤箱做的PCBA回流焊
JTA共享文件
MMDVM+HDMI触摸屏
deeppicar
ssh 免密码登录
ssh-keygen -t rsa
公钥复制进authorized_keys文件里:
cat id_rsa.pub >> ~/.ssh/authorized_keys
私钥文件id_rsa复制到windows上,用puttygen.exe生成对应的ppk文件,然后在putty configuration->category->connection->SSH->Auth->private key file for authentication里指定这个ppk文件,然后登录时只需要输入用户名就能登录过去
mount ntfs
sudo apt install ntfs-3g
cd /mnt
sudo mkdir udisk
sudo mount /dev/sdb1 /mnt/udisk
cd udisk
Chrome 长截屏
windows:
F12 召唤出调试界面
ctl+shift+p
Capture full screenshot
Mac:
⌘Command + ⌥Option + I 召唤出调试界面
⌘Command + ⇧Shift + P
Capture full size screenshot
Nvidia 下载中心
发票查询
树莓派温控风扇
#coding=utf-8
#!/usr/bin/python
import sys
import time
try:
import RPi.GPIO as GPIO
except RuntimeError:
print("Error importing RPi.GPIO! This is probably because you need superuser privileges. You can achieve this by using 'sudo' to run your script")
def cpu_temp():
with open("/sys/class/thermal/thermal_zone0/temp", 'r') as f:
return float(f.read())/1000
def main():
# Simplex use BCM-->4 pin control the fan
channel = 4
# Duplex use BCM-->17 pin control the fan
#channel = 17
# GPIO.setmode(GPIO.BOARD)#也许使用扩展board导致标注的数字是BCM的,猜测而已。
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
# close air fan first
GPIO.setup(channel, GPIO.OUT, initial=GPIO.LOW)
is_close = True
while True:
temp = cpu_temp()
if is_close:
if temp > 49.0:
print time.ctime(), temp, '℃ open air fan'
GPIO.output(channel, 1)
is_close = False
else:
if temp < 47.0:
print time.ctime(), temp, '℃ close air fan'
GPIO.output(channel, 0)
is_close = True
time.sleep(2.0)
print time.ctime(), temp, '℃'
if __name__ == '__main__':
main()