Arduino Nano Flash Memory Enough For Firmata?

My project includes a part where I need to send a sensor data from Arduino to Raspberry Pi 3. I search online and found a few video suggesting to use Firmata for this purpose. For alternative way, I also found this thread.

Demo of PC-Arduino comms using Python

Which method is more suitable?

As for Firmata, StandardFirmata.ino code is 28KB. My concern here is that I am planning to use Arduino Nano Atmega328p which has 32KB flash memory and 2KB SRAM. Will it be enough? I am adding a few line of codes for sensor too.

What do you need to do with it on the Pi? Any decent terminal program will allow you to e.g. save received data to a file.

For simply sending some data to a PC, I would just use Serial.write() or Serial.print (depending on needs).

No experience with Firmata but it sounds like total overkill to me.

Thanks for your attention.

I will try to explain my project. On Raspberry Pi, there is a computer vision code running. Mainly a face detection and recognition algorithm. On arduino side, there is a temperature sensor which gives human body temperature in real time. I need Arduino nano to send real time data to Raspberry Pi so that the main code in Rpi can access that data as a variable.

So can whatever that main code in “so that the main code in Rpi can access that data as a variable.” access the serial port and read data from it?