I would like to record sensor data elements to an array over time and plot the data on a web page served up by my mycropython board.
Previously I have done this in C++ / arduino with an ESP8266. I created an SVG from the data and served it up on the chip.
I would like to do something similar in mycropython - I'm new to python and have no real clue where to start except replicating my clunky, brittle C code in python - but I'm guessing that is not really the best option.
Anyone know any plotting graphing libraries that make SVGs, any "dashboard" kind of libraries, etc for web based GUI interfaces to IOT devices?
Thanks in advance for any help! Id hate to have to build another string builder for SVG's.
Plotting data on a webpage
Re: Plotting data on a webpage
A better approach would probably be to let your browser do the plotting with an application like 'flot'. Flot used to require JQuery but it can be run stand alone. The micropython server would only have to return the data array (json).
Curt
Curt
-
- Posts: 3
- Joined: Sat Jul 02, 2022 5:38 pm
Re: Plotting data on a webpage
You obviously haven't seen my 1990-style web dev skills lol. (I'm pretty deeply burrowed into embedded stuff, but I'm willing to learn of course)
I can see some advantages to tha using flot - but can I serve that up only from the chip? It seems like it?
The system (and client) will not have internet connectivity or access to any other web server besides the chip itself.
I can see some advantages to tha using flot - but can I serve that up only from the chip? It seems like it?
The system (and client) will not have internet connectivity or access to any other web server besides the chip itself.
-
- Posts: 3
- Joined: Sat Jul 02, 2022 5:38 pm
Re: Plotting data on a webpage
Also, Kurt, I see you are in big lake!
My family has a homestead out at the end of south BigLake road. Out towards Papoose twins. Small world. Im down in the Dominican republic on my coffee plantation. Im trying to upgrade my homebrew IOT agriculture/microgrid monitoring network to use upython to make my stuff more maintainable by future generations.
Thanks for the pointer, maybe flot will work? As long as its all self contained and not dependent on internet access or external servers it should I think.
It cant be any worse than hand building SVG files in C lol. Gotta love the printf%. I will probably have to learn what <div> means though lol. My web development is still grey background with blue text and buttons lmfao.
Thanks for any pointers.
My family has a homestead out at the end of south BigLake road. Out towards Papoose twins. Small world. Im down in the Dominican republic on my coffee plantation. Im trying to upgrade my homebrew IOT agriculture/microgrid monitoring network to use upython to make my stuff more maintainable by future generations.
Thanks for the pointer, maybe flot will work? As long as its all self contained and not dependent on internet access or external servers it should I think.
It cant be any worse than hand building SVG files in C lol. Gotta love the printf%. I will probably have to learn what <div> means though lol. My web development is still grey background with blue text and buttons lmfao.
Thanks for any pointers.