Search found 84 matches

by Jim.S
Sun Feb 25, 2018 9:16 pm
Forum: micro:bit boards
Topic: How can a flash a micropython program that imports an external module?
Replies: 10
Views: 18134

Re: How can a flash a micropython program that imports an external module?

Nice one! Thanks! This makes programming the microbit very similar to the pyboard What I did was flash the firm ware to the microbit using uflash $ uflash -r microbit-micropython-v1.9.2-34-gd64154c73.hex renamed my python script ModuleTest.py main.py then copied it to the microbit using ufs $ ufs pu...
by Jim.S
Sun Feb 25, 2018 12:45 pm
Forum: micro:bit boards
Topic: How can a flash a micropython program that imports an external module?
Replies: 10
Views: 18134

Re: How can a flash a micropython program that imports an external module?

So are you saying that if I flash the micropython firmware to the microbit, I can use microfs to copy a text python script to the microbits memory and it will run just like a pyboard? I am currently under the impression that I have to 'compile' the python script to a hex file before it will run on t...
by Jim.S
Fri Feb 23, 2018 9:13 pm
Forum: micro:bit boards
Topic: How can a flash a micropython program that imports an external module?
Replies: 10
Views: 18134

Re: How can a flash a micropython program that imports an external module?

Thanks! I now understand. I use ufs to copy the module file (in this case Hello.py) to the microbits memory and use uflash to flash the main programme (ModuleTest.py). This is easier if you can get mu to run on your system (but difficult if you are running Mint 17) And I now understand why i am unli...
by Jim.S
Thu Feb 22, 2018 9:03 pm
Forum: micro:bit boards
Topic: How can a flash a micropython program that imports an external module?
Replies: 10
Views: 18134

How can a flash a micropython program that imports an external module?

I am trying to flash a script to the microbit that imports from an external module. I have written a simple example and successfully tested on my linux box, with the main program (ModuleTest.py) and module (Hello.py) in the same directory. ModuleTest.py # testing modules on the microbit try: from mi...
by Jim.S
Wed Feb 21, 2018 8:21 am
Forum: micro:bit boards
Topic: Will uasyncio run on the microbit?
Replies: 1
Views: 2110

Will uasyncio run on the microbit?

Will uasyncio run on the microbit?

I have just got uasyncio running on the pyboard, but really want to develop my project on the microbit, and was wondering the best route to get it working (or something like it) running on the microbit.

Jim
by Jim.S
Mon Feb 19, 2018 9:39 pm
Forum: MicroPython pyboard
Topic: uasyncio deque problem
Replies: 6
Views: 9487

Re: uasyncio deque problem

Thanks! I sort of understand and have got it to work. I created a directory on my pyboard file system called uasyncio and manually downloaded __init__.py , core.py, queues.py and synchro.py (from the various uasyncio directories on git hub) into it. I'm assuming that if I knew how to use "git" prope...
by Jim.S
Sun Feb 18, 2018 5:35 pm
Forum: MicroPython pyboard
Topic: uasyncio deque problem
Replies: 6
Views: 9487

uasyncio deque problem

I am just getting back into programming python on the pyboard after 14 months, so I accept I may be omitting something obvious. I am attempting to learn how ascyncio works, and have copied the example from section 7.3 the uasyncho approach of the tutorial (see below). I have successfully copied the ...
by Jim.S
Thu Aug 25, 2016 8:19 pm
Forum: micro:bit boards
Topic: Selecting the accelerometer range
Replies: 1
Views: 3758

Selecting the accelerometer range

It is my understanding that the sensitivity of accelerometer on the microbit board can be switched between three ranges +/-2g +/-4g and +/-8g. Can these be easily selected from Python? (I can't seem to see anything in the documentation)
by Jim.S
Sat Aug 20, 2016 9:06 pm
Forum: micro:bit boards
Topic: Microbit's radio module
Replies: 2
Views: 4657

Microbit's radio module

I am intrigued by the Microbit's radio module. I can understand how one microbit can communicate with another microbit, but is it possible to communicate with other computer hardware. Can standard bluetooth hardware be reconfigured in software to communicate with a microbit?
by Jim.S
Sun Aug 14, 2016 5:25 pm
Forum: micro:bit boards
Topic: repl on the BBC:Microbit
Replies: 22
Views: 21970

Re: repl on the BBC:Microbit

Ah, thanks, I understand now... But this opens up more questions When I run the code from microbit import * with open('file.txt', 'w') as f: f.write('this is a test') The file is written to the Microbit's local-persistant-file-system but can I access that file or copy it to the host computer over th...