-
Hi, I have this Arduino Nano sketch that is intended to run a "Bad Motivator" sequence for my Star Wars R5-D4 droid. There are four buttons that I am using to test and tune the sequence on my workbench. However, the sequence will be triggered from a remote when installed in my droid. Everything works as I expect. However, I have an issue with the servos always having power. In this application, I always want to move the servo and then remove power from the servo so I don't waste battery power and also so the servo does not heat up and burn out. Since the droid can be powered for 8-10 hours at a time, and the Bad Motivator sequence will only be used 10-12 times an hour, I am worried I will burn out the servo. I have tried using the .detach() command. However, after that command no further commands are received by the servo. I have tried reattaching the servo before each use. However, that also causes issues in unintended movements. I feel like I am close, but missing something obvious. Can anyone help? Tim `void loop() { if(buttonReset.isPressed()){ if(digitalRead(PIN_TRIGGER) == 0){ } if(isTriggered && !wasTriggered){
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Servos should not use much current after they reached the requested position, since they must be working in model aircrafts with small batteries. |
Beta Was this translation helpful? Give feedback.
-
Ok, I got it. |
Beta Was this translation helpful? Give feedback.
Ok, I got it.
After detach, the servo is not "powered" any more.
I added sample code at the end of the OneServo example.