You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Fix board detect order
This commit is contained in:
@@ -57,14 +57,14 @@ def detect_board():
|
||||
elif sys.platform == "esp32":
|
||||
from machine import Pin, I2C
|
||||
|
||||
i2c0 = I2C(0, sda=Pin(48), scl=Pin(47))
|
||||
if single_address_i2c_scan(i2c0, 0x15) and single_address_i2c_scan(i2c0, 0x6B): # CST816S touch screen and IMU
|
||||
return "waveshare_esp32_s3_touch_lcd_2"
|
||||
|
||||
i2c0 = I2C(0, sda=Pin(39), scl=Pin(38))
|
||||
if single_address_i2c_scan(i2c0, 0x14) or single_address_i2c_scan(i2c0, 0x5D): # "ghost" or real GT911 touch screen
|
||||
return "matouch_esp32_s3_2_8"
|
||||
|
||||
i2c0 = I2C(0, sda=Pin(48), scl=Pin(47)) # IO48 is floating on matouch and therefore, using that for I2C will find many devices, so do this after matouch_esp32_s3_2_8
|
||||
if single_address_i2c_scan(i2c0, 0x15) and single_address_i2c_scan(i2c0, 0x6B): # CST816S touch screen and IMU
|
||||
return "waveshare_esp32_s3_touch_lcd_2"
|
||||
|
||||
i2c0 = I2C(0, sda=Pin(9), scl=Pin(18))
|
||||
if single_address_i2c_scan(i2c0, 0x6B): # IMU (plus possibly the Communicator's LANA TNY at 0x38)
|
||||
return "fri3d_2024"
|
||||
|
||||
Reference in New Issue
Block a user