main.py never stops

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
TRMrNo
Posts: 15
Joined: Fri May 28, 2021 9:24 pm

main.py never stops

Post by TRMrNo » Sun May 30, 2021 3:57 pm

Hello I write a simple program in main.py. When I run the code, I can not stop it. Therefore I can not upload a new code.

What is the solution to return PERL ?


Code: Select all

import machine
from machine import Pin

LED = Pin(23, Pin.OUT)

while True:
    print("merhaba")
    LED.value(1)
    machine.sleep(1000)
    LED.value(0)
    machine.sleep(1000)

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: main.py never stops

Post by Roberthh » Sun May 30, 2021 4:55 pm

Push Ctrl-C to stop main.py, and then remove or rename main.py
Once you ahev REPL back, type:

import uos
uos.rm("main.py")

or

import uos
uos.rename("main.py", "test.py")

Post Reply