Also, please post the code for the Mega.
Copying a char into a float is usually need going to do what you expect it to do.
You need to fill a char array with the received characters and once you have detected a '\n'
convert it to a flat using e.g. atof().
If you read through Serial Input Basics - updated, you might get ideas.