microbit-foundation / python-editor-v3

Micro:bit Educational Foundation Python Editor V3
https://python.microbit.org
MIT License
60 stars 37 forks source link

Plotter feature for data logging/analysis #1018

Open whaleygeek opened 2 years ago

whaleygeek commented 2 years ago

Depends on

Other tickets:

Third parties:

Description

The Mu editor has a plotter feature that displays any printed tuple data as lines, live as it happens. The new python v3 editor is excellent, but for plotter support we still have to install Mu. I suspect the V3 editor will continue to be well developed. Could we have a simple plotter feature in it, like Mu. Then all of our educational use cases can be delivered in a single excellent editor.

Todo

Conclusion

premmirth commented 2 years ago

Having a built-in plotter would be a brilliant feature for teaching data analysis by plotting the sensor values for high school and secondary school physics. . Also since many schools are teaching subjects like data science and AI, they can simply combine core cs curriculum with micro:bit for a holistic and cross disciplinary learning experience for beginners that is absolutely relevant to the real world skills,

edbye commented 2 years ago

Yes, this would be a fantastic addition.

jaustin commented 2 years ago

Thanks for the feedback here. This is a great suggestion. It’s not something we can implement immediately but we've added it to our 'roadmap inbox' to be scoped as part of the next chunk of work we do on the editor. Thanks for raising it and thanks, in advance, for your patience in us getting to it.

In the mean time, we've tested using a web-serial-based logging/graphing tool alongside the editor in another tab and that workaround works quite nicely. For example: https://sekigon-gonnoc.github.io/web-serial-plotter/ at 115200 will plot data as you stream it out.

image

The source code is here https://github.com/sekigon-gonnoc/web-serial-plotter - it's very close to already supporting the same syntax as Mu, but doesn't quite yet.

Note that due to #1024 it works much better when you switch tab between the editor and serial monitor and don't try to use the webUSB REPL as well as the serial output.