Example: Custom Movement Panel
The ARC software uses controls that register themselves as a movement panel. This allows your plugin to listen to movement requests from other controls. When any control or EZ-Script calls for a movement direction (i.e. Forward, Left, Stop, etc), your plugin can be responsible for moving the robot. There can only be one Movement Panel per robot project. This is because there is only one method of locomotion for a robot, which this Movement Panel would be responsible for.
To understand more about how Movement Panels work in EZ-Builder, read this tutorial.
What's In A Movement Panel? A Movement Panel will have buttons that lets the user specify directions that the robot should move. Your Movement Panel will be responsible for the robot moving. This means that anywhere a direction is specified, your control will be responsible for moving the robot. Generally a Movement Panel has speed controls in the form of trackbars of some sort.
Code Example Want to make your own movement panel? Here is an example of how to implement code which will respond to movement requests:
public FormMain()
: base() {
InitializeComponent();
// Assign this control as a Movement Panel so the software knows who owns the movements
EZ_Builder.FormMain.MovementPanel = this;
// Assign the movement locomotion style for this control.
// There are different kind of locomotion for your robot, and this helps other
// controls know what to expect when a movement is happening.
// Check out the ENUM to see what other locomotion styles there are that
// fits your Movement Panel type.
EZBManager.MovementManager.LocomotionStyle = LocomotionStyleEnum.GAIT;
// assign the movement event
// this event is raised when another ARC control requests movement
EZBManager.MovementManager.OnMovement2 += Movement_OnMovement2;
// assign the speed change event
// this event is raised when another control or user changes the speed
EZBManager.MovementManager.OnSpeedChanged += Movement_OnSpeedChanged;
}
private void FormModifiedServoMovementPanel_FormClosing(object sender, FormClosingEventArgs e) {
// Remove this control as a Movement Panel
EZ_Builder.FormMain.MovementPanel = null;
EZBManager.MovementManager.OnSpeedChanged -= Movement_OnSpeedChanged;
EZBManager.MovementManager.OnMovement2 -= Movement_OnMovement2;
}
private void Movement_OnSpeedChanged(int speedLeft, int speedRight) {
// do something with the speed change
}
private void Movement_OnMovement2(MovementManager.MovementDirectionEnum direction, byte speedLeft, byte speedRight) {
// **
// do something based on the speed
// handle speed change here
// **
// Now do something based on the new movement direction
if (direction == MovementManager.MovementDirectionEnum.Forward) {
// handle custom Forward movement
} else if (direction == MovementManager.MovementDirectionEnum.Reverse) {
// handle custom Reverse movement
} else if (direction == MovementManager.MovementDirectionEnum.Right) {
// handle custom Right movement
} else if (direction == MovementManager.MovementDirectionEnum.Left) {
// handle custom Left movement
} else if (direction == MovementManager.MovementDirectionEnum.Stop) {
// handle custom Stop movement
}
}
Thanks for the quick response.
This what happens when you are working on robotics when its way past your bed time.
You miss the obvious
No problem - i get it

Sorry but can I ask you something why I didn't see the ARC library when I added visual studio even though I set up the C ++. DLL library and there's another way to execute it and send / receive console in out but I don't know how to do it with EZ_builder?Please follow the tutorial. It’s impossible to know why you’re plug-in isn’t showing up without asking you if you followed each step of the tutorial
. Reviewing your screenshots, it doesn’t appear as if any of the tutorial steps have been followed.
Hi i fixed it. thanks
Hello, I am trying the tutorial to get the robot to speak. I am using Visual studio. Currently, the sound is output from the pc instead of the robot. Is there a code I can attach so that the sound comes from the robot speakers instead of the pc?
Look in this tutorial for the step labeled "output audio from ezb". It’s lower down in the list. There’s instruction examples for either playing audio (ie mp3) or text to speech.
Error: the referenced component" EZ_builder,EZ_B" could not be found, DJ Sure i hope you can help me !

Joinny, you have to add the referencing by following the instructions in this tutorial. They are outlined with step by step to easily follow. Click add references, and browse to the appropriate files as directed in the tutorial. I can’t write anything clearer in response. The step to add references is incredibly clear but you’re skipping it.