How to transmit data from Arduino to Raspberry Pi?
Which protocol to use to transmit data from Arduinos to the Raspberry Pi? Do I have to write code for both Arduino and Raspberry Pi or are there existing solutions which I can use for this purpose? 
  Does MQTT, Node-RED or Node.js have any role in the above? 
  


I have searched, explored, read and found that MQTT can be used to send and receive data from Arduinos to RaspberryPi as in [1] and [2]. So, no need to design and develop a new protocol.

MQTT libraries, such as PubSubClient [3] are available for Arduino. So Arduino code can use these libraries and no need to write much code either. 

Simple and straight!

A.

[1] https://funprojects.blog/2018/03/04/arduino-talking-mqtt-to-node-red/

[2] https://iotdesignpro.com/projects/interface-arduino-with-node-red-to-send-sensor-data-on-webpage

[3] https://www.arduinolibraries.info/libraries/pub-sub-client