File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def get_unique_pins():
3131 "DOTSTAR_DATA" ,
3232 "APA102_SCK" ,
3333 "APA102_MOSI" ,
34- "L " ,
34+ "LED " ,
3535 "SWITCH" ,
3636 "BUTTON" ,
3737 ]
Original file line number Diff line number Diff line change @@ -16,10 +16,27 @@ def is_hardware_i2c(scl, sda):
1616
1717
1818def get_unique_pins ():
19- exclude = ['NEOPIXEL' , 'APA102_MOSI' , 'APA102_SCK' ]
20- pins = [pin for pin in [
21- getattr (board , p ) for p in dir (board ) if p not in exclude ]
22- if isinstance (pin , Pin )]
19+ exclude = [
20+ getattr (board , p )
21+ for p in [
22+ # This is not an exhaustive list of unexposed pins. Your results
23+ # may include other pins that you cannot easily connect to.
24+ "NEOPIXEL" ,
25+ "DOTSTAR_CLOCK" ,
26+ "DOTSTAR_DATA" ,
27+ "APA102_SCK" ,
28+ "APA102_MOSI" ,
29+ "LED" ,
30+ "SWITCH" ,
31+ "BUTTON" ,
32+ ]
33+ if p in dir (board )
34+ ]
35+ pins = [
36+ pin
37+ for pin in [getattr (board , p ) for p in dir (board )]
38+ if isinstance (pin , Pin ) and pin not in exclude
39+ ]
2340 unique = []
2441 for p in pins :
2542 if p not in unique :
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def get_unique_pins():
2626 "DOTSTAR_DATA" ,
2727 "APA102_SCK" ,
2828 "APA102_MOSI" ,
29- "L " ,
29+ "LED " ,
3030 "SWITCH" ,
3131 "BUTTON" ,
3232 ]
You can’t perform that action at this time.
0 commit comments