How to stop/kill processes with too much output

I got a new Cosmic Unicorn which starts up with a demo screen which turns on all the lights next to buttons on the unicorn and also indicates the ambient light level using some of the lights on the Cosmic Unicorn.
Unfortunately it also outputs the light level (between 0 and 4095) on the output which apparently make terminating the process impossible in Thonny.
How do I actually kill the process, as I cannot get into the inbuilt storage unless the process is stopped?
I may reflash the memory but I would like to be able to save the original data - but if this is actually what the new image contains it will not help me and I will actually not be able to store new programs unto it!
Also in Thonny it shows up as MicroPython: RP2040, ESP32, ESP8266 and generic at the same time‽

Is it connected to a Pi, PC, or MAC etc?
What is Thonny set to as interpreter, lower right corner?

I don’t have a Cosmic, but I do have a Galactic. The recommended uf2 for it doesn’t have the Demo stuff in it. You can download those separately and add it back to your stock image. That stock image does contain what is needed to use the LED’s, buttons, and light sensor.
Clicking Stop in Thonny works for me on my Galactic, even with the demo running.

It’s connected to a PC. Thonny (which is up to date) shows several interpreters: MicroPython: RP2040, ESP32, ESP8266 and generic at the same time, but they all behave the same. I already have another Cosmic Unicorn and that shows up as a Rasberry Pi PIco‽

I am curious and would like to see what is on it before flashing it ;-) I know. I have already programmed the one I have for several projects.
I’ve experienced similar problems if I make a project which just keeps on outputting on the debug output in a loop

I see all those different options in the drop down selection menu.
I can select
Micropython(Raspberry Pi Pico)
or
Micropython (RP2040)
And get control.
Have you tried a different USB cable? Or tried connecting to it on another device?

I only see the “relevant” options depending on which device is connected. My old Cosmic Unicorn shows up as Micropython(Raspberry Pi Pico) and the new one Micropython (RP2040) plus the other options.
I’ve tried the cable I use connecting to my other Cosmic Unicorn and it behaves the same way.
I can see the (red) text flashing by then I press the red Stop button but the numbers from the light sensitivity reading keeps flashing by and never stops

If it was me, I’d put it in boot mode and flash it with the recommended uf2 file.

2 Likes

I had the same problem yesterday and ended up flashing it with the uf2 as others have said. All the demos are available to download again

If you’re getting a demo with red text and the light sensor reading that means the board’s still running our test software and has missed its ‘being flashed with MicroPython’ step. This test software is written in C++ (which is why Thonny isn’t able to talk to it!).

If anyone who gets a Unicorn in this state could let me know the batch number (little white round sticker on the exterior of the box) I’d be grateful!

1 Like

Ah, OK, so thats what’s going on. I was wondering because that wasn’t anything I’ve seen on my Cosmic or Stellar.
Putting it in boot mode and using the flash_nuke.uf2 would be the way I go.
Then flash it with the appropriate Pimoroni uf2 file.
Raspberry Pi Documentation - Raspberry Pi Pico and Pico W

Mine says 762 (and apparently I must type 20 characters)

1 Like