Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save RRMoelker/e09c3b772a800bc230ededcd5a654807 to your computer and use it in GitHub Desktop.
Save RRMoelker/e09c3b772a800bc230ededcd5a654807 to your computer and use it in GitHub Desktop.
Multi value labelled Arduino Serial Plotter example, open serial plotter in Arduino IDE to see the labelled lines plotted over time.
int t = 0;
void setup() {
Serial.begin(38400);
}
void loop() {
double a = sin(t / 100.0);
double b = cos(t / 110.0);
double c = sin(t / 50.0) + 1.0;
Serial.print("a:"); Serial.print(a); Serial.print(", ");
Serial.print("b:"); Serial.print(b); Serial.print(", ");
Serial.print("c:"); Serial.print(c); Serial.print(", ");
Serial.println();
t++;
delay(40);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment