Control stepper with serial command

int received_data[0]; // allocate memory for data over serial

This is an unusual statement, and I'm not sure what it actually does -- it allocates an array of length 0.

Try changing "received_data[0]" to "received_data" everywhere and see if that helps.