
I received my new EZB v4 and my developers kit a couple of days ago. Nice stuff!
I plan to convert my robot from it's current OS over the EZ-Robot. This will be challenging as it has 26 servos, a camera and a PIR sensor.
I have been working on a couple of EZB scripts and I have been successful in getting a robotic finger to move, using the "Auto position", Yahoo.
I am having trouble programming in what is required for voice commands in the "Speech Recognition" window. Is there a video or explanation of how to do this somewhere?
Thanks
Say("this is a multi function test")
Sleep(4000)
ControlCommand("AutoPosition",AutoPositionAction,"move")
Sleep(5000)
ConrolCommand("AutoPosition",AutoPositionAction,"camera move")
The syntax is correct, however, it will not do it.
Any thoughts, thanks
What do you have in your "camera move" action in order to make the camera move? The camera just won't "move" by itself... an action script has to be written to tell the servos (pan and tilt) to move the camera where you want it to go....
Perhaps I am misunderstanding what you're trying to do here....
Code:
Code:
Each action will be individual script that you add to script manager and could be called later from a main script
in your main script ex: Start, you will use the control detail tab when you are in script edit mode and select the line under script manager you wish to use.
it will then become:
ControlCommand("Script Manager", ScriptStart, "camera move")
sleep(4000)
ControlCommand("Script Manager", ScriptStart, "AutoPositionservo move")
I still can't get a couple of Actions to work under one script and now when I show the camera a red object, the whole ez buider program freezes up and nothing works.
I had it tracking a red object and running a script when it saw the red object, now nothing. Hmmmmmmm
I am still unable to get a script to work that involves 2 Actions I have tried as suggested above but nothing I have tried is working. It shouldn't be this difficult!
Could someone please post a script that shows a script that runs a couple of Actions.
Thanks
I just programmed a 65 step little dance thing with my wall-e. It was one frame after another buy ended up being one action. At the end of that, I have it do another action.
It was done by using the sleep command for 56 seconds after the music was started and the dance action was started. At the end of 56 seconds, the second action runs.
I am on my phone right now and can't get to my computer atm. I will post my script for you tomorrow morning.
Here is what I did
Code:
Yes, I am trying to run one action and when it completes have another action run.
I have tried a code similar to your example (see earlier post) in that one that script spoke the text but did nothing else. I'll try it again.
Here is another example that shows multiple actions w/autoposition.
It is used in the latest vid of my mini 6 song and dance.
Sometimes you have to add or adjust timers to get the desired effect.
ControlCommand("Speech Recognition", PauseOn)
sleep(1000)
ControlCommand("Soundboard2", Track_8)
sleep(700)
ControlCommand("Soundboard2", Track_11)
sleep(500)
ControlCommand("Auto Position", AutoPositionAction, "Circle Dance")
sleep(3500)
ControlCommand("Auto Position", AutoPositionAction, "Stop")
ControlCommand("Auto Position", AutoPositionAction, "Wave")
sleep(3000)
ControlCommand("Auto Position", AutoPositionAction, "Stop")
ControlCommand("Auto Position", AutoPositionAction, "Circle Dance")
sleep(3000)
ControlCommand("Auto Position", AutoPositionAction, "Strafe Right")
sleep(4500)
#ControlCommand("Auto Position", AutoPositionAction, "Stop")
ControlCommand("Auto Position", AutoPositionAction, "Circle Dance")
sleep(2000)
ControlCommand("Auto Position", AutoPositionAction, "Strafe Left")
sleep(5100)
ControlCommand("Auto Position", AutoPositionAction, "Circle Dance")
sleep(2000)
ControlCommand("Auto Position", AutoPositionAction, "Attack")
ControlCommand("Auto Position", AutoPositionAction, "Circle Dance")
sleep(7500)
ControlCommand("Auto Position", AutoPositionAction, "Stop")
ControlCommand("Soundboard2", Track_8)
sleep(3000)
ControlCommand("Speech Recognition", PauseOff)
The introduction will explain how to use the ControlCommand() and how to access the short cuts for the controlcommand()
It'll sure save you a lot of grief
However, for each servo I had to open an "Auto Position" control. When i tried to put mutliple servos in one Auto Position window it kept switching all the servos to the same port. I see, from the example above, that I should be able to program several servos in one Auto Position window. What's the trick?
Thanks again everyone
Make sure servo edit check box is checked. Add a servo and set it to the correct digital port for one of your servos. Move this servo control to a location that would represent the location of that servo. Add another servo using the add servo button. Assign it to a correct digital port for the next servo. Move this servo control to a location that would represent the location of that servo. Keep doing this until all of your servos are added.
Turn on the option to have the servos move in real time as you make adjustments. It's a check box at the top right side of the list.
Adjust all of the servos to be what you want your first frame to be and save the frame.
Click the add frame button and give it a name. You will have to find the frame that you just created in the list of frames. Select it and make the adjustments necessary to the servos for the second frame. Save the frame and keep doing this until you have all of your frames you need.
After you have all of your frames, you will want to make these into an action. Add all of the frames in order to make the action adjusting the timing as they are added.
Now you can call this action from a script.
If you have a lot of servos moving at one time in a frame, you may be drawing too much current from your power source. You can reduce this issue by adjusting your frames a bit so that less servos run at one time, or get a stronger power source in terms of amps. It is possible that moving many servos at one time can draw many amps for a quick second.
Please let us know if this works for you. You might also upload your project to the public portion of the cloud so that others can look at it and see if we see anything.
Thanks
One other thing I might add about Amp draw and servos. From what I've experienced a servo will also draw a lot of amps not only when it first moves but when it's holding position and/or holding a load. Not sure if this the case with analog servos but it's surly the case with digital servos.
Now I am trying to get a Sound Servo(EZB) to function properly. I need it to move the mouth of my robot. I have got some movement by adjusting the "Update Speed and the "Scaler" values in "Settings" but the mouth movement to the text is not very good.
Are there other adjustments somewhere? Do I need to change the default "Variable Name" - $Soundv4Value , to something else?
Thanks again.
9/7/2014 9:36 PM - Sound servo Error: Object is currently in use elsewhere.
I don't understand where else it could be in use, I don't have the port the Sound servo is connected to assigned to anything else.
Also, I need to extend the EZ-Robot camera wires by 12" or so, does anyone know where can I get a cable to do that?
I cut the cable and extended it. It took less time to do this than to order the part. i did use solder and heat shrink It also was no big deal to me because I had to fit this cable through a very small hole which wasn't going to happen without modifying the cable anyway. It is a 6 pin JST cable connector.