PCA9695Expander Example hangs on ESP32 #63
sjgcornish
started this conversation in
General
Replies: 1 comment
-
Thanks for reporting 🥇. It seems to be a ESP32 RTOS bug 😢. I adapted the examples. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The example hangs in this for loop after the first iteration of Servo1.startEaseToD(135, 1000); unless I add a small delay i.e. delay(1) or any other code such as print statement in two places as shown in the code below. Note I am using an ESP32 compiled using DOIT ESP32 DEVKIT V1
for (int i = 0; i < 2; ++i) {
Servo1.startEaseToD(135, 1000);
// Servo1.startEaseToD((544 + (((2400 - 544) / 4) * 3)), 1000); // Alternatively you can specify the target as microsecond value
// isMoving() calls yield for the ESP8266 boards
while (Servo1.isMoving()) {
/*
* Put your own code here
*/
delay(1);
; // no delays here to avoid break between forth and back movement
}
Servo1.startEaseToD(45, 1000);
// Servo1.startEaseToD((544 + ((2400 - 544) / 4)), 1000); // Alternatively you can specify the target as microsecond value
while (Servo1.isMoving()) {
; // no delays here to avoid break between forth and back movement
}
delay(1);
}
Beta Was this translation helpful? Give feedback.
All reactions