mu editor for micropython

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
rob.frohne
Posts: 1
Joined: Thu Dec 29, 2016 4:38 am

Re: mu editor for micropython

Postby rob.frohne » Thu Dec 29, 2016 5:22 am

Hi Peter, et. al.,

I found for my setup I had to select the fourth element in the serial available_ports array in logic.py, instead of 0, because my esp8266 is at /dev/ttyUSB3. See below:

def find_upython_device():
"""
TODO - allow option to select which serial port to use.
For now, this just returns the first serial port found
"""
available_ports = QSerialPortInfo.availablePorts()
try:
port = available_ports[4]
logger.info('Using port {}'.format(port.portName()))
return port.portName()
except IndexError:
return None

Flashing is not working for me. I'm wondering if that is because nobody has modified the flashing to work with the esp8266 yet, or if it is for a similar reason to the problem I fixed above. Sorry if this is a newbie question. I'm rather new to python.

Thanks,

Rob

askvictor
Posts: 22
Joined: Tue Mar 22, 2016 9:08 pm

Re: mu editor for micropython

Postby askvictor » Sun Jan 01, 2017 11:24 am

rob.frohne wrote:Hi Peter, et. al.,

I found for my setup I had to select the fourth element in the serial available_ports array in logic.py, instead of 0, because my esp8266 is at /dev/ttyUSB3. See below:

...

Flashing is not working for me. I'm wondering if that is because nobody has modified the flashing to work with the esp8266 yet, or if it is for a similar reason to the problem I fixed above. Sorry if this is a newbie question. I'm rather new to python.


Yeah, the serial port selection is scrappy. Ideally it would try to autodetect, but that's harder than it sounds, and also, few computers have multiple (or, indeed, any) serial ports these days, so 0 is a good guess for most cases.

Flashing through mu is not yet implemented - its only there for the micro:bit at this stage.

rcolistete
Posts: 83
Joined: Thu Dec 31, 2015 3:12 pm

Re: mu editor for micropython

Postby rcolistete » Sun Jan 01, 2017 11:53 am

Have you seen this video ?
Blockly for MicroPython in the browser and in Mu
December 8th 2016
A quick overview of work in progress concerning the use of blocks, MicroPython, the BBC micro:bit and the browser based editor and Mu
https://www.youtube.com/watch?v=XCZEKtNHx5k

User avatar
pythoncoder
Posts: 1263
Joined: Fri Jul 18, 2014 8:01 am

Re: mu editor for micropython

Postby pythoncoder » Mon Jan 02, 2017 8:54 am

Impressive!

In a lighter vein I was struck by his statement "I've also made sure that not everything you can do with the Microbit is available in blocks. Some of the really cool more complicated features to do with the microbit you can only access using Python."

Doubtless that required a great deal of effort and attention to detail. You wouldn't want to reduce the entirety of software engineering to shifting blocks around, now would you? ;)
Peter Hinch

rcolistete
Posts: 83
Joined: Thu Dec 31, 2015 3:12 pm

Re: mu editor for micropython

Postby rcolistete » Fri Jan 13, 2017 10:36 pm

rcolistete wrote:Have you seen this video ?
Blockly for MicroPython in the browser and in Mu
December 8th 2016
A quick overview of work in progress concerning the use of blocks, MicroPython, the BBC micro:bit and the browser based editor and Mu
https://www.youtube.com/watch?v=XCZEKtNHx5k

You can test a local web Python Editor for BBC Micro:bit with Blocks using the source code :
https://github.com/bbcmicrobit/PythonEditor
It is easy :

Code: Select all

$ git clone https://github.com/bbcmicrobit/PythonEditor.git
$ cd PythonEditor
$ git submodule update --init --recursive

Then double click 'editor.html'.


Return to “Programs, Libraries and Tools”

Who is online

Users browsing this forum: No registered users and 1 guest