arduino pro mini POV getting bricked

Introduction :
Hi , one years ago i made POV but I couldn’t make to run properly.
I was new to electronics and programming at that time. So I didn’t scratched my head on it and threw it away but now I want to revist that project and find the reason why that didn’t worked. Fortunately I have all the data related to that project. So let me introduce what I made…
Working:
I used Arduino pro mini 3.3v 8MHz and powered it directly using Li-ion battery.
I also attached a hall effect sensor to interrupt pin(2).
For leds I used 9 neo-pixels attached to digital pin 13;
I mounted all of this hardware on piece of acrylic and attached a motor to it.
I also attached a magnet in the stand.
Note :- You can see the pictures to get an idea of hardware
image-1
image-2
video-1
video-2

Problem:
So when i started the motor. It run good for some time and after a while arduino got bricked

code

// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
  #include <avr/power.h>
#endif

// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
#define PIN            13

// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS      9

// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);


int hall = 2;

bool I[]={1,1,1,1,1,1,1,1,1};  // array for led pixel

void setup() {
  attachInterrupt(0, start, FALLING);
  pinMode(hall,INPUT_PULLUP);
  pixels.begin(); // This initializes the NeoPixel library.
}

void loop() {

}

//ISR routine
void start(){
  writeletter(I);
  }
  
 //code for running pixels
void writeletter(boolean letter[]){
 //turn on led pixels accroding to data in array
  for(int p=0;p<NUMPIXELS;p++){
    if(letter[p]==1){
      pixels.setPixelColor(p, pixels.Color(255,255,255));
      }
      else{
         pixels.setPixelColor(p, pixels.Color(0,0,0));
        }
       pixels.show();
      }
  
  // turn off al leds pixels
      for(int p=0;p<NUMPIXELS;p++){
      pixels.setPixelColor(p, pixels.Color(0,0,0));
      pixels.show();
      }
  }

Note:- I have also attached code file.

Reasons :
According to my knowledge following could the reasons,

  • Nested Interrupts happening as I wrote a lot code in ISR routine.
  • MCU might be having issue with power as it was not regulated and connected directly to battery.
  • Neo-pixel library might be interfering with interrupts in some way.

So what you think might be reason for this kind of behavior.

test_code.ino (1.53 KB)

abdulsamaddabu:
Reasons :
According to my knowledge following could the reasons,

  • Nested Interrupts happening as I wrote a lot code in ISR routine.
  • MCU might be having issue with power as it was not regulated and connected directly to battery.
  • Neo-pixel library might be interfering with interrupts in some way.

So what you think might be reason for this kind of behavior.

No. Inside an ISR, interrupts are turned off so you won't get any more (except see #3)
Yes.
Yes. The Neopixel library disables/enables interrupts when clocking the data out. You need to move all your ISR code out into a normal function and just have the ISR set a flag. Then, check for the flag and run your code.