File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
internal_filesystem/lib/mpos Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1313if sys .platform == "linux" or sys .platform == "darwin" : # linux and macOS
1414 board = "linux"
1515elif sys .platform == "esp32" :
16- board = "fri3d_2024" # default fallback
1716 import machine
1817 from machine import Pin , I2C
1918 i2c0 = I2C (0 , sda = machine .Pin (48 ), scl = machine .Pin (47 ))
2019 if i2c0 .scan () == [21 , 107 ]: # touch screen and IMU
2120 board = "waveshare_esp32_s3_touch_lcd_2"
21+ else :
22+ i2c0 = I2C (0 , sda = machine .Pin (9 ), scl = machine .Pin (18 ))
23+ if i2c0 .scan () == [107 ]: # only IMU
24+ board = "fri3d_2024"
25+ else :
26+ print ("Unable to identify board, defaulting..." )
27+ board = "waveshare_esp32_s3_touch_lcd_2" # default fallback
2228
23- print (f"Detected hardware { board } , initializing... " )
29+ print (f"Initializing { board } hardware " )
2430import mpos .info
2531mpos .info .set_hardware_id (board )
2632__import__ (f"mpos.board.{ board } " )
You can’t perform that action at this time.
0 commit comments