wendlers / mpfshell

A simple shell based file explorer for ESP8266 Micropython based devices ⛺
MIT License
396 stars 84 forks source link

script execution halted when connected via serial (NodeMCU board) #30

Closed NoPinky closed 7 years ago

NoPinky commented 7 years ago

My board is the nodeMCU with CP2102 USB to serial converter running MicroPython 1.8.7. I have a test script running that doesn't do much more than blinking neopixel LEDs. That script is started via function call from the boot.py script on the ESP8266. When I connect with open COM5 to the ESP8266 the execution of my script stops (no blinking). Otherwise mpfshell and MicroPython on the ESP seems to be fine because ls command works and prints out the files on the file system. I can get the script working (LEDs blinking) again by using the reset button on the NodeMCU board. So it doesn't seem like the establishment of the serial connection with mpfshell causes a reset of the MicroPython firmware. I tried the same with putty, but putty can connect to the NodeMCU without stopping the script (LEDs keep blinking).

NoPinky commented 7 years ago

I think it was "my fault" for using a terrible blocking while True loop for the endless blinking. Ofcourse that kind of loop has to be interrupted so the microcontroller can serve the filesystem functions to mpfshell. I tried using the timer function and the blinking wasn't halted when I connected with mpfshell. So I guess, it's fine.