PRO
monterdur
USA
Asked
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.