You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i2c scanning all the devices can confuse some of them,
such as the OV* camera's. Better to selectively scan just the ones
we want to know about, plus, it's also faster.
devices=set(i2c0.scan()) # causes a "ghost" device to appear on 0x20 and breaks the camera
39
-
if {0x14} <=devicesor {0x5D} <=devices: # "ghost" device or real GT911
40
-
return"matouch_esp32_s3_2_8"
41
-
42
-
i2c0=I2C(0, sda=Pin(48), scl=Pin(47)) # on matouch_esp32_s3_2_8, this "finds" devices at all addresses 8-119 so only do this after matouch_esp32_s3_2_8
43
-
if {0x15, 0x6B} <=set(i2c0.scan()): # touch screen and IMU (at least, possibly more)
60
+
i2c0=I2C(0, sda=Pin(48), scl=Pin(47))
61
+
ifsingle_address_i2c_scan(i2c0, 0x15) andsingle_address_i2c_scan(i2c0, 0x6B): # CST816S touch screen and IMU
44
62
return"waveshare_esp32_s3_touch_lcd_2"
45
63
64
+
i2c0=I2C(0, sda=Pin(39), scl=Pin(38))
65
+
ifsingle_address_i2c_scan(i2c0, 0x14) orsingle_address_i2c_scan(i2c0, 0x5D): # "ghost" or real GT911 touch screen
66
+
return"matouch_esp32_s3_2_8"
67
+
46
68
i2c0=I2C(0, sda=Pin(9), scl=Pin(18))
47
-
if{0x6B} <=set(i2c0.scan()): # IMU (plus possibly the Communicator's LANA TNY at 0x38)
69
+
ifsingle_address_i2c_scan(i2c0, 0x6B): # IMU (plus possibly the Communicator's LANA TNY at 0x38)
48
70
return"fri3d_2024"
49
71
50
-
# default: if {0x6A} <= set(i2c0.scan()): # IMU (plus a few others, to be added later, but this should work)
72
+
# default: if single_address_i2c_scan(i2c0, 0x6A): # IMU but currently not installed
0 commit comments