更新支持sang_g2 扩展板库

This commit is contained in:
dahanzimin
2025-01-09 10:38:30 +08:00
parent b55243bb1d
commit a9d4e9b83e
2 changed files with 31 additions and 1 deletions

View File

@@ -53,7 +53,7 @@ except Exception as e:
'''ASR-Sensor'''
try :
import ci130x
onboard_rfid = ci130x.CI130X(onboard_i2c)
onboard_asr = ci130x.CI130X(onboard_i2c)
except Exception as e:
print("Warning: Failed to communicate with CI130X (ASR) or",e)

View File

@@ -0,0 +1,30 @@
"""
SANT G2 -MixGo SANT EXT G2
MicroPython library for the SANT G2 (Expansion board for MixGo SANT)
=======================================================
@dahanzimin From the Mixly Team
"""
import gc
from machine import Pin, SoftI2C
'''i2c-extboard'''
ext_i2c = SoftI2C(scl=Pin(5), sda=Pin(6), freq=400000)
'''RFID_Sensor'''
try :
import rc522
ext_rfid = rc522.RC522(ext_i2c)
except Exception as e:
print("Warning: Failed to communicate with SI522A (RFID) or",e)
'''RADAR_Sensor'''
try :
import cbr817
ext_mmw = cbr817.CBR817(ext_i2c)
except Exception as e:
print("Warning: Failed to communicate with CBR817 (RADAR) or",e)
'''Reclaim memory'''
gc.collect()