Hi,
I'm a complete newbie to Trinket which I received just about a week ago. I have tried finding an answer to the following question on the forum but with no joy.
After plugging my Trinket M0 into my Mac and watching the DotStar do it's thing (cycling through colours) I followed the instructions to update CircuitPython. I double pressed on the little reset button and copied "adafruit-circuitpython-trinket_m0-en_GB-7.2.5.uf2" to the TrinketBoot drive. That seemed fine but a number of files had disappeared from the CircuitPy drive including main.py and the Adafruit_hid directory.
So I downloaded a copy of the Trinket M0 zip "Trinket_M0_CircuitPython_2_Files.zip" to my Mac, extracted the files, and tried drag the set of files/folders across to the CircuitPy drive. However, I got a warning about lack of space. I then tried creating the Adafruit_hid directory (successfully) and tried copying individual files but, after successfully copying a few files, my Mac again tells me there's not enough space to copy further files.
Can someone advise what I am doing wrong please?
Updated CircuitPython but lost Trinket lib
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15658
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Updated CircuitPython but lost Trinket lib
First, download the latest 7.x bundle from https://circuitpython.org/libraries.
Then copy files/directories that you need for a specific project from the lib subdirectory of the extracted zip to CIRCUITPY/lib.
As for running out of space, have a look at https://learn.adafruit.com/welcome-to-c ... 2978466-58 for tips. The Trinket M0 (any "M0" board really, but especially the non "express" ones, don't have much memory of any sort) won't fit much in the way of libraries or code.
Dave
Then copy files/directories that you need for a specific project from the lib subdirectory of the extracted zip to CIRCUITPY/lib.
As for running out of space, have a look at https://learn.adafruit.com/welcome-to-c ... 2978466-58 for tips. The Trinket M0 (any "M0" board really, but especially the non "express" ones, don't have much memory of any sort) won't fit much in the way of libraries or code.
Dave
- Franklin97355
- Posts: 23911
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Updated CircuitPython but lost Trinket lib
I'll check but you should just load the libraries you need and use .mpy files when available.
- Franklin97355
- Posts: 23911
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Updated CircuitPython but lost Trinket lib
The consensus is that you should consider upgrading to something like the QTPY RP2040 (newer, better board).
- dastels
- Posts: 15658
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Updated CircuitPython but lost Trinket lib
Franklin isn't wrong. Trinket (or any M0) has, as I said, very little memory. CircuitPython likes memory. You'll have far less frustration with a bigger, more powerful board. An "M4" board at least.
Dave
Dave
- msacks001
- Posts: 10
- Joined: Tue Apr 26, 2022 3:24 am
Re: Updated CircuitPython but lost Trinket lib
Thanks for the quick response.
I've downloaded the 7.x bundle as advised then tried the instructions to reduce space (see the terminal window exchange below) but I don't think it's been successful as I still can't copy even the "__init__.py" file (just 1K) without receiving the space error.
Teminal exchange:
Matthew@Matt-macbook ~ % mdutil -i off /Volumes/CIRCUITPY
/System/Volumes/Data/Volumes/CIRCUITPY:
2022-04-27 18:06:40.608 mdutil[2850:112048] mdutil disabling Spotlight: /System/Volumes/Data/Volumes/CIRCUITPY -> kMDConfigSearchLevelFSSearchOnly
Indexing and searching disabled.
Matthew@Matt-macbook ~ % cd /Volumes/CIRCUITPY
Matthew@Matt-macbook CIRCUITPY % rm -fr .{,_.}{fseventsd,Spotlight-V*,Trashes}
zsh: no matches found: .Spotlight-V*
Matthew@Matt-macbook CIRCUITPY % mkdir .fseventsd
mkdir: .fseventsd: File exists
Matthew@Matt-macbook CIRCUITPY % touch .fseventsd/no_log .metadata_never_index .Trashes
touch: .Trashes: Operation not permitted
Here's what I have currently installed on the Trinket: My Mac reports the following for the CIRCUITPY drive:
Format: MS-DOS (FAT12)
Capacity: 48KB
Available: 20KB (12KB purgeable)
Used: 40,960 bytes (41KB on disk)
Any further advice please?
I've downloaded the 7.x bundle as advised then tried the instructions to reduce space (see the terminal window exchange below) but I don't think it's been successful as I still can't copy even the "__init__.py" file (just 1K) without receiving the space error.
Teminal exchange:
Matthew@Matt-macbook ~ % mdutil -i off /Volumes/CIRCUITPY
/System/Volumes/Data/Volumes/CIRCUITPY:
2022-04-27 18:06:40.608 mdutil[2850:112048] mdutil disabling Spotlight: /System/Volumes/Data/Volumes/CIRCUITPY -> kMDConfigSearchLevelFSSearchOnly
Indexing and searching disabled.
Matthew@Matt-macbook ~ % cd /Volumes/CIRCUITPY
Matthew@Matt-macbook CIRCUITPY % rm -fr .{,_.}{fseventsd,Spotlight-V*,Trashes}
zsh: no matches found: .Spotlight-V*
Matthew@Matt-macbook CIRCUITPY % mkdir .fseventsd
mkdir: .fseventsd: File exists
Matthew@Matt-macbook CIRCUITPY % touch .fseventsd/no_log .metadata_never_index .Trashes
touch: .Trashes: Operation not permitted
Here's what I have currently installed on the Trinket: My Mac reports the following for the CIRCUITPY drive:
Format: MS-DOS (FAT12)
Capacity: 48KB
Available: 20KB (12KB purgeable)
Used: 40,960 bytes (41KB on disk)
Any further advice please?
- dastels
- Posts: 15658
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Updated CircuitPython but lost Trinket lib
I have to ask... why are you using a Trinket? It's no longer a very good match for CircuitPython.
If you want something physically small, the QtPy line is a good alternative. But not the SAMD21 (aka M0) model, that's pretty much the same as the Trinket M0. The ESP32-S2 or RP2040 models are very nice CircuitPython platforms. If size isn't a factor, feathers are a good alternative. An M4, nRF52840, ESP32-S2, or RP2040 are all geart for CircuitPython and each offer different capabilities.
The Trinket M0 remains an excellent C++/Arduino platform.
Dave
If you want something physically small, the QtPy line is a good alternative. But not the SAMD21 (aka M0) model, that's pretty much the same as the Trinket M0. The ESP32-S2 or RP2040 models are very nice CircuitPython platforms. If size isn't a factor, feathers are a good alternative. An M4, nRF52840, ESP32-S2, or RP2040 are all geart for CircuitPython and each offer different capabilities.
The Trinket M0 remains an excellent C++/Arduino platform.
Dave
- msacks001
- Posts: 10
- Joined: Tue Apr 26, 2022 3:24 am
Re: Updated CircuitPython but lost Trinket lib
I tried c++ a long time ago and really struggled so thought Python would be easier (I'm not a programmer, the last language I wrote anything substantial in was Fortran and even machine code!). I could switch boards and will do so if you think it's not going to be possible to reload the M0. Do you think that the latest version of CircuitPython is taking more space on the board and that's what's causing my problem?
Many thanks for your help.
Many thanks for your help.
- msacks001
- Posts: 10
- Joined: Tue Apr 26, 2022 3:24 am
Re: Updated CircuitPython but lost Trinket lib
BTW, I've now ordered the RP2040 but will try Arduino IDE while I'm waiting for it to arrive.
Thanks again to both of you for your guidance.
Matt
Thanks again to both of you for your guidance.
Matt
- dastels
- Posts: 15658
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Updated CircuitPython but lost Trinket lib
Yes, the latest version of the runtime, but more importantly the libraries, do tend to grow over time. Somethign that ran fine with CP 4 or 5 will quite likely have problems fitting into an M0 board.
The RP2040 is a great CircuitPython platform.
Dave
The RP2040 is a great CircuitPython platform.
Dave
Please be positive and constructive with your questions and comments.