nxghtriderdev
nxghtriderdev

Reputation: 1

Raspberry Pi pico script exeucte kill

I wrote a script with the while loop command and I executed it on my Raspberry Pi, however I didn't put a break in it, so it won't stop. I tried to interrupt it, but the script is still being executed. I used thonny Python and I tried to exit it, Ctrl+C, soft reboot. I even tried to put it in storage mode and reset it, but it's still being executed. I'm trying to work out how to completely delete the script from the pico itself. Do you have any ideas?

Python:

from machine import Pin
from time import sleep
led = Pin(25, Pin.OUT)
while True:
    led.toggle()
    sleep(0.5) 

Upvotes: 0

Views: 1735

Answers (1)

Xander Bielby
Xander Bielby

Reputation: 181

I'm reasonably sure that RPiOS has a task manager, so you could try killing it in that.

If it doesn't then open up your terminal and run ps -ef to find the PID of the python process (it should show the name of the command). Then run sudo kill -9 <PID> to kill it manually.

Edit:

I now understand that the RPi Pico is actually a microcontroller. Have you tried uploading a new program or just unplugging it from power to force it to reboot?

Upvotes: 0

Related Questions