Update code for IoT_Environment_Sensor example
This commit is contained in:
parent
5259963766
commit
73e8f0874e
4 changed files with 8 additions and 0 deletions
|
|
@ -27,6 +27,8 @@ import adafruit_logging as logging
|
|||
import rtc
|
||||
|
||||
logger = logging.getLogger('main')
|
||||
if not logger.hasHandlers():
|
||||
logger.addHandler(logging.StreamHandler())
|
||||
|
||||
TIME_SERVICE = "https://io.adafruit.com/api/v2/%s/integrations/time/strftime?x-aio-key=%s"
|
||||
# our strftime is %Y-%m-%d %H:%M:%S.%L %j %u %z %Z see http://strftime.net/ for decoding details
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ except ImportError:
|
|||
import ustruct as struct
|
||||
|
||||
logger = logging.getLogger('main')
|
||||
if not logger.hasHandlers():
|
||||
logger.addHandler(logging.StreamHandler())
|
||||
|
||||
class AirQualitySensor (object):
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ import aio
|
|||
import adafruit_logging as logging
|
||||
|
||||
logger = logging.getLogger('main')
|
||||
if not logger.hasHandlers():
|
||||
logger.addHandler(logging.StreamHandler())
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
gps_uart = busio.UART(board.TX, board.RX, baudrate=9600, timeout=3.000)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ import adafruit_logging as logging
|
|||
|
||||
|
||||
logger = logging.getLogger('main')
|
||||
if not logger.hasHandlers():
|
||||
logger.addHandler(logging.StreamHandler())
|
||||
|
||||
class Gps(object):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue