Simply put, when I press Ctrl-C in puTTY, my program stops but I don't get a REPL prompt. Where is the REPL data going?
boot.py:
Code: Select all
import pyb
pyb.usb_mode('CDC+MSC') # act as a serial and a storage device
pyb.main('main.py') # main script to run after this one
main.py:
Code: Select all
import pyb
switch = pyb.Switch()
leds = [pyb.LED(i+1) for i in range(4)]
accel = pyb.Accel()
i = 0
while True:
y = accel.y()
i = (i + (1 if y > 0 else -1)) % len(leds)
leds[i].toggle()
pyb.delay(5 * max(1, 30 - abs(y)))
I'm running Windows - device manager shows COM14 as Pyboard USB comm port (I have pyBoard v1.1). I run puTTY on COM14 at 9600 baud. On RST, program runs and LEDs toggle as expected, with rate dependent on Y axis tilt. I press Ctrl-C once and the LEDs stop toggling, so I assume the program has stopped and I should get REPL prompt, but I get nothing in puTTY. The puTTY screen remains blank with the cursor at the top left position.