Anyone know how to generate a keyboard interrupt over the UART?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
s_hatch
Posts: 24
Joined: Wed Nov 25, 2015 6:50 pm

Anyone know how to generate a keyboard interrupt over the UART?

Post by s_hatch » Mon Jun 18, 2018 4:16 pm

I am trying to interrupt a continuous loop from the uart REPL. I have tried the usual Cntrl-c (0x03) from the ascii table and not having any luck. I put it into a continuous loop:

while True:
print('a)

Now I need to interrupt the loop with a Control-c, but it doesn't seem to work, coming from the uart, not the terminal keyboard. It works great from the terminal keyboard.

s_hatch
Posts: 24
Joined: Wed Nov 25, 2015 6:50 pm

Re: Anyone know how to generate a keyboard interrupt over the UART?

Post by s_hatch » Mon Jun 18, 2018 4:18 pm

PS I am using a pyboard 1.1

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

Re: Anyone know how to generate a keyboard interrupt over the UART?

Post by Roberthh » Mon Jun 18, 2018 5:00 pm

That was fixed in version 1.9.4, see https://github.com/micropython/micropyt ... dac289538e
If you are not on that version, please update. If it still not works, re-open that issue https://github.com/micropython/micropython/issues/1568

s_hatch
Posts: 24
Joined: Wed Nov 25, 2015 6:50 pm

Re: Anyone know how to generate a keyboard interrupt over the UART?

Post by s_hatch » Mon Jun 18, 2018 5:54 pm

I am on version 1.8.7. I downloaded 1.9.4 but it won't install on my pyboard. I am on Windows 10. When I go to Settings, Devices-- I can see the STM BOOTLOADER is connected. When I click on it I get a remove device button and no other actions. I can't upgrade my firmware.

s_hatch
Posts: 24
Joined: Wed Nov 25, 2015 6:50 pm

Re: Anyone know how to generate a keyboard interrupt over the UART?

Post by s_hatch » Mon Jun 18, 2018 8:54 pm

I finally got the dfu working and got 1.9.4 loaded on my pyboard and it is working at last! Thanks, to roberhh and the team that fixed the software. It is great to be working on the project again.

Post Reply