My goal is to read data from multiple analog light sensors with an Arduino
, and send a float (some number between 0
and 1
) to a Raspberry Pi 3
via a Serial USB connection (ideally, data would be sent near-constantly).
I want to update a webpage that displays a live-streamed graph of the data, by adding the new data point. So far, I've been able to get either Smoothie Charts
or Plotly
working offline with Math.random()
in my static HTML/js
webpage. I've been playing around with Plotly
over the last week or so but can't wrap my head around how to get it to work offline with actual data.
My question is this: how do I take a single numerical value from my Python
script, and feed it into the js script that takes care of the live-charting?
I'm new to all of this - from what I've read, it seems like I should use Flask
or something like Socket.io
to take care of the constant updates, but I'm not sure how to even begin. If someone could point me in the right direction, I'd appreciate it greatly!