Project structure guidance

Packet format, why? Nice word, "packet" but what you intuitively want is just a command-driven sketch that can take serial from the rPi.

The most common example is GPS parsing of NMEA sentences.

Years ago, I wrote a silly example that takes the concept into a working example:
https://forum.arduino.cc/t/dont-cross-the-streams-fp-scientific-calculator-serial-co-processor/144054

There is no sense making this any harder than it needs to be. A nice feature would be to write a handshake routine so that the Arduino could ask for a resend if line parsing failed.

Ray

2 Likes