Browse Source

getData ahhhhhhhh

marek 1 tháng trước cách đây
mục cha
commit
ee6f3633e1
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      apps/getData.py

+ 2 - 2
apps/getData.py

@@ -6,6 +6,7 @@ import sqlite3
 from dotenv import load_dotenv
 import os
 import signal
+import logging
 
 import smbus2
 import bme280
@@ -68,8 +69,7 @@ async def ble_task():
                     await asyncio.sleep(1)
         except Exception as e:
             outdoorConnected = 0
-            print(f"exception while connecting or getting data {e}")
-
+            logging.exception("Exception while connecting or getting data")
 async def sensor_task():
     global indoorValues