Hello,
From within CircuitPython how would I determine the environment:
Board (QT Pi, ItsyBitsy, Feather, etc), assuming the proper version is loaded
CPU (RP2040, etc.)
CircuitPython Version(6.3.0, 7.0.0)
TIA,
Bruce
What board/CPU CircuitPython version
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15659
- Joined: Tue Oct 20, 2015 3:22 pm
Re: What board/CPU CircuitPython version
I haven't found a way to tell the board yet, but there's this:
Dave
Code: Select all
>>> import sys
>>> sys.implementation
(name='circuitpython', version=(7, 0, 0), mpy=517)
>>> sys.platform
'Espressif ESP32-S2'
- danhalbert
- Posts: 4652
- Joined: Tue Aug 08, 2017 12:37 pm
Re: What board/CPU CircuitPython version
os.uname() includes the board name:
Code: Select all
>>> import os
>>> os.uname()
(sysname='samd51', nodename='samd51', release='7.0.0', version='7.0.0-alpha.3-17-g09088000e on 2021-06-05', machine='Adafruit Metro M4 Express with samd51j19')
>>> os.uname().machine
'Adafruit Metro M4 Express with samd51j19'
- blakebr
- Posts: 957
- Joined: Tue Apr 17, 2012 6:23 pm
Re: What board/CPU CircuitPython version
DASTELS, Dan Halbert,
Thank you for your fast replies.
Bruce
Thank you for your fast replies.
Bruce
Please be positive and constructive with your questions and comments.