• Oh.... I see why you need it on the ESP8266...

    You can't use the SPI pin, since it only has one SPI, and that's used for the EEPROM, so any use of the EEPROM would confuse the WS2812's...

    Ugh.

    There will need to be some solution to this for the ESP8266 - it's gotta be able to drive neopixels.
    I'm not sure what the right way to handle this is - I guess you need the bit of native code to do that on the ESP8266, since the normal Espruino way of controlling WS2812's won't work...

    In general, I don't like the idea of doing that sort of thing, but I don't see an alternative for this specific case. On STM32 platforms, with multiple SPIs, I think we should stick to the current method, as it covers more than just the WS2812's, and I haven't heard people complaining that they don't have enough SPI pins for WS2812's on the normal Espruino boards.

    I suppose one more option is to make a simple neopixel 'wrapper' module for normal Espruino boards. We could tweak Modules.addCached so it wouldn't overwrite built-in modules, and then there could be a native equivalent module just for the ESP8266, that would take over from the normal Espruino one.

    This.... this might be a good, more general solution to this sort of case...

About

Avatar for DrAzzy @DrAzzy started