What board/CPU CircuitPython version

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
blakebr
 
Posts: 957
Joined: Tue Apr 17, 2012 6:23 pm

What board/CPU CircuitPython version

Post by blakebr »

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

User avatar
dastels
 
Posts: 15659
Joined: Tue Oct 20, 2015 3:22 pm

Re: What board/CPU CircuitPython version

Post by dastels »

I haven't found a way to tell the board yet, but there's this:

Code: Select all

>>> import sys
>>> sys.implementation
(name='circuitpython', version=(7, 0, 0), mpy=517)
>>> sys.platform
'Espressif ESP32-S2'
Dave

User avatar
danhalbert
 
Posts: 4652
Joined: Tue Aug 08, 2017 12:37 pm

Re: What board/CPU CircuitPython version

Post by danhalbert »

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'

User avatar
blakebr
 
Posts: 957
Joined: Tue Apr 17, 2012 6:23 pm

Re: What board/CPU CircuitPython version

Post by blakebr »

DASTELS, Dan Halbert,

Thank you for your fast replies.

Bruce

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”