合并MINI G2,G5库为GX

This commit is contained in:
dahanzimin
2025-04-17 10:36:50 +08:00
parent 9702a31053
commit f5810e6f03
2 changed files with 7 additions and 29 deletions

View File

@@ -1,23 +0,0 @@
"""
MINI G2 -MixGo MINI EXT G2
MicroPython library for the MINI G2 (Expansion board for MixGo MINI)
=======================================================
@dahanzimin From the Mixly Team
"""
import gc
from machine import Pin, SoftI2C
'''i2c-extboard'''
ext_i2c = SoftI2C(scl=Pin(7), sda=Pin(8), 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)
'''Reclaim memory'''
gc.collect()

View File

@@ -1,7 +1,7 @@
""" """
MINI G5 -MixGo MINI EXT G5 MINI GX -MixGo MINI EXT (G2, G5)
MicroPython library for the MINI G5 (Expansion board for MixGo MINI) MicroPython library for the MINI GX (Expansion board for MixGo MINI)
======================================================= =======================================================
@dahanzimin From the Mixly Team @dahanzimin From the Mixly Team
""" """
@@ -15,16 +15,17 @@ ext_i2c = SoftI2C(scl=Pin(7), sda=Pin(8), freq=400000)
'''RFID_Sensor''' '''RFID_Sensor'''
try : try :
import rc522 import rc522
ext_rfid = rc522.RC522(ext_i2c) ext_rfid = rc522.RC522(ext_i2c)
except Exception as e: except Exception as e:
print("Warning: Failed to communicate with SI522A (RFID) or",e) print("Warning: Failed to communicate with SI522A (RFID) or",e)
'''ASR_Sensor''' '''ASR_Sensor(G5)'''
try : try :
import ci130x import ci130x
ext_asr = ci130x.CI130X(ext_i2c) ext_asr = ci130x.CI130X(ext_i2c)
except Exception as e: except Exception as e:
print("Warning: Failed to communicate with CI130X (ASR) or",e) #print("Warning: Failed to communicate with CI130X (ASR) or",e)
pass
'''Reclaim memory''' '''Reclaim memory'''
gc.collect() gc.collect()