2

I have a robot based on Raspberry Pi which has real-time running control algorithms, reads sensor data and has to serve data real-time. This will be very cpu-intensive for the Pi so I need a light method to simply monitor my data (curves, matrices, vectors and 2d-maps)

I know there are many possibilites for this, which are listed here I already tried

  • TKinter: Seems to be a nice module for the pure interactive GUI applications. Though it cannot run in another parallel thread thus I must move my main application in another thread (which is also multithreaded) This got very hard and unstable for me. It wasn't also my approach.

  • PyGame: Works slow for me and also unstable events. In both cases (TKinter and Pygame) the Pi has to serve a X-Display which is also cpu-intensive.

  • Webserver: Controlling the Pi with a web server using i.e. javascript. Is it a good and efficient method? I haven't yet try it and several another methods listed in link.

Considering this is a little bit subjective question, at this point I would like to ask the community what you would use for this approach.

1

It depends on how much control you want over displaying/visualizing the data after it has been served.

I've used Plotly in the past that I can highly recommend for how incredibly easy it was for me to write code on a raspberry pi and have it streaming data to a website that other people can access - and where they can then manipulate the data. For instance, check out their feed which is basically Facebook for data scientists. Click on any plot of interest and you immediately have access to the data in a spreadsheet as well as code to share that plot via anything from MATLAB to R to Julia. Note how serving curves, matrices, vectors and 2d-maps should be no problem if you're writing in python and sending it to plotly from the pi.

Check out the following quick tutorial which is what got me streaming shareable data from the pi very fast with my own free domain: https://plot.ly/raspberry-pi/tmp36-temperature-tutorial/

Downsides to Plotly? It is a online data visualization tool. It is not a web application framework. Accordingly, if you want to add your own widgets to a website that users can use to manipulate the streaming data you are out of luck. But it doesn't sound like this is what you are really looking for is a GUI, if you just want to monitor complicated data in real-time via the web, plotly is your friend.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.