Hello everyone,
I am doing a small project where I am using an Arduino Mega via Software Serial to pull data (4800 baud) from my home alarm system. Ultimately I will push the data through my raspberry pi using python and flask-socketio to a web client for viewing system messages.
(Note: I know there are ready-made modules and devices others have built that do all this, but this is a learning by doing project for me. Also, I have already done a few prototypes of LED blinks where I have full end-to-end communication between my web client, python on the R Pi, and the Arduino, so I'm pretty good on the concepts there.)
The alarm system puts out chunks of usable data in roughly 20-40 byte hex packages. I'm successfully reading the data and seeing it on my serial terminal in the Arduino IDE.
The data package does require some processing in order to extract useful information that I can then push to the web client. For example, there are few bytes that need to be analyzed with bit masks to indicate various system status conditions. Also, there are 32 bytes that map to ASCII that create the alphanumeric message on the alarm system's keypads. This 32-character is something else I also want to get over to the Raspberry Pi and display on the web page via flask.)
So here is my question: Given some of the issues in handling strings on the Arduino, do you all think it is best for me to just "byte-by-byte" send over the entire block of 40 bytes to the Raspberry Pi and do all the processing of the message in Python on the R Pi, or should I do the processing on the Arduino and send over more "ready to use" data to python?
Look forward to your thoughts!