1 """Allows useful indirection to test Pin naming logic by switching platform in testing
2 or provide bootstrapping logic for board identification where auto-detection is not
3 feasible (e.g. multiple ESP8266 boards architecturally identical). Once runtime
4 environment is established, can choose various routes to make available and re-export
5 common modules and operations, depending on platform support
10 microcontroller = sys.platform
12 microcontroller = None
14 if microcontroller is not None:
15 if microcontroller == "esp8266":
16 board = "feather_huzzah"
17 elif microcontroller == "samd21":
18 board = "feather_m0_express"
19 elif microcontroller == "pyboard":
20 microcontroller = "stm32"
25 implementation = sys.implementation.name
26 if implementation == "micropython":
27 from utime import sleep, time
28 elif implementation == "circuitpython":
29 from time import sleep, time