else:
raise NotImplementedError("Board not supported {}".format(board_id))
-if SCL and SDA:
+if "SCL" in locals() and "SDA" in locals():
def I2C():
"""The singleton I2C interface"""
return busio.I2C(SCL, SDA)
-if SCLK and MOSI and MISO:
+if "SCLK" in locals() and "MOSI" in locals() and "MISO" in locals():
def SPI():
"""The singleton SPI interface"""