Navigation

    Welcome to the Pycom forum

    Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Tags
    3. import
    Log in to post

    • K

      Cannot import lora library
      LoPy • lopy lora pycom library import • • Kcsss  

      2
      0
      Votes
      2
      Posts
      97
      Views

      ShanevanJ

      @Kcsss Read the documentation here more carefully. The case is important! from network import LoRa import socket import ubinascii import struct # Initialise LoRa in LORAWAN mode. # Please pick the region that matches where you are using the device: # Asia = LoRa.AS923 # Australia = LoRa.AU915 # Europe = LoRa.EU868 # United States = LoRa.US915 lora = LoRa(mode=LoRa.LORAWAN, region=LoRa.EU868)
    • W

      Reread Setting.py while the program is running.
      WiPy 2&3 • lopy wipy import • • Wolli01  

      8
      0
      Votes
      8
      Posts
      511
      Views

      W

      @robert-hh That's how it works perfectly! Thank you very much. import sys del sys.modules['settings'] time.sleep(1) import settings
    • M

      Make application location-independent
      Discussion • import • • Martinnn  

      5
      0
      Votes
      5
      Posts
      558
      Views

      P

      I've asked internally and It does not seem like we have a good way to get the equivalent of __FILE__ in micropython. Short of adding ALL of your applications ./lib subfolders to sys.path in boot.py prior to running/importing anything else.
    • B

      Import Custom Library
      MicroPython • fipy i2c atom library import • • Burgeh  

      3
      0
      Votes
      3
      Posts
      829
      Views

      B

      @dan I understand that and get this error when I flash it, but I would also like it to link in Atom so I can build and run it right away without having to flash it.
    • P

      Cannot import name Sigfox
      FiPy • fipy sigfox import • • pymiom  

      11
      0
      Votes
      11
      Posts
      2842
      Views

      H

      @pymiom @mbartecki I got the new public firmware supporting Sigfox, by updating the device this morning! Enjoy guys :) Thank you @jmarcelino
    • J

      Unable to get Service from Bluetooth Sensor Device
      WiPy 2&3 • bluetooth getting started import gattcconnection service • • jmahesh  

      2
      0
      Votes
      2
      Posts
      826
      Views

      S

      please add time.sleep after connection and make service as dictionary, things will work...
    • S

      "ImportError: no module named 'mqtt'" on WiPy 2.0
      WiPy 2&3 • mqtt wipy 2.0 import • • SesamProductions  

      2
      0
      Votes
      2
      Posts
      1991
      Views

      robert-hh

      @sesamproductions You have to copy the mqtt code to your device first. Instructuctions are for instance here: https://docs.pycom.io/chapter/tutorials/all/aws.html, or search the forum for mqtt. Edit: A simple mqtt client is also available at the micropython lib https://github.com/micropython/micropython-lib
    • B

      Import a module by a name stored in a variable? (importlib?)
      MicroPython • import • • BetterAuto  

      1
      0
      Votes
      1
      Posts
      848
      Views

      No one has replied

    • B

      WiPy 2.0 + Blynk
      WiPy 2&3 • import blynk attributeerror • • BitNide  

      7
      0
      Votes
      7
      Posts
      2459
      Views

      T

      @BitNide I got it "working" ... at least 02_virtual_read.py. In BlynkLib.py I changed _TimerMap = {}. Rationale: Presumably the HwPin class is not used by virtual pins. Then it would not be surprising if they are not affected by the change. Not sure yet if I even care about non-virtual pins.
    • A

      Import a library and all its dependencies on lib folder
      WiPy 2&3 • library import lib dependencies • • Arkaik  

      6
      0
      Votes
      6
      Posts
      2499
      Views

      livius

      @Arkaik classic way always work ;-)
    • 1 / 1