repl without usb

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
dalex
Posts: 11
Joined: Wed Aug 06, 2014 6:18 pm

repl without usb

Post by dalex » Wed Aug 06, 2014 6:24 pm

According to the docs
"To use the REPL, you must connect to the serial USB device on the pyboard. How you do this depends on your operating system."
Is this literally true? Is it not possible use REPL via another communication channel, such as on of the UART pin-pairs?

User avatar
JonHylands
Posts: 69
Joined: Sun Dec 29, 2013 1:33 am

Re: repl without usb

Post by JonHylands » Wed Aug 06, 2014 7:06 pm

My brother Dave had a patch at one point that allowed me to run the REPL over one of the UARTs. I don't know what the status is now.

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

Re: repl without usb

Post by dhylands » Wed Aug 06, 2014 8:13 pm

You can put the following in your boot.py:

Code: Select all

uart = pyb.UART(6,115200)
pyb.repl_uart(uart)
and that will cause the repl to show up on the usb serial as well as on UART6

dalex
Posts: 11
Joined: Wed Aug 06, 2014 6:18 pm

Re: repl without usb

Post by dalex » Thu Aug 07, 2014 8:01 am

Nice. Next step, REPL over radio.

Turbinenreiter
Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: repl without usb

Post by Turbinenreiter » Thu Aug 07, 2014 2:59 pm

I'd love to see that!

I have some nRF24 modules here that I never got to work with Arduino.

dalex
Posts: 11
Joined: Wed Aug 06, 2014 6:18 pm

Re: repl without usb

Post by dalex » Sat Aug 09, 2014 9:09 pm

Turbinenreiter wrote:I'd love to see that!

I have some nRF24 modules here that I never got to work with Arduino.
See here:
http://forum.micropython.org/viewtopic.php?f=2&t=255

I've just coded a wireless serial link along these lines using the nRF24. I'll let you know how it goes after I get a chance to test it.

Post Reply