[SOLVED]frozen to REPL - not showing intro text

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
jickster
Posts: 629
Joined: Thu Sep 07, 2017 8:57 pm

[SOLVED]frozen to REPL - not showing intro text

Post by jickster » Tue Oct 31, 2017 7:06 pm

I'm using the teensy port.

When I have teensy\memzip_files\main.py set to the following, the REPL introductory text appears

Code: Select all

import pyb

print("Executing main.py")

led = pyb.LED(1)

led.on()
pyb.delay(100)
led.off()
pyb.delay(100)
led.on()
pyb.delay(100)
MicroPython v1.9.2 on 2017-10-31; Teensy-3.1 with MK20DX256
Type "help()" for more information.
But when I remove

Code: Select all

pyb.delay(100)
from the end, although I can still enter text in the REPL prompt, I do not see the introductory prompt.

I'm using PuTTY for the serial port terminal.
Last edited by jickster on Wed Nov 01, 2017 5:55 pm, edited 1 time in total.

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: frozen to REPL - not showing intro text

Post by dhylands » Tue Oct 31, 2017 8:41 pm

I suspect what's happening is that the introductory text is being printed before the USB-serial link gets setup and therefore gets dropped.

Adding the delay allows the host/teensy to get it setup.

I see the same thing quite often on the pyboard as well.

If I'm at the REPL, I can press Control-D (soft reset) and then you should see the introductory text since in this case the USB-serial link doesn't get torn down and initialized.

Post Reply