Bookmaker
USA
Asked
— Edited
Some of my servos work with the servospeed command and some don't. When I run this script
servospeed(d15,5)
servo(d15,1)
sleep(2000)
servospeed(d17,5)
servo(d17,100)
sleep(2000)
servospeed(d16,5)
servo(d16,1)
Only servo d17 runs slow. Both of the other two run at full speed. The servos are the same brand. I thought it was part of the bug but it is still doing it.
lol because you're moving the servo into position 1 and it's already there when it starts, silly
No, that one is inverted. Sorry, I didn't mention that. I also tried moving servos and digital inputs. Everything is random. Just some work and some don't.
you can't invert a servo in script. everything works
No silly, The servo is inverted ! So going to 100 is the same as going to 1 for that servo.
No, you can't invert servos in script. You can only invert servos in controls. Each control has it's own settings for servos. For example, if you add a Vertical servo Control and select INVERT, that doesn't apply to a Camera Control that uses the same servo.
Each control is responsible for moving a servo. It's like time sharing. So when you're using Scripting, the position is always the same. Position 1 is always position 1.
I didn't invert it in script. The servo is inverted in the servo control. Look, I will change the servo controls so they are all the same and change the script so they are all the same but the result will be the same because I have been there and done that. Trust me. Okay, I did that.
Same result. Only one ran slow. Other two ran at max speed.
No, you can't invert servos in script. You can only invert servos in controls. Each control has it's own settings for servos. For example, if you add a Vertical servo Control and select INVERT, that doesn't apply to a Camera Control that uses the same servo.
Each control is responsible for moving a servo. It's like time sharing. So when you're using Scripting, the position is always the same. Position 1 is always position 1.
I don't know where to go with this. Your last responce is identical to the last one where I changed what i did to match your responce to no avail. I can't win!! My servos are not slowing down. I even set up a speedservo control to watch what the speed was and it read what I scripted but it ran at full speed. Total frustration.
Sorry dude, but i can't continue repeating myself. Please re read my reply.
You cannot invert a servo in script. I can't say it any differently.
Your code keeps putting the position to 1, and that's the starting position. So if you change your code to move the servos to position 100, you will see the speed.
This will demonstrate. Keep in mind that you may not wish to push a servo past its limits. Some servos will burn out their motor if you push it too far. Some servos start at position 10, and end at position 90.
Hello again, Just got home from work. I copied your script and tried it and I got the same results. So I copied it and put it into a new control and deleted the onld one and now everything is fine. Thank you for all your help and patients.
:) I knew you'd get it. Never let me down yet!
I've been bookmarking and saving any pages that people have posted here hoping it will help me. Yesterday I was thinking that DJ wanted you to go through the motions your self to get it working because you would learn a lot more by your own discovery then if he would have just told you. JW
@ DJ: Methinks you snuck one in on us! I don't find :LOOPSTART in the ARC manual; but I entirely get it! Kinda sneaky.....................you're going to teach some of to write code whether we know it or not. I'm back to lurking.................... Really enjoying "High Five". So much more we can do now. I'm at the point where I'm ready to start mounting componets on Gizmo. Next is the batteries and motor driver. BTW On the L289N driver is the ENA and ENB the pins to put the PWM on??????? Will be posting progress photos as I go. I got my Camcorder out yesterday. Believe it or not I'm going to attemp to do a video. Lloyd
Yea Videos !
@Robotz012248 hey lloyd, great to hear! The scripting manual does mention the LABEL feature..
As for your PWM on the motor controller, connect a Digital I/O Port from the EZ-B to both Enable connections on the LN298. There will be 2 jumpers, 4 pins for the Enable on the LN298. Two of those pins are Enable, and the other 2 are +5. You can verify by using a volt meter of which is which.