摘要: GPIO : GENERAL PURPOSE INPUT OUTPUT 通用输入输出端口 是STM32的一些引脚,输出到 > led、蜂鸣器, 输入来自< 按键、ADC采样 通过总线读写寄存器,实现 IO口的控制。 寄存器(4种): 配置、数据、置位/复位、复用 GPIO工作原理: (1)输入 4种 阅读全文
posted @ 2025-02-21 11:26 中年二班 阅读(113) 评论(0) 推荐(0)
摘要: 使用 open() 报错 File "E:\python3\di1gexiangmu20231219\ex20.py", line 10, in print_all print(f.read()) ^^^^^^^^ UnicodeDecodeError: 'gbk' codec can't deco 阅读全文
posted @ 2024-01-11 15:15 中年二班 阅读(242) 评论(0) 推荐(0)
摘要: What’s the difference between argv and input() ? The difference has to do with where the user is required to give input. If they give your script inpu 阅读全文
posted @ 2023-12-27 17:10 中年二班 阅读(20) 评论(0) 推荐(0)
摘要: from sys import argv # 从Python的标准库之一sys模块库中引入argv模块到自己的脚本中 # read the WYSS section for how to run this script, first, second, third = argv # 解包argv,并依 阅读全文
posted @ 2023-12-27 15:36 中年二班 阅读(68) 评论(0) 推荐(0)
摘要: round(0.4)=0round(0.5)=0round(0.6)=1round(1.5)=2round(2.5)=2 这种方法叫 “四舍 六入 五成双” ,是为了避免在大量数据统计时舍入误差引起整体的偏移. 阅读全文
posted @ 2023-12-25 14:27 中年二班 阅读(296) 评论(0) 推荐(0)
摘要: 移动 test.txt 文件到指定目录中 源目录一定要用 ~ ,否则报错,原因未知。 ~ 代表 C:\Users\lenovo lenovo 是计算机名称 PS C:\Users\lenovo\test> mv ~\test\test.txt c:\Users\lenovo PS C:\Users\ 阅读全文
posted @ 2023-12-20 16:39 中年二班 阅读(143) 评论(0) 推荐(0)
摘要: 检索机器学习入门,书籍推荐 《统计学习方法》李航 著 《机器学习》西瓜书 周志华 著 《Elements of Statistical Learning》(ESL), 《Machine Learning:A Probabilistic Perspective》(MLAPP) 这两本书可以是被奉为机器 阅读全文
posted @ 2023-12-19 14:30 中年二班 阅读(21) 评论(0) 推荐(0)
摘要: 写了一个遍历函数调用前面定义的 print()函数 报错信息:"void (*)(ElemType c)" 类型的实参与 "Status (*)(ElemType)" 类型的形参不兼容 ListTraverseBack(L, print); void print(ElemType c) { prin 阅读全文
posted @ 2020-09-22 21:43 中年二班 阅读(766) 评论(0) 推荐(0)
摘要: 撒 function [sys,x0,str,ts] = SecondOrderSystem(t,x,u,flag,zeta,wn) switch flag case 0 [sys,x0,str,ts] = mdlInitializeSizes; % initialize block case 1 阅读全文
posted @ 2020-06-29 11:25 中年二班 阅读(1532) 评论(0) 推荐(0)
摘要: (1) STM32的复位时间至少要大于2个机器周期才生效,复位时间与RC值有关。 (2) 复位按键打开时,RES被拉R2拉高,合上按键,由于电容两端电压不能突变,电容会开始放电,放完后RES电位降到GND。 阅读全文
posted @ 2020-05-22 20:45 中年二班 阅读(2272) 评论(0) 推荐(0)