I've been able to connect the sensor, test my code in Thonny Python IDE and see results coming back. The problem I have now, is I'm unable to figure out how to write these results to the mariadb I built which follows the general instructions in the project described above. I've triple checked that my db was build and there "shouldn't" be a problem. I'm out of ideas for solving this one.
Admittedly, I probably tried to simplify the code in the above project which includes many different sensors and suposedly writes to a db no problem. Here is my code which doesn't appear to write to the table. Looking for help...my guess is that this is a simple one .
Code: Select all
import time import math import bme280_sensor import statistics import database interval = 60 SECS_IN_AN_HOUR = 3600 store_speeds =  store_directions =  database = database.weather() while True: start_time = time.time() while time.time() - start_time >= interval: humidity, pressure, temperature = bme280_sensor.read_all() db.INSERT(AMBIENT_TEMPERATURE, AIR_PRESSURE, HUMIDITY) print (humidity, pressure, temperature)