Which digital ports and which PWM settings should be used in Tutorial 43 to work with the Roli robot configuration?
More detail about what I'm seeing in case it helps...
When I use EZ-Builder's standard Roli project, the "Hbridge PWM Movement" control works fine. When I attempt the same behavior with Tutorial 43 code from the C# SDK, I do not get the same robot motor movements. In most cases, I get no movement at all. In the best case I've come across, I'm able to get one motor moving, but incorrectly (it goes backward when calling the EZB.Movement.GoLeft() method).
Since I'm able to get the correct behavior in EZ-Builder, this indicates to me that there are no issues with the robot assembly or hardware. It also indicates that the Tutorial 43 code is not identical to the code being used in EZ-Builder. In EZ-Builder, the instructions on how to assemble the Roli indicate the following HBridge settings:
HBridge Left Trigger A: D1
HBridge Left Trigger B: D2
HBridge PWM Left: D0
HBridge Right Trigger A: D3
HBridge Right Trigger B: D4
HBridge PWM Right: D5
The above settings don't match the default Tutorial settings. The default Tutorial settings don't work, so I tried the following code in Tutorial 43's Form1_Load method to see if using the instructional settings above might work better:
ezB_Connect1.EZB.Movement.MovementType = EZ_B.Movement.MovementTypeEnum.HBridge;
ezB_Connect1.EZB.Movement.HBridgeLeftWheelTriggerA = EZ_B.Digital.DigitalPortEnum.D1;
ezB_Connect1.EZB.Movement.HBridgeLeftWheelTriggerB = EZ_B.Digital.DigitalPortEnum.D2;
ezB_Connect1.EZB.Movement.HBridgeRightWheelTriggerA = EZ_B.Digital.DigitalPortEnum.D3;
ezB_Connect1.EZB.Movement.HBridgeRightWheelTriggerB = EZ_B.Digital.DigitalPortEnum.D4;
ezMovement1.SetEZB = ezB_Connect1.EZB;
I got no movement from any of the motors when calling any of the button click methods in the tutorial.
I tried commenting out each of the PWM.SetPWM calls, but it had no effect.
I used a debugger breakpoint to verify that the button click events were in fact firing and the ezB_Connect1.EZB.Movement methods were completing successfully (GoForward(), GoStop(), GoRight(), GoLeft(), GoReverse()).
It seems like the most likely problem is probably that the incorrect digital ports are being assigned to the ezB_Connect1.EZB.Movement.HBridge... properties and passed to the ezB_Connect1.EZB.PWM.SetPWM() method.
Could you please confirm which digital ports should be assigned to each ezB_Connect1.EZB.Movement.HBridge... property to match what ARC is doing for the standard Roli configuration?
And could you also please confirm what digital port(s) should be used when calling ezB_Connect1.EZB.PWM.SetPWM()?
And do you see any other issues that might cause the ARC code to be different from the Tutorial 43 code and cause this problem?
Many thanks in advance for your help!