adafruit / Adafruit_CircuitPython_ESP32SPI

ESP32 as wifi with SPI interface
MIT License
104 stars 75 forks source link

adafruit_esp32spi_wifimanager: allow DotStar as status pixel? #13

Closed anecdata closed 5 years ago

anecdata commented 5 years ago

Since ItsyBitsy M4 is a viable main MCU board to use with the ESP32 co-processor, would be nice to be able to use the built-in DotStar as the status pixel instead of adding an external NeoPixel.

ladyada commented 5 years ago

yeah honestly we should just default to the built in LED - want to try a PR?

anecdata commented 5 years ago

I'm 95% n00b at [Circuit]Python and 100% n00b at git[Hub] tools & process, wouldn't trust me to modify libraries at this point. Happy to test stuff though, I'm good at breaking code ;-)

anecdata commented 5 years ago

Thought there'd be a simple abstraction or conditional possible, but DotStar not in HAL or core modules. The CP RGB status LED works for both neos and dots (CPX being special), so maybe some abstraction there. Or... cheerlights uses fancyled, which seems to abstract successfully between the two. Red LED is universal though.

jerryneedell commented 5 years ago

@ladyada Are you suggesting using the builtin LED (D13 on most boards) instead of the neopixel? It would still be nice to pass in a Pin since there are some odd cases (particle boards for instance). But are you ok with just an on/off for the LED instead of the colors the neopixel now uses or do you want to preserve the option for a neopixel. Should we have 3 optional kwargs -- one for a Neopixel, one for Dotstar, one for an LED -- if None -- ignore them -- if set -- use them. or just 2 kwargs -- Pin and type

makermelissa commented 5 years ago

I think this is a great idea! I didn't realize the ItsyBitsy had a DotStar. I'm going to think about the best way to implement this.

ladyada commented 5 years ago

ideally you'd pass in a NeoPixel or DotStar object that you'd call fill on - no instantiation in the library itself

makermelissa commented 5 years ago

Yeah, that's kind of along the lines of what I was thinking. That's about how I did the DotStar/NeoPixel abstraction in the FeatherWing library.

makermelissa commented 5 years ago

Fixed #13 via #14.