Skip to content

Commit

Permalink
issue262: try to speed up and get info about error time
Browse files Browse the repository at this point in the history
  • Loading branch information
gin66 committed Jun 15, 2024
1 parent 1d89efe commit 7ea8d80
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions examples/Issue262/Issue262.ino
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ void setup() {
Serial.begin(USB_BAUD);
randomSeed(42);
delay(100);
Serial.print("hello");

Serial.println("hello");
}

void loop() {
Expand All @@ -40,7 +39,8 @@ void loop() {
while (stepper -> getCurrentSpeedInMilliHz() != 0) {
count ++;
if (count > 20) {
Serial.print("No stop iter# ");
Serial.print(millis());
Serial.print("ms: No stop iter# ");
Serial.print(count);
Serial.print(".");
Serial.print(" Target: ");
Expand All @@ -56,15 +56,4 @@ void loop() {
if (count > 200)
break;
}
for (i =0; i< 100; i++) {
delay(5);
uint32_t sp = stepper-> getCurrentSpeedInMilliHz();
if (sp !=0) {
Serial.print("Speed error. Received value: ");
Serial.print(sp);
Serial.print(". Target speed was ");
Serial.print(target);
Serial.println();
}
}
}

0 comments on commit 7ea8d80

Please sign in to comment.