Please note: Friday June 18 is a holiday celebrating Juneteenth, please allow extra time for your order to arrive and plan accordingly.
0

What board/CPU CircuitPython version
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

What board/CPU CircuitPython version

by blakebr on Thu Jun 10, 2021 7:04 pm

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

blakebr
 
Posts: 36
Joined: Tue Apr 17, 2012 6:23 pm

Re: What board/CPU CircuitPython version

by dastels on Thu Jun 10, 2021 7:27 pm

I haven't found a way to tell the board yet, but there's this:
Code: Select all | TOGGLE FULL SIZE
>>> import sys
>>> sys.implementation
(name='circuitpython', version=(7, 0, 0), mpy=517)
>>> sys.platform
'Espressif ESP32-S2'

Dave

dastels
 
Posts: 6475
Joined: Tue Oct 20, 2015 3:22 pm

Re: What board/CPU CircuitPython version

by danhalbert on Fri Jun 11, 2021 10:47 am

os.uname() includes the board name:
Code: Select all | TOGGLE FULL SIZE
>>> 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'

danhalbert
 
Posts: 2430
Joined: Tue Aug 08, 2017 12:37 pm

Re: What board/CPU CircuitPython version

by blakebr on Fri Jun 11, 2021 1:36 pm

DASTELS, Dan Halbert,

Thank you for your fast replies.

Bruce

blakebr
 
Posts: 36
Joined: Tue Apr 17, 2012 6:23 pm

Please be positive and constructive with your questions and comments.