Servo stops working and works again after 15 minutes of trying.
Posted: Thu Apr 11, 2024 10:15 am
Greetings. I'm facing a very strange problem and neither Google nor chatbots can help me.
I apologize in advance, I'm new, I'm probably missing something obvious.
I have a PCA9685 and a servo motor connected to the ESP32(ESP32-D0WDQ6). There is a simple code that turns the servo back and forth and everything works well.
If I connect a voltage sensor to the same I2C pins, then everything still works. The scan shows that the ESP32 sees both the PCA9685 at 0x40 and the sensor at 0x70.
When I try to initialize the sensor in code, suddenly the servo stops moving. I'm probably doing it wrong, but that's not the question.
What's strange to me is that if I return the working code, the servo still doesn't work. It usually takes me about 15 minutes to rewrite the code multiple times, reset, run another code, turn off the sensor and servo, and then suddenly it starts working again. All contacts are reliable, there is voltage everywhere.
What could be the problem? Or in what direction should I at least look for the answer? Thank you.
I apologize in advance, I'm new, I'm probably missing something obvious.
I have a PCA9685 and a servo motor connected to the ESP32(ESP32-D0WDQ6). There is a simple code that turns the servo back and forth and everything works well.
If I connect a voltage sensor to the same I2C pins, then everything still works. The scan shows that the ESP32 sees both the PCA9685 at 0x40 and the sensor at 0x70.
When I try to initialize the sensor in code, suddenly the servo stops moving. I'm probably doing it wrong, but that's not the question.
What's strange to me is that if I return the working code, the servo still doesn't work. It usually takes me about 15 minutes to rewrite the code multiple times, reset, run another code, turn off the sensor and servo, and then suddenly it starts working again. All contacts are reliable, there is voltage everywhere.
What could be the problem? Or in what direction should I at least look for the answer? Thank you.