PRO
monterdur
USA
Asked
Resolved by DJ Sures!
I would like to control a 360-degree continuous rotation servo using Blockly in Synthiam ARC, specifying the duration of movement instead of a specific angle. Which blocks should I use to achieve this? I assume I need to use the "Move Servo" block to identify the servo number. What other blocks should I use to set the duration and speed for the servo's movement? Should I also consider using the "Move Forward" block, which allows setting left speed, right speed, and duration in milliseconds?
Related Hardware EZ-B v4
Related Control
Continuous Servo
To control a 360-degree continuous rotation servo using Blockly in Synthiam ARC, you can use the Continuous servo Movement Panel skill. Since continuous rotation servos don't have a specific position but rather a speed and direction, you'll need to specify the speed and duration for which the servo should move.
Here's how you can achieve this using Blockly:
Add the Continuous servo Movement Panel: Ensure that you have added the Continuous servo Movement Panel to your ARC project. This panel will allow you to control the continuous rotation servos.
Open Blockly: Go to the Blockly interface in ARC.
Set servo Speed: Use the
Set Speed
block to specify the speed for the left and right servos. The speed is a percentage value between 0 and 100. You can adjust the speed to control how fast the servo rotates.Move Servo: Use the
Move Forward
,Move Reverse
,Move Left
, orMove Right
block to specify the direction in which you want the servo to move. These blocks will control the movement of the robot using the Continuous servo Movement Panel.Set Duration: Use the
Wait
block to specify the duration for which the servo should move. The duration is specified in milliseconds. For example, if you want the servo to move for 2 seconds, set the wait time to 2000 milliseconds.Stop Servo: After the wait duration, use the
Stop
block to stop the servo movement. This will ensure that the servo stops rotating after the specified time.Here's a simple example of how the Blockly code might look:
Steps in Blockly:
Set Speed
block and set the desired speed for both left and right servos.Move Forward
block to start the movement.Wait
block and set the duration in milliseconds.Stop
block to stop the movement after the wait time.This setup will move your continuous rotation servo forward at the specified speed for the specified duration and then stop it. Adjust the speed and direction blocks as needed for your specific application.
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
Athena is correct - but only if you’re using the continuous rotation servo as a movement method. Meaning, it has a wheel attached to it to move the robot. That’s why you’d use a movement panel. A Movement Panel is responsible for moving the robot.
if the servo is to be used as something else, you can use a regular servo command in Blockly to move the servo. So yes, use the move servo block.
One bit of information that would help you is understanding how a continuous rotation servo works. This document explains what positions would make the servo move: https://synthiam.com/Support/Advanced-Fundamentals/servo-motor#part5
That same document explains the difference between a continuous rotation and standard servo. It’s important to know that a continuous rotation servo has no internals to understand positioning.
@athena can explain more.
Thank you for the additional context! Let's delve a bit deeper into how continuous rotation servos work and how you can control them using Blockly in Synthiam ARC.
Understanding Continuous Rotation Servos
A continuous rotation servo differs from a standard servo in that it doesn't have a fixed position range (like 0 to 180 degrees). Instead, it rotates continuously in either direction. The speed and direction of rotation are controlled by the PWM signal:
Controlling a Continuous Rotation servo with Blockly
If you're using the continuous rotation servo for purposes other than moving the robot (e.g., rotating an arm or a sensor), you can use the regular servo control blocks in Blockly. Here's how you can set it up:
Add the Continuous servo Skill:
Open Blockly:
Set servo Position:
Set Servo
block to specify the port and position for the servo.Set Duration:
Wait
block to specify how long the servo should rotate. The duration is in milliseconds.Stop Servo:
Set Servo
block.Example Blockly Code
Here's an example of how your Blockly code might look:
Steps in Blockly:
Set Servo
block and set the port and position to control the direction and speed.Wait
block and set the duration in milliseconds.Set Servo
block to stop the servo by setting the position to 90.This setup will rotate your continuous rotation servo in the specified direction for the specified duration and then stop it. Adjust the position values as needed for your application. If you have any more questions or need further assistance, feel free to ask!
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
@Monterdur. Just checking to see if you go it working. I am very fluent in Blockly. For some of these items you kind of need to read between the lines. The 90 degrees will give you no movement as you progress to say 70 degrees etc or inversely 110 will go in different directions. Although there isn't a potentiometer on the motor what you do is use the timeout block for your distance you want to travel-2000 milliseconds for 1 ft etc.
Thank you for reaching out. I am trying to make a 360 servo run on a voice command and to get it to run for a short period of time. I lost all of my work on the old laptop. But here is what the progress I made so far. The blocky code I used is below. But if I can make it run with time that would be best. I will be connecting the servo directly yo the EZV and not use the 16 channel board. I will look for the timeout block and try to implement it. Thank you and I will keep you posted. The current code makes the servo move with 1 voice command and stops with a 2 nd vice command.
add some value to the move servo block. It’s currently empty
remove the move forward block and replace it with a sleep block
remove the stop block
Here's what i mean - i wasn't on my computer when i wrote the message yesterday. This will move the servo in one direction full speed. 90 is stop (or you can release it for similar behavior). Any value from 90 up or down will be the speed in the relative direction. It's documented very well in how a servo works if you click on the word servo anywhere in this response or other responses (it's a good read)
The best way to understand if what you did makes sense is to ask yourself what every command does. For example, let's take a look at what you had done...
If you explain each block, you'd find that they don't go together logically. The move servo makes sense but it's missing the value to move. Then you have a "move forward", which controls a movement panel. And then a release, which is good. But finally it ends with a Stop, which controls a movement panel.
What i would recommend is right-clicking on a block and selecting HELP to read the manual page for them. It will explain what it does - and then you can decide if that's the right command for the goal.
Hope that helps It can feel overwhelming learning new stuff but that's where a hot cup of tea and relaxing music in the background can help while we take our time haha.
Hi DJ,
That did the trick. It worked perfectly. Your explanation was very clear. Now the kids at our school will move forward with the 3D printing of gears and components. On behalf of all of the kids at Kids Elite. Thank you!
That's great to hear! Thanks for the kind words. Let me know what your next step with the kids is if you need any help