Skip to content

Commit 81feaa9

Browse files
authored
Update MainControl.ino
1 parent a289b65 commit 81feaa9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Arduino/MycobotBasic/examples/MainControl/MainControl.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,11 @@ void record() // is stop
368368
for (int i = 0 ; i < 6; i ++)
369369
{
370370
jae[data_index].joint_angle[i] = myCobot.GetEncoder(i);
371-
Serial.println(jae[data_index].joint_angle[i]);
371+
//Serial.println(jae[data_index].joint_angle[i]);
372+
delay(REC_TIME_DELAY - SEND_DATA_GAP);
372373
}
373374

374-
delay(REC_TIME_DELAY - SEND_DATA_GAP);
375+
375376

376377
rec_data_len++;
377378
if (M5.BtnA.wasPressed()||M5.BtnB.wasPressed()||M5.BtnC.wasPressed()) break;
@@ -411,7 +412,7 @@ void play() // is stop is pause
411412
for(int i = 0; i<6; i++){
412413
encoders[i] = jae[index].joint_angle[i];
413414
}
414-
myCobot.SetEncoders(encoders, 50);
415+
myCobot.SetEncoders(encoders, 100);
415416

416417
// check pause button
417418
if (M5.BtnB.wasPressed())
@@ -443,7 +444,7 @@ void play() // is stop is pause
443444

444445
// check stop button
445446
if(is_stop == 1) break;
446-
delay(WRITE_TIME_GAP);
447+
delay(WRITE_TIME_GAP*6);
447448
}
448449

449450
// stop button will also end loop

0 commit comments

Comments
 (0)