Arduino restarting itself


I have some code which make Arduino (I have 2 of them: Uno & Mega) to restart.
Please advise where is the problem.

Thank you :slight_smile:

ABC.h (2.62 KB)

receive_data.ino (2.31 KB)

Where do you limit the value of p_index to stay between 0 and 7? I only see you counting up to infinity.

Thank you :slight_smile:

So it really was that simple, huh?