QtSerialMonitor icon indicating copy to clipboard operation
QtSerialMonitor copied to clipboard

Graphs display issue when data "hi-speed" send

Open 1198632013 opened this issue 1 year ago • 0 comments

image

/*
  for test 
  by Enzo
*/

void setup() {
  //Initialize serial and wait for port to open:
  Serial.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
}

float thisByte = 0.0f;

void loop() {

  Serial.print(sin(thisByte)*100.0f);
  Serial.print(",");
  Serial.print(cos(thisByte)*100.0f);
  Serial.print(",");
  Serial.print(sin(thisByte)*50.0f);
  Serial.print(",");
  Serial.print(cos(thisByte)*50.0f);
  Serial.print(",");
  Serial.print(sin(thisByte));
  Serial.print("\n");
  
  delay(10);
  thisByte += 0.1f;
  if (thisByte == 360.0f) {    // you could also use if (thisByte == '~') {
    thisByte = 0.0f;
  }
}

1198632013 avatar Nov 05 '23 09:11 1198632013