Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming of sensor output to another notebook script or a file #30

Open
goatchurchprime opened this issue Apr 24, 2018 · 0 comments
Open

Comments

@goatchurchprime
Copy link
Owner

The Arduino/Processing combination provided the capability to print the readings of a sensor from a loop to the serial.out and direct it to a processing script that parsed the numbers and created a realtime graph.
https://itp.nyu.edu/physcomp/labs/labs-serial-communication/serial-output-from-an-arduino/

Note that in the implementation it takes two separate programs to make this happen.

This could have been done using multiple kernels in the same notebook, but this kind of thing didn't work out so well in practice: jupyterhub/jupyterhub#202

You could still do this using a different notebook page that could either read from a file, serial socket or websocket that's being filled by a micropython script/cell contents from the first notebook page.

(Graphing numbers that were printed to the serial buffer was seen as so fundamental it got put into the IDE https://www.youtube.com/watch?v=Q7rJkEjdoYE )

The following workflow could then be supported:

  1. raw sensor data streamed to python in a notebook where it can be plotted using matplotlib and analysed using scipy
  2. various ARIMA-type filters applied to the sensor data to identify the underlying levels of noise and necessary sample rates
  3. the filter with the best constants could be implemented in micropython and loaded into the board so we get clean properly understood sensor data
  4. quality and application of sensor data massively improves because we're no longer hacking filters into the sensors blindly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant