Search found 84 matches

by Jim.S
Tue Mar 20, 2018 8:11 pm
Forum: Programs, Libraries and Tools
Topic: uasyncio: Example of the the use of aswitch classes
Replies: 4
Views: 3717

Re: uasyncio: Example of the the use of aswitch classes

Thanks Peter. Bit embarrassing really, I had skimmed through that file but was put off running it because I realised I would have to get my soldering iron out, I didn’t study it thoroughly enough to realise it imported aswitch.... off to get my soldering iron.....
by Jim.S
Mon Mar 19, 2018 8:38 pm
Forum: Programs, Libraries and Tools
Topic: uasyncio: Example of the the use of aswitch classes
Replies: 4
Views: 3717

uasyncio: Example of the the use of aswitch classes

I am learning about uasyncio, I am working through the examples in micropython-async-master, and am looking at the classes in aswitch.py, These look really useful but I would really like to see an example of their use to help me understand how they work. Can someone point me in the direction of an e...
by Jim.S
Sat Mar 17, 2018 1:30 pm
Forum: General Discussion and Questions
Topic: Freezing code and modules
Replies: 11
Views: 17193

Re: Freezing code and modules

I agree that the -X option doesn’t seem to do anything. I carried out some simple tests comparing the performance of functions imported from a .py module against the same function imported from a couple of .mpy files. One mpy file (performace_testC.mpy) was built using no options (mpy-cross performa...
by Jim.S
Wed Mar 14, 2018 6:47 am
Forum: General Discussion and Questions
Topic: Freezing code and modules
Replies: 11
Views: 17193

Re: Freezing code and modules

I will admit that I dont fully understand the differences between the various code emitters, but a brief reading of the mpy-cross help file suggests that it can compile byte code using different emitters, see below. Or am I misinterpreting the help file. Do the different emitters have to be specifie...
by Jim.S
Tue Mar 13, 2018 8:40 pm
Forum: General Discussion and Questions
Topic: Freezing code and modules
Replies: 11
Views: 17193

Re: Freezing code and modules

Thanks for that pythoncoder. It is now obvious when I go back and look at the directory structure. Ive also had a brief test of mpy-cross (using the module code below) and realise that compiling to byte code doesnt speed up this particular example. when I find more time I intend to experiment with t...
by Jim.S
Mon Mar 12, 2018 9:44 pm
Forum: General Discussion and Questions
Topic: Freezing code and modules
Replies: 11
Views: 17193

Re: Freezing code and modules

Thanks Deshipu and Roberthh, I understand a bit better now. I have briefly experimented with mpy-cross and understand what Deshipu said about it not making the code smaller - but it does offer the opportunity of making the code faster which I had not appreciated and will be useful in one of my proje...
by Jim.S
Fri Mar 09, 2018 6:54 pm
Forum: General Discussion and Questions
Topic: Freezing code and modules
Replies: 11
Views: 17193

Freezing code and modules

I am trying to understand how I can reduce the size of the code downloaded to a pyboard (or more specifically a microbit) by compiling the accompanying module file to byte code before I download it to the board. I have looked at the tutorial on the adafruit website that shows how to make custom firm...
by Jim.S
Mon Mar 05, 2018 6:26 am
Forum: micro:bit boards
Topic: Problems building micropython-1.9.2 from source
Replies: 17
Views: 18522

Re: Problems building micropython-1.9.2 from source

that makes sense, I am running an older version of Mint, so presumably has a older version of gcc, I was going to bite the bullet and upgrade, so I will do it sooner rather than later

Thanks!
by Jim.S
Sun Mar 04, 2018 1:08 pm
Forum: micro:bit boards
Topic: Problems building micropython-1.9.2 from source
Replies: 17
Views: 18522

Re: Problems building micropython-1.9.2 from source

Sorry, I didn't explain very well. what I did was 1. download 'micropython-master.zip" from github (using my browser, because I am not confident i know what I am doing with git from the command line) 2 unzip it 3 go to the top level directory/folder, the one with config.json in it, and use the follo...
by Jim.S
Fri Mar 02, 2018 9:00 pm
Forum: micro:bit boards
Topic: Problems building micropython-1.9.2 from source
Replies: 17
Views: 18522

Problems building micropython-1.9.2 from source

I'm trying to build Micropython 1.9.2 for the Micro:bit from source but am running into problems To my amazement, I successfully build the default micropython v1.7.9 on my Linux Mint 17 box, from source, by following the instructions in http://microbit-micropython.readthedocs.io/en/latest/devguide/i...