Asked
— Edited
Can you show me some examples in Javascript of how to Setashome for V21? Can you also show me some examples in Javascript of how to Calibrate V22?
Related Hardware EZ-B v4
Related Controls
Stepper Servo
Inverse Kinematic Arm
Yes, you're right this will be a tedious operation. I moved the code to the cmd==1 and ran it. No leds turned on, not even the Rx. Ran a loop program to 5000 back to 1 and back to 5000 etc to observe it and no leds came on at all. Before I continue with each is this what you were looking for whereas it doesn't turn on?

Am I supposed to hook up an led to pin 13 and ground side of led to ground?When you read the comments of cmd 1, what does it say it does? I’m looking at your screenshot and it doesn’t say anything related to your test.
each cmd condition is a different function of the stepper controller. Hint: if you’re testing movement, you’ll want to put that code in the cmd condition for moving
Yes, I was wondering about that so I need to send a ControlCommand for speed? Will do it later today
I don’t believe there is a ControlCommand for speed. You’ll have to check the cheat sheet. I believe the speed is a servo function.
setspeed
or in advanced servo settings
or just move the led code to the cmd for where the position is moved. No point to test something you don’t use.
This was a very good exercise! I delved in to the speed cmd==2 with EZScript and see exactly what is happening with the debug light. It does toggle on and off each time it receives a script and works great! This speed script will come in handy and will save on script writing which I had to do to slow stepper down recently to very accurately find an edge. I moved the debug led code under the cmd==5 for calibrate and the script is definitely is not getting there and same is happening with Homing as the built in debug led is not turning on for V8 but I can see it is trying to transmit on V1 with the Tx light coming on. Since the servoSpeed( V8, 5) is working with EZScript is there a similar code for homing. I looked around on the cheatsheet and did not see anything. On a side note tried to put speed script into the new Javascript block but the code is in EZScript so it doesn't go. An upgrade for future may be to add an EZScript block. I used the ControlCommand to get around this in my loop code in Blockly. Getting closer.
Your lesson isn’t done
because you’re talking ezscript and trying to merge with Blockly which is JavaScript. So what you’re missing is the support section that has all the commands. Here’s the JavaScript command for setting speed: synthiam.com/Support/javascript-api/Servo/setSpeed
that being said, Blockly already has a speed block for servos. So you can just use that without typing the code.
Tried it and both of the items worked great. Looked up the setAsHome in Javascript and did not see any. What would the code be?
You know what the set as home in javascript is...
You have been using that. Here's the manual for the ControlCommand if you need to learn more: synthiam.com/Support/Programming/control-command