1 year ago

#327388

test-img

Hermit

Pitfalls and good practices for streaming data from a Raspberry Pi to my laptop

My first first post (ever), so if i've violated some rule(s) regarding SO usage, let me know...

I have an IMU connected to a Raspberry Pi and wish to stream the acc/gyro data to my laptop for graphing, analysis, etc. The IMU code on the RPi is functional and the data is stored nicely to file on the RPi.

The first question is related to Linux and files. Assuming I have some code that streams the data, how are the contents of this file containing the data managed. In other words, if the streaming mechanism xfers 1000 lines of data, how does the next stream action avoid reading the same data? Is this something that I have to do in my code or does Linux and/or "streaming" deal with this? I may have a misunderstanding of what "streaming" means.

From SO, I've taken an example of TCP streaming and implemented it and that all works but it self generates random data. I want it to read the acc/gyro data from the file. Should the streaming code just shoot the data across as in the example code or should I use the GET/SET method? I'm not a tcp/network/html guy and have no insight as to what is appropriate. I should note that I would like to stream the data at a rapid pace but understand that this will be limited by the RPi/IMU, streaming and code to process it (i'll throttle it to fit).

The code example from SO I've implemented is from (not sure how to add links) questions/64642122/how-to-send-real-time-sensor-data-to-pc-from-raspberry-pi-zero

Thanks

raspberry-pi

streaming

real-time-data

0 Answers

Your Answer

Accepted video resources