Thumbnail

Custom Movement Panel

+ How To Add This Control To Your Project (Click to Expand)
  1. Load the most recent release of ARC.
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Control from the button ribbon bar in ARC.
  4. Choose the Movement Panels category tab.
  5. Press the Custom Movement Panel icon to add the control to your project.
If your robot requires a motor/movement controller that is not supported, use this skill. You may assign scripts to the Forward, Backward, Left, Right, and Stop commands.

There are also script functions available to you to obtain the currently selected speed of both Left and Right wheels. You may modify the speed using SetSpeed(value). The speed values may be altered by any joystick-style skill that affects speed, such as the Joystick in Mobile Interface or a physical joystick using the Joystick Control.

Main Window



1. Movement Panel
These buttons will allow you to control the directional movement of the entire robot (left, right, forward, reverse, and stop).

2. Speed Sliders
You can select the speed of the servos with these sliders. Be aware that the speed range is (0-255) and the default settings are 100% (255). These sliders can allow you to adjust for one motor being faster than the other.

Settings



1. Stop Script
This script will stop the moving robot. It will also activate when the Stop() script is called.

2. Direction Scripts
These scripts will control which way the robot will move when the movement panel buttons are pressed or movement scripts are called [ex: Forward()].

3. Speed Changed Script
This script will execute when the speed sliders are adjusted in the main window or when the setSpeed() script is called.

How to Use Custom Movement Panel


1) Physically connect your robot to an EZ-B.

2) Add the Custom Movement Panel Skill to your ARC project (Project -> Add Skill -> Movement Panels -> Custom Movement Panel).

3) In the Settings menu select enter the scripts you would like to use for each of the directions and stop.

4) In the main window press the direction buttons to move your robot. If the directions seem reversed you can simply change your scripts.

Code Samples


Available EZ-script functions to obtain the current speed are:

GetSpeed( )
Returns the global Movement Speed value
Speed is between 0 and 255
The speed can be viewed in the Script Variable Viewer
Example: $x = GetSpeed()


GetSpeedLeft( )
Returns the global Movement Speed value of the Left wheel
Speed is between 0 and 255
The speed can be viewed in the Script Variable Viewer
Example: $x = GetSpeedLeft()


GetSpeedRight( )
Returns the global Movement Speed value of the Right wheel
Speed is between 0 and 255
The speed can be viewed in the Script Variable Viewer
Example: $x = GetSpeedRight()


Resources


Read more about how Movement Panels work here.