File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ class BoardType:
1313 PICO_W = 'Raspberry Pi Pico W'
1414 PICO = 'Raspberry Pi Pico'
1515 ESP8266 = 'ESP8266'
16+ ESP32_C3 = 'ESP32-C3'
1617 ESP32 = 'ESP32'
1718 UNKNOWN = 'Unknown'
1819
@@ -29,6 +30,11 @@ def detect_board_type(self):
2930 return self .BoardType .PICO
3031 elif sysname == 'esp8266' :
3132 return self .BoardType .ESP8266
33+ elif sysname == 'esp32' :
34+ if 'esp32c3' in machine :
35+ return self .BoardType .ESP32_C3
36+ else :
37+ return self .BoardType .ESP32
3238 # Add more conditions for other boards here
3339 else :
3440 return self .BoardType .UNKNOWN
Original file line number Diff line number Diff line change 2323 led = Pin (25 , Pin .OUT )
2424elif BOARD_TYPE == Board .BoardType .ESP8266 :
2525 led = Pin (2 , Pin .OUT )
26+ elif BOARD_TYPE == Board .BoardType .ESP32 :
27+ led = Pin (2 , Pin .OUT )
28+ elif BOARD_TYPE == Board .BoardType .ESP32_C3 :
29+ led = Pin (8 , Pin .OUT )
2630else :
2731 led = Pin (2 , Pin .OUT )
2832
You can’t perform that action at this time.
0 commit comments