
rgadagno
Hi,
I got my H-Bridge from Ez. I'm playing with tutorial 43 working with the HBridge. I can not get my robot to move. The H-Bridge work fine using Ez builder.
I updated the form load to use the same configuration in the EZBuiler.
private void Form1_Load(object sender, EventArgs e) {
ezB_Connect1.EZB.Movement.MovementType = EZ_B.Movement.MovementTypeEnum.HBridge;
ezB_Connect1.EZB.Movement.HBridgeLeftWheelTriggerA = EZ_B.Digital.DigitalPortEnum.D4;
ezB_Connect1.EZB.Movement.HBridgeLeftWheelTriggerB = EZ_B.Digital.DigitalPortEnum.D3;
ezB_Connect1.EZB.Movement.HBridgeRightWheelTriggerA = EZ_B.Digital.DigitalPortEnum.D5;
ezB_Connect1.EZB.Movement.HBridgeRightWheelTriggerB = EZ_B.Digital.DigitalPortEnum.D6;
// I added this to see if this would help.
ezB_Connect1.EZB.PWM.SetPWM(EZ_B.Digital.DigitalPortEnum.D2, 40);
ezB_Connect1.EZB.Movement.Speed = 40;
ezMovement1.SetEZB = ezB_Connect1.EZB;
I'm not sure where you set the PWM for speed? Is there something I'm missing. I"m using Visual Studio 2012. The code pretty straight forward not sure what i could be missing.
The below code will set the PWM to FULL
Code:
Updated it and still nothing. I went back to the ARC and work fine with the settings
I did attached a Screen shot of my settings in ARC.
Note:
when i bring up debug window and select connect i see it connected. But when i click on Forward or any other positions i get nothing from the debug window. I did put a break point and it is going into the click event.
Any other thoughts?
If the breakpoint is not working, that is because the code is not executing.
My suggestion is to start with a crash course on C# and Visual Studio. If the HBridge is connected to the ports specified, the example works flawlessly. Also, if you press the manual direction buttons on Example 43, the EZMovementControl will also display the direction by highlighting the buttons in green. I reviewed the example to verify, it works. Good luck
I set it to D6 but this after the assignment.
ezB_Connect1.EZB.Movement.HBridgeLeftWheelTriggerB D1 | D2 EZ_B.Digital.DigitalPortEnum