
WayneA
USA
Asked
— Edited
Good Morning,
I think I have noticed or at least I seem to think I have, but when I ask a servo to move to a predefined location, it does it at least 50 percent of the time. I have to disconnect and remove power on my V4 board to get my project to do what I want it to do.
Thoughts?
1) Are you using a servo Movement Panel or camera panel in conjunction with a script?
2) In a script have you been using ServoSpeed command at all?
If you share your project on here (using the Attach File option to the right of the edit box), someone can take a look and see what's up. The only reason I can imagine this situation is if the battery is low and you will hear a warning message. Otherwise, perhaps there is a disconnection occurring in relation to your other post
:start
1. sayezb("PLEASE STEP BACK AS I CHECK OUT MY HEAD MOVEMENT.")
2. SLEEP(4000)
3. SAYEZB("LOOKING DOWN")
4. SERVOSPEED(D6,2)
5. SERVOSPEED(D7,2)
6. SERVO(D6,182)
7. sleep(2000)
8. SAYEZB("LOOKING FORWARD")
9. servo(D6,80)
10. sleep(5000)
11. SAYEZB("LOOKING LEFT")
12. SERVO(D7,38)
13. SLEEP(5000)
14. SAYEZB("LOOKING RIGHT")
SERVO(D7,163)
sleep(10000)
goto start
When I run this the first time the script does what I want it to do. I want the head to look forward a certain way and look left and then look right a certain way. I have to stop the loop and power down the ARC software and my robot. Bring it all back up and re run this script and it works. I guess I am asking things to do what it cannot do.
Not sure.
So, which comes first the chicken or the egg?
Also, I'm not sure you can have two ServoSpeed() commands in a row and have the speed change. You may be able to do this id you place a sleep command between them but I've never tried it. Give that a shot.
I tried that Dave! I put the servo speed command right after the servo command. My servo operated wide open. There was no "control" of the speed. I guess I could do a $D7speed variable and make that "global" thru out my script.
I will place a sleep command right after the first servo speed command and give that a shot. Thanks for the tip Dave!
Code:
@Robot-Doc: I really did not think of that. I will give that a try and thank you!
Is there a position 182?