Page 1 of 1

Not sure how to install MicroPython package onto PyBoard v1.1

Posted: Sat Jan 28, 2017 12:34 am
by happyday
I am the happy recipient of a PyBoardv1.1. I wish to use mqtt. I found the umqtt.simple package. I apologize for a perhaps dumb questions - but I couldn't find install instructions. How do I install this library https://pypi.python.org/pypi/micropytho ... simple/1.3 as a library accessible via >>>from umqtt.simple import MQTTClient

Thank you.

Re: Not sure how to install MicroPython package onto PyBoard v1.1

Posted: Sat Jan 28, 2017 6:02 am
by pythoncoder
If you install the latest release build of firmware (esp8266-20170108-v1.8.7.bin) from http://micropython.org/download you should find it ready installed.

There is a FAQ on MQTT here http://forum.micropython.org/viewtopic. ... FAQ#p12683.

Re: Not sure how to install MicroPython package onto PyBoard v1.1

Posted: Sat Jan 28, 2017 2:32 pm
by happyday
Thank you VERY much for your reply. I installed 1.8.7 for the PyBoard 1.1...here is REPL output:

MicroPython v1.8.7 on 2017-01-08; PYBv1.1 with STM32F405RG

SADLY - when I enter:
>>> from umqtt.simple import MQTTClient
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'umqtt'

MicroPython 1.8.7 doesn't seem to include umqtt.simple

You note umqtt Is included in MicroPython 1.8.7? What am I missing...

How do I tell what libraries are part of the MicroPython build (within REPL)?

Thank you.

Re: Not sure how to install MicroPython package onto PyBoard v1.1

Posted: Sat Jan 28, 2017 3:29 pm
by dhylands
help('modules') on very recent builds will show the available options.

mqtt isn't included by default with the pyboard since the pyboard doesn't have any network access by default.

Re: Not sure how to install MicroPython package onto PyBoard v1.1

Posted: Sat Jan 28, 2017 3:36 pm
by happyday
Thank you. The help('modules') is very useful!

OH SNAP - so here I am tightly correlating MicroPython with networking....silly me...drat. The PyBoard V1.1 does not have a network chip (like the ESP8266)...shoot...I really like the PyBoard's implementation of UART, but useless to me if I can't use mqtt. Is there an ESP8266 board you would recommend? But then, all are limited to the machine's module which just has UART0 for RX/TX ....and I was having problems receiving data (whereas the UART receive w/ pyb worked very well).

Re: Not sure how to install MicroPython package onto PyBoard v1.1

Posted: Sat Jan 28, 2017 5:56 pm
by pythoncoder
The officially supported ESP8266 board is the Adafruit Feather Huzzah https://www.adafruit.com/products/2821.