We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a70ea39 commit b04926dCopy full SHA for b04926d
examples/wiznet5k_wsgiserver_test.py
@@ -62,14 +62,15 @@ def get_static_file(filename):
62
# Chip Select for Particle Ethernet FeatherWing
63
# cs = digitalio.DigitalInOut(board.D5)
64
65
-# Initialize SPI and I2C bus
+# Initialize SPI bus
66
spi_bus = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
67
-i2c = busio.I2C(board.SCL, board.SDA)
68
69
try:
+ # Initialize the I2C bus to read the MAC
70
+ i2c = busio.I2C(board.SCL, board.SDA)
71
# Read the MAC from the 24AA02E48 chip
72
mac = get_mac(i2c)
-except OSError:
73
+except (RuntimeError, OSError):
74
# Hard coded MAC if there is no 24AA02E48
75
mac = b"\xFE\xED\xDE\xAD\xBE\xEF"
76
0 commit comments