2022-04-28 09:21:17 -04:00
|
|
|
import os
|
|
|
|
import time
|
|
|
|
|
|
|
|
n = os.uname().machine
|
2023-01-13 07:28:15 -05:00
|
|
|
if "EK-RA6M2" in n:
|
2022-04-28 09:21:17 -04:00
|
|
|
i2c_id = 2
|
2023-01-13 07:28:15 -05:00
|
|
|
elif "EK-RA6M1" in n:
|
2022-04-28 09:21:17 -04:00
|
|
|
i2c_id = 0
|
2023-01-13 07:28:15 -05:00
|
|
|
elif ("RA4M1 CLICKER" in n) or ("EK-RA4M1" in n) or ("EK-RA4W1" in n):
|
2022-04-28 09:21:17 -04:00
|
|
|
print("SKIP")
|
|
|
|
raise SystemExit
|
|
|
|
else:
|
|
|
|
i2c_id = 0
|
|
|
|
|
|
|
|
from machine import I2C
|
|
|
|
|
|
|
|
i2c = I2C(i2c_id)
|