From: Cefn Hoile Date: Mon, 19 Feb 2018 13:58:32 +0000 (+0000) Subject: Exporting time symbols not modules X-Git-Tag: 0.1.0~4^2~88 X-Git-Url: https://git.ayoreis.com/Adafruit_Blinka-hackapet.git/commitdiff_plain/deeac352517e6fd455eb9fcc95eced45caa7dd1d Exporting time symbols not modules --- diff --git a/python/agnostic.py b/python/agnostic.py index 1d0881d..167b4d6 100644 --- a/python/agnostic.py +++ b/python/agnostic.py @@ -11,20 +11,19 @@ try: except: microcontroller = None -# TODO switch name of platform below to be microcontroller if microcontroller is not None: if microcontroller == "esp8266": board = "feather_huzzah" elif microcontroller == "samd21": - board="feather_m0_express" + board = "feather_m0_express" elif microcontroller == "pyboard": - microcontroller= "stm32" - board="pyboard" + microcontroller = "stm32" + board = "pyboard" else: board = None implementation = sys.implementation.name if implementation == "micropython": - import utime as time + from utime import sleep, time elif implementation == "circuitpython": - import time \ No newline at end of file + from time import sleep, time