Need to send quite a bit of variable values to arduino using serial

Hi, I have a sketch that works now with lcd menu and momentary on switches(saves to eeprom)but I want to add PC control to it. My problem is I need to send up to around 40 different variables of mixed types to arduino. Not only do I need 40 or so different values sent but there is 4 different sets of 40 or so variables....Using mega 2560 so there's plenty of room for sketch.

I've been trying to think of an elegant solution for this but coming up short. Any ideas?

I've been trying to think of an elegant solution for this but coming up short. Any ideas?

You've provided only the vaguest outline of the problem. You haven't shown any code, or described anything that you have tried.

"40 different variables of mixed times" is too vague. You can't use mixed types in C++. Every variable has exactly one type for its entire existence. Now, I'm reasonably certain that what you meant was "40 variables that are not all the same type". But, clarity is important.

It seems to be like sending a name = value pair would be the simplest solution. One name and value pair would define which set of 40 values would be relevant.

Then, only the names and values that need to change in that set need to be sent. The Arduino would then have to simply parse the data sent to know what variable to change the value of.

Wow. I honestly didn't remember posting this until I checked my replies... Too much 'sauce' that night...

I can see where saying mixed types sounds incorrect but you were correct in your assumption. I can post code but its like 45k already since its written badly, as I had no clue about anything until I was almost done. Still barely starting to learn really.

The ranges for variables range quite a bit. I will read up and thanks for the idea. :)