Yep, that is the code you

Yep, that is the code you would need to update. so for this piece of code:
Serial.print("acc:");
Serial.print(accel_x_axis, DEC);
Serial.print(",");
Serial.print(accel_y_axis, DEC);
Serial.print(",");
Serial.print(accel_z_axis, DEC);
Serial.print("\t");

Something like "acc:190,200,233" would be sent across the serial connections. To make the serial data easier to parse you might change that code to:
Serial.print("accel_x_axis=");
Serial.print(accel_x_axis, DEC);

Serial.print(",accel_y_axis=");
Serial.print(accel_y_axis, DEC);

Serial.print(",accel_z_axis=");
Serial.print(accel_z_axis, DEC);

Then you could parse each key/value pair. Is that kind of what you were asking for?

I think that Serial.print and serialWrite do that same thing or pretty similar.

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Captcha
This question is used to make sure you are a human visitor and to prevent spam submissions.
Copy the characters (respecting upper/lower case) from the image.