-
Notifications
You must be signed in to change notification settings - Fork 661
W10 app: serial capture for complex data is confusing #695
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
Comments
CSV support in microsoft/pxt#3876 |
Thanks Peli, that was super quick! ⏩ ⏩ |
serial->writeNumbers will generate a CSV line entry. #699 |
Maybe the serial data for Show Data Simulator and Show Data Device could be compatible with Arduino IDE Serial Plotter, which has recently been updated to handle labels for both CSV and name-value pairs, see the bottom of the page on arduino/Arduino#4180 . |
@mobluse do they have docs? what is the format? |
I don't know so much about it. It's probably just in a nightly build which I haven't tested. Originally it looked like CSV and then I suggested that they should get the labels from a row with headings (and update the labels if a new row with headings was sent). You can see what I wrote and a link to the standard for CSV. Someone had suggested they should have name-value pairs and take the labels from the name, and they probably do that too now. I didn't know you already supported CSV as in the documentation: https://makecode.microbit.org/device/data-analysis/viewing (and a few more sections). |
The original issue is fixed. Please file a new feature request with details if this is still relevant. |
This thread has been automatically locked since there has not been |
Consider a user that would like to be able to log the accelerometer data in x,y,z with time, and then read that out over serial
The following program attempts to do that:
https://makecode.microbit.org/_auL9Jk0fz9Es
(the checkAndErase function is there to let you hold down the A button while rebooting to erase the output file).
To use this, press button A to start logging, then button B to stop logging. Then press A+B to send the file over serial.
This is fine if you just care about one thing, but if you want to export something more CSV-like then the current data capture options don't work very well.
The 'time,x,y,z' comes into the 'data' buffer and the rest of the data ends up in the graph, but the export doesn't include anything except the first column
You can workaround this by adding, say, some arbitrary text to the start of the line like a comma.

But this is a bit of a kludge
(The simulator actually behaves differently, I'm about to file an issue for the difference, but the simulator puts text direct in the data buffer not on the graph).
If we remove the timestamps that I have added but keep the comma (IE so there is chance of duplicate data) then there's a further problem of grouping and being unable to graph that easily by copy/pasting the data out:

Some suggestions that would resolve this for me
1: We should special-case comma separated values and plot them all, and allow them to be all exported via the CSV feature
2. We should also put complex data into the buffer.
3. We should allow a simple 'raw' data export from that box. A simple .txt file without the 'repeated data joining' would be great.
I still think presenting 'file' objects to download (even drag into the filesystem) from the 'read to serial' block would be ideal too.
The text was updated successfully, but these errors were encountered: