【发布时间】:2021-04-22 00:28:08
【问题描述】:
我现在正在使用几个 Raspberry Pi 板。 我有 Pi Zero W、3B+ 和 4B。
我将在所有这些模型上运行相同的程序。 为此,我需要从 Python 代码中检测 Raspberry 板模型。 像这样,
def detect_board():
'''
return string representing board type, one of the following
4B
3B+
3B
...
Zero W
Zero
'''
如何获得板子型号名称?
【问题讨论】:
-
成功了,谢谢!
标签: python raspberry-pi