Logging/graphing from teensy to pc.

Status
Not open for further replies.

Gibbedy

Well-known member
I'm looking into logging/graphing data in real time from a teensy to a Linux or Windows pc.

My gui programming is minimal.

I like the sound of makerplot.

Anybody have any other suggestions?
Thanks.
Gavin.
 
I'm looking to do better in this area, too. I've got a Teensy using Serial.print() to a wifi router running OpenWrt Linux in station or client mode. The router runs a little Lua script to read from the USB/Serial device and adds a timestamp. My laptop connects wirelessly to the wireless router over ssh. I capture the output of the Lua script to a file.

Next steps include getting my Linux server to capture the logs automatically, adding fault tolerance and adding an error notification mechanism.

I haven't yet tried any of the direct Teensy wifi boards yet. Would be great if such a board supported WPA2 so it could connect directly to my main wifi router.
 
I've considered it.
After thinking about it, I think I want full control.

Is there a computer language/ide that is comparable to arduino, in that it has huge user support/libraries and let's me get up and going quick.

Where should I invest my time?
Thanks.
 
I've considered it.
After thinking about it, I think I want full control.

Is there a computer language/ide that is comparable to arduino, in that it has huge user support/libraries and let's me get up and going quick.

Where should I invest my time?
Thanks.

did you look into processing https://processing.org/ ?
some of the IMU work on this forum did use this.
 
I've considered it.
After thinking about it, I think I want full control.

But have you even tried it yet?

Indeed it's simple and lacks lots of controls, like the rest of the Arduino IDE. But if you just want to see a graph, it's incredibly easy and convenient to just add Serial.println(number) inside loop() and then open the plotter.

If it haven't yet tried this, please do. It's so quick and easy and works pretty well for many projects.
 
I hadn't Paul.
I now have and glad i did. I'm sure I'll find a use.

It's all about processing now for me :)
 
Another simple solution may be to use Realterm to to read the USB serial data and capture it to a text file.
Then use KST to plot the data from the file. KST can sense when new data is available and automagically update the plots.
Both programs are openly available and for the Windows platform.


Here's a sample of the results:
MPL3115A2_Plot.jpg
 
I'd like to second Gibbedy's request for reliable realtime software for graphing data sent over the Teensy USB serial connection. I have a Teensy project that has been sitting on the bench for months waiting for code to capture EEG data from the Teensy. A library (perhaps in c) that could be called from python would be a great solution, but I'm not sure what to look for or where to look. My only programming solution is max/msp, and it will not handle the baud rate that I need.

Paul, the Arduino serial plotter *does not* work reliably. When I saw your post, I tried it in Arduino 1.6.8. Closing the serial plotter screen occasionally and unpredictably causes disconnection of the USB port from the Teensy. The port completely vanishes and the port assignment must be reset to another one. After that, the plotter window is not visible (and cannot be found) and this error occurs when trying to use the serial monitor: "Serial monitor not available while plotter is open". So, neither the serial monitor nor the serial plotter are usable after this crash.

I finally recovered by running another Arduino sketch that uses the serial port. Next, I installed Arduino 1.6.9 and the recommended Teensy beta to see if this bug was fixed, but the problem was still present after the upgrade. In fact, the upgrade initialized with the problem still active -- the plotter window was inactive and the error message still present.

Best regards,
Michael
 
Perhaps try TYQT (forum search) for the Serial Monitor - clicking monitor icon (or Ctrl+M) will release the serial port for the plotting window. Closing the plotter window may allow TYQT (with Ctrl+M) to return to monitoring the serial output and recover the serial port.

Koromix has considered adding plotting to TYQT - but I'm not sure it has a timeframe to be done.
 
I have a similar request, but I'd like to save the log data in a sqlite database (linux) then generate a plot data by request (offline).

Does anyone know about any reliable solution? A python/php script will be best.
 
Status
Not open for further replies.
Back
Top