Description
Hi,
I keep getting an error when I try and use this code. sometimes it works flawlessly and rather than the error I get "SX Verrsion 18" but 50% of the time i get the following
MPY: soft reboot error with BME280 Module Found DS devices: [] error with DS18 Module Traceback (most recent call last): File "<stdin>", line 31, in <module> File "sx127x.py", line 121, in __init__ Exception: Invalid version.
my code begins with:
`import machine
import time
import math
try:
import BME280_Read
except:
print("error with BME280 Module")
try:
import DS18_Read
except:
print("error with DS18 Module")
import wind_direction
import statistics
import datetime
import _thread
import struct
import ujson
#lora specific setup for upylora
from config import *
from machine import Pin, SoftSPI
from sx127x import SX127x
import sender
device_spi = SoftSPI(baudrate = 10000000,
polarity = 0, phase = 0, bits = 8, firstbit = SoftSPI.MSB,
sck = Pin(device_config['sck'], Pin.OUT, Pin.PULL_DOWN),
mosi = Pin(device_config['mosi'], Pin.OUT, Pin.PULL_UP),
miso = Pin(device_config['miso'], Pin.IN, Pin.PULL_UP))
lora = SX127x(device_spi, pins=device_config, parameters=lora_parameters)
#end of lora specific setup
...............
`
I'm using a LILYGO TTGo T3 V1.6 board
Here is the snippet when it does work
MPY: soft reboot error with BME280 Module Found DS devices: [] error with DS18 Module SX version: 18 Measuring wind direction for 5 seconds...