Proxmox VE虚拟机配置文档

一配置国内源 1.进入/etc/apt/目录 2.备份sources.list文件 cp sources.list sources.list_back 3.(更换Debian源)修改/etc/apt/sources.list,将默认的文件注释或删除,再粘贴以下内容:

站长 站长 发布于 2023-10-27

MicroPython串口通讯

from machine import Pin, UART uart = UART(2,baudrate=115200) while True: if uart.any(): msg = uart.read(128) try: str_msg = msg.d

站长 站长 发布于 2023-10-27

MicroPython 读取DS18B20温度传感器

import onewire,ds18x20 # 定义ds18b20控制对象 ds18b20 = ds18x20.DS18X20(onewire.OneWire(Pin(19))) roms = ds18b20.scan() # 扫描是否存在18b20设备 def get_temp():

站长 站长 发布于 2023-10-27

MicroPython 同步网络时间

import utime,ntptime # 同步时间 def sync_ntp(): ntptime.NTP_DELTA = 3155644800 # 可选 UTC+8偏移时间(秒),不设置就是UTC0 ntptime.host = 'ntp1.aliyun.com' # 可选

站长 站长 发布于 2023-10-27

MicroPython wifi联网实现

网络连接功能实现 # 导包 import network import utime # 设置你的Wi-Fi SSID和密码 ssid = '你的wifi名称' password = 'wifi密码' def connect_and_sync_time(): sta_if = networ

站长 站长 发布于 2023-10-27