"OSError: [Errno 103] ECONNABORTED" what to do?
Posted: Fri Oct 11, 2019 9:44 am
Hello, I am writing code for a home weather station. Data received from sensors is sent to the site for further processing. To work, the script must automatically run after shutdown or sleep. When starting from boot.py or main.py, it generates an error "OSError: [Errno 103] ECONNABORTED". The code is working, when started manually it works fine What to do? Weather Station Code:
Code: Select all
from machine import deepsleep, I2C
import machine
import urequests
import time
import bmp180
def index():
i2c = I2C(sda = machine.Pin(5), scl = machine.Pin(4), freq = 1000000)
bmp = bmp180.BMP180(i2c)
#r = float(10040 * ((1024/a.read())-1))
#r = str((298 * 3950) / (3950 + 298 * log(r / 5000)) - 274)[0:5:1]
urequests.get('http://192.168.100.3/input_data/?temp='+str(bmp.temperature)+'&pressure='+str(bmp.pressure)+'&vl=1')
deepsleep(10000)
index()