I am building a prototype that uses 100 ws2812b LEDs controlled by an Arduino Nano. The circuit is powered by an 18650 battery, I believe the power is getting interrupted when the device is bumped or dropped causing the Arduino to reset and the program to restart. I think this is happening either due to the spring in the battery holder deflecting slightly when bumped causing a momentary disconnect or the switch on the device is sensitive causing a power interruption. I tried adding a capacitor to help supply power temporarily durring these quick interruptions but that didnt seem to work. Any suggestions are appreciated.