Skip to content

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

Closed
jaustin opened this issue Mar 6, 2018 · 10 comments
Closed

W10 app: serial capture for complex data is confusing #695

jaustin opened this issue Mar 6, 2018 · 10 comments
Labels

Comments

@jaustin
Copy link
Collaborator

jaustin commented Mar 6, 2018

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.

image

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.
image

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:
image

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.

@pelikhan pelikhan added the serial label Mar 6, 2018
@jaustin
Copy link
Collaborator Author

jaustin commented Mar 6, 2018

@pelikhan
Copy link
Member

pelikhan commented Mar 6, 2018

CSV support in microsoft/pxt#3876

@pelikhan
Copy link
Member

pelikhan commented Mar 7, 2018

#695

@jaustin
Copy link
Collaborator Author

jaustin commented Mar 7, 2018

Thanks Peli, that was super quick! ⏩ ⏩

@pelikhan
Copy link
Member

pelikhan commented Mar 8, 2018

serial->writeNumbers will generate a CSV line entry. #699

@mobluse
Copy link

mobluse commented Apr 17, 2018

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 .

@pelikhan pelikhan reopened this Apr 17, 2018
@pelikhan
Copy link
Member

@mobluse do they have docs? what is the format?

@mobluse
Copy link

mobluse commented Apr 17, 2018

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).

@abchatra abchatra closed this as completed Jul 4, 2018
@abchatra
Copy link
Collaborator

abchatra commented Jul 4, 2018

The original issue is fixed. Please file a new feature request with details if this is still relevant.

@abchatra abchatra reopened this Jul 4, 2018
@abchatra abchatra closed this as completed Jul 4, 2018
@lock
Copy link

lock bot commented Sep 26, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants