Getting some or all micropython-lib onto pyboard

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
User avatar
RWLTOK
Posts: 53
Joined: Thu Dec 14, 2017 7:24 pm

Getting some or all micropython-lib onto pyboard

Post by RWLTOK » Sat Dec 16, 2017 5:43 pm

I have seen some amazing code in Peter Hinch's, https://github.com/peterhinch/micropython-async, repository. I would like to know how to get the required uasyncio module (which is part of micropython-lib) onto the PyBoard. I have V1.1 of the board. What is a good way to get the required modules from micropython-lib onto the pyboard so that I can use uasyncio and required modules?

Thanks

Rich

SpotlightKid
Posts: 463
Joined: Wed Apr 08, 2015 5:19 am

Re: Getting some or all micropython-lib onto pyboard

Post by SpotlightKid » Mon Dec 18, 2017 11:59 am

* Install the unix port of micropython.
* Install rshell (https://github.com/dhylands/rshell).
* Download and install the module with upip:

Code: Select all

micropython -m upip install micropthon-uasyncio
* Use rshell to copy the module onto the pyboard's flash:

Code: Select all

rshell cp ~/.micropython/lib/uasyncio.py /flash
* Or use its 'rsync' command to copy everything:

Code: Select all

rshell rsync ~/.micropython/lib/ /flash

User avatar
RWLTOK
Posts: 53
Joined: Thu Dec 14, 2017 7:24 pm

Re: Getting some or all micropython-lib onto pyboard

Post by RWLTOK » Mon Dec 18, 2017 6:40 pm

Thanks

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Getting some or all micropython-lib onto pyboard

Post by pythoncoder » Tue Dec 19, 2017 8:05 am

@RWLTOK Thank you for your kind remark :D But I do explain the installation process at the start of my tutorial...

It's also officially documented here.
Peter Hinch
Index to my micropython libraries.

nikhiledutech
Posts: 118
Joined: Wed Dec 27, 2017 8:52 am

Re: Getting some or all micropython-lib onto pyboard

Post by nikhiledutech » Tue Jan 02, 2018 7:14 am

SpotlightKid wrote:
Mon Dec 18, 2017 11:59 am
* Install the unix port of micropython.
* Install rshell (https://github.com/dhylands/rshell).
* Download and install the module with upip:

Code: Select all

micropython -m upip install micropthon-uasyncio
* Use rshell to copy the module onto the pyboard's flash:

Code: Select all

rshell cp ~/.micropython/lib/uasyncio.py /flash
* Or use its 'rsync' command to copy everything:

Code: Select all

rshell rsync ~/.micropython/lib/ /flash

When i use first command on rshell,, i get the following error.
Welcome to rshell. Use Control-D to exit.
/home/edutech> micropython -m upip install micropython-uasyncio
Unrecognized command: micropython -m upip install micropython-uasyncio
/home/edutech>
Do you know what's the problem here or can you help me in installing uasyncio.

SpotlightKid
Posts: 463
Joined: Wed Apr 08, 2015 5:19 am

Re: Getting some or all micropython-lib onto pyboard

Post by SpotlightKid » Tue Jan 02, 2018 11:17 am

nikhiledutech wrote:
Tue Jan 02, 2018 7:14 am

When i use first command on rshell,
All the commands are given as shell commands, you run them directly from the terminal, not from within rshell.

Post Reply