If you have a Pico LIPO, or Tiny 2040, and flash it with the Micro Python uf2 file, you will be limited to the Pi Pico default 2MB. To get the full use of all your memory you have to use the corresponding Adafruit Circuit Python uf2 file. As it stands now anyway. Or do up your own custom Micro Python uf2 file.
Also, keep track of which Tiny 2040 you have, as its not marked on it if its 2MB or 8MB. Not that I could see anyway? The Pico LIPO has a jumper on the back / bottom denoting which it is, 4MB or 16MB.
Ditto, I much prefer working in Micro Python. My Pico Lipo currently has the Pico Display Pack, 1.54 LCD breakout, LTR-559, VEML6075, RV3028, BME280 and a BME688 attached. Going to be a real PITA to start over and get that all working in Circuit Python.
Was directed here after posting on the Pi Foundation forum. MicroPython - Python for microcontrollers
They will let you use the full amount of storage space. Iām thinking they donāt have all the custom files Pimoroni adds to their image though? Iāll be trying to confirm that at some point. Have to take a break from things for now though.
@Tonygo2 , Tony what are you using to check the āreported spaceā?
Just flashed my Pico Lipo and Thonny shows it as
MicroPython v1.18 on 2022-03-10; Pimoroni Pico LiPo 16MB with RP2040
# Board memory Test
# Tony Goodhew 11 March 2022
# Builds a very large text file - all junk!
import machine
import uos
print("Basic Memory Space Test \n")
with open("/test2.txt", "w") as f: # Write - new file
f.write("First Message\r\n")
for u in range(10000):
if int(u/500)*500 == u:
print(u)
with open("/test2.txt", "a") as f: # Append
f.write("Tony Goodhew\r\n")
f.write("Leicester City Cup Winners!\r\n")
f.write("ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz,.?%$Ā£*&\r\n")
for i in range(10):
f.write(str(i) + ", " + str(i*i*i) + ", " + str(i*i*i*i) + "\r\n")
print("Done")
Ok, I just uploaded a big mp3 file, 5MB or so. The PICO Display Pack demo ran on my Pico Lipo after flashing it with the new Pimoroni file, so Iād say Iām good to go now.
Have tested both flavours of Pico LiPo and Tiny 2040 with the new pimoroni-pico board specific builds and they both seem to be now reporting believable flash amounts and dealing with big files properly - hooray!
Thankyou, Iāve been looking for code like that since this all started.
This is what Iām getting with the 1.18.4 uf2 files flashed.
MicroPython v1.18 on 2022-03-11; Pimoroni Tiny 2040 with RP2040
Type "help()" for more information.
>>> %Run -c $EDITOR_CONTENT
Total size: 7.0 MB
Total free: 6.992188 MB
>>>
MicroPython v1.18 on 2022-03-11; Pimoroni Pico LiPo 16MB with RP2040
Type "help()" for more information.
>>> %Run -c $EDITOR_CONTENT
Total size: 15.0 MB
Total free: 14.99219 MB
>>>