I have a Trinket M0 attached to a 16 LED NeoPixel. GND, 3V, D0 (Trinket M0) are connected to Ground, Power, Data-In (NeoPixel).
I have a SPST that goes between the 3V output on Trinket and Power Input on NeoPixel. The circuit is fine when the switch is in the on position, but when I turn it off, I get an error message in serial console that "You are in safe mode: something unanticipated happened. The microcontroller's power dipped."
The Trinket is plugged in via Micro-USB to the wall so I don't mind if the switch just turns off the LEDs or the entire Trinket but what is the best way to wire the switch to this?