The Data Science Maker: Live plotting data with Matplotlib and Raspberry Pi

“Maybe it’s a concept album?”
About an hour later when George got the actual “paw” response he was looking for.

How To

(1/2) Code for plotting temperature in real time. Code found at Github gist link
(2/2) Code for plotting temperature in real time. Code found at GitHub gist link
Screengrab showing the terminal after executing the program and the plot that automatically pops up. Once you run the program you don’t have to do anything but wait a second or two and the plot will appear. Note: results are plotted here in degrees Fahrenheit, but this can be changed by a simple conversion in the Python file.
tmp_write code can be found at Github gist link
Terminal window showing temperature measurements measured and being written in real time (units: samples, temp in Celsius). tmp102_write code can be found at GitHub gist link
(1/2) tmp102_read code can be found at GitHub gist link
(2/2) tmp102_read code can be found at GitHub gist link
Two programs are being run simultaneously in different terminal windows. The left is the tmp102_write program showing temperature measurements measured and being written in real time (units: samples, temp in Celsius). The tmp102_read program was executed in the right terminal window and the results are show in
Rapidly plotting temperature without writing to csv (right). Writing temperature data to csv (leftmost terminal window) and plotting data using this time step (left Figure 1).

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store