Manage cookies

We use cookies to improve our services. Read more about how we use cookies and how you can refuse them.

The necessary cookies help to make the website work properly.

Anonymous statistical cookies help to understand how visitors use the website.

  • MicroPython
    1 min | 10303

    #Tutorial: Installing dependencies on MicroPython

    MicroPython | 1 min | 10303


    While I was reading my getting stated tutorial about MicroPython again, I noticed that I've forgotten to tell something about dependencies or packages.

    Here is possible to find some MicroPython packages. On the WeMos (ESP32) or the ESP8266, it is possible to install these packages using the upip package manager. The WiPy doesn't have the package.

    To download the new packages, you need to connect the board to the Internet. I take the WeMos as example and typing the following, you can connect the board to your WiFi router:

    ssid_ = <your_ssid>
    wp2_pass = <your wpa2 password>
    
    import network
    sta_if = network.WLAN(network.STA_IF)
    
    sta_if.active(True)
    sta_if.connect(ssid_, wp2_pass)
    print(sta_if.isconnected())

    Then, to install a package, simple type the following, the results are shown on Fig. 1.

    import upip
    upip.install('notes-pico')
    upip install notes-pico
    Fig. 1: Installing notes-pico using the package manager upip.

    A lot of packages listed on pypi are dummy packages. That means, they are empty. Installing packages on the ESP8266 is really difficult because of the limited RAM. You usually get the memory allocation error.


    Comments

    pp 08.27.2019

    May I know if there is any bluetooth package for ESP32 micropython development. Thank you very much.

    luiz sampaio 10.25.2020

    It is no longer working...

    Installing to: /lib/ Error installing 'notes-pico': , packages may be partially installed

    it is hard to use upip...