One thing: You should do this instead
volatile int isr_flag = 0;
It might not solve your problem tho’
But missing pull-up resistors on the I2C lines might explain your hanging Photon
One thing: You should do this instead
volatile int isr_flag = 0;
It might not solve your problem tho’
But missing pull-up resistors on the I2C lines might explain your hanging Photon