Loading...
一个简单的脚本,和python版的一样,只是去除python版的RPi库的依赖。较为完善的是Golang版配合crontab做定时任务#每五分钟执行一次 */5 * * * * /home/pi/fen.shfen.sh文件#!/bin/bash a=$(cat /sys/class/thermal/thermal_zone0/temp) temp=$((a/1000)) pin=14 i...
执行命令添加源:echo 'deb [trusted=yes] http://dl.bintray.com/yoursunny/PiZero stretch-backports main' |\ sudo tee /etc/apt/sources.list.d/bintray-yoursunny-PiZero.list sudo apt updatePython3:sudo apt ins...
服务端:# -*- coding: utf-8 -*- import socket import os import time #监听ip和端口 IP_Post = ('0.0.0.0', 1234) sk = socket.socket() sk.bind(IP_Post) sk.listen(5) while True: conn, addr = sk.accept() ...
#!/bin/sh sudo apt update sudo apt install -y apt-transport-https ca-certificates curl gnupg2 lsb-release software-properties-common curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/raspbian/...
0x00因为之前用的Nokia5110显示有故障,所以在网友的推荐下接触到了SSD1306。显示模块型号:SSD1306 OLED显示范围:单色 128*64点阵测试机:树莓派zero w测试机系统:Raspbian stretch life开发语言:Python3采用驱动库:Adafruit Python SSD13060x01环境准备1.树莓派开启I2C接口终端输入sudo raspi-...