unix port machine.UART

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.
corleo
Posts: 2
Joined: Sun Nov 13, 2016 4:55 am

unix port machine.UART

Postby corleo » Wed Feb 22, 2017 7:48 am

Hello, everyone!
Does upython unix port really have a 'machine' module with all this classes listed in its doc at http://docs.micropython.org/en/latest/u ... ml#classes ? Because when I try to 'import machine' at unix repl I get "ImportError: no module named 'machine'" and the 'umachine' module has only mem8, mem16, mem32, PinBase and time_pulse_us...

I'm using today's version "MicroPython v1.8.7-320-gda6dbc80 on 2017-02-22". So there is something I can do to use UART in unix port?

Thank you,
Corleo

pfalcon
Posts: 902
Joined: Fri Feb 28, 2014 2:05 pm

Re: unix port machine.UART

Postby pfalcon » Mon Apr 10, 2017 5:24 am

corleo wrote:Hello, everyone!
Does upython unix port really have a 'machine' module with all this classes listed in its doc at http://docs.micropython.org/en/latest/u ... ml#classes ?


Please read the introduction to the libraries in the documentation: http://docs.micropython.org/en/latest/u ... index.html

Because when I try to 'import machine' at unix repl I get "ImportError: no module named 'machine'"


Per the documentation above, the next step would be checking micropython-lib...

and the 'umachine' module has only mem8, mem16, mem32, PinBase and time_pulse_us...

I'm using today's version "MicroPython v1.8.7-320-gda6dbc80 on 2017-02-22". So there is something I can do to use UART in unix port?


Unix port provides standard "tty" module and that's the most straightforward way to do that. There's also pyserial work-alike: https://github.com/pfalcon/micropython-serial


Return to “Programs, Libraries and Tools”

Who is online

Users browsing this forum: No registered users and 1 guest