Cannot import lora library
-
I'm having a problem when uploading the final project file to the board. I had updated both the pysense board and the firmware ( v 1.18.3). When I try this piece of code:
from network import lora
As in the examples, the board responds with this message.
ImportError: cannot import name loraMy project folder it's something like this :
Project
. -main.py
. -boot.py
. -pymakr.conf
. -lib(dir):
. -LIS2HH12.py
. -LTR329ALS... .py
. -pycoproc.py
. -pysense.py
. -SI7006A20.pyWhat could I be doing wrong ?
-
@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)