Can you try adding a 1k pullup resistor from B15 to BAT_IN, and calling pinMode(B15,"af_opendrain") before the neopixel write?
There's some explanation on http://www.espruino.com/Reference#l_neopÂixel_write but basically Neopixels expect a data input voltage that's proportional to the voltage they are powered from. By default Espruinos output 3.3v, and if you power the LEDs from a 3.7v LiPo you're sorted.
However if you power them from 5v then 3.3v isn't enough for them to read the data signal. While STM32s can't directly output 5v signals, you can use the opendrain mode and a pullup to get what you need.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Can you try adding a 1k pullup resistor from B15 to BAT_IN, and calling
pinMode(B15,"af_opendrain")
before the neopixel write?There's some explanation on http://www.espruino.com/Reference#l_neopÂixel_write but basically Neopixels expect a data input voltage that's proportional to the voltage they are powered from. By default Espruinos output 3.3v, and if you power the LEDs from a 3.7v LiPo you're sorted.
However if you power them from 5v then 3.3v isn't enough for them to read the data signal. While STM32s can't directly output 5v signals, you can use the opendrain mode and a pullup to get what you need.