Italy
Asked — Edited

Stop Pwm

Hello. I have installed 2.5 Amp Motor controller and now i am writing the code for controlling it. No problem for setting speed, but i am not able to stop pwm.

This is the code i have used for setting speed and it works fine: Private Sub button2_click EzB_Connect1.EZB.PWM.SetPWM(Digital.DigitalPortEnum.D15, 50) End Sub

This is the code i have used for setting speed faster and it works fine: Private Sub button3_click EzB_Connect1.EZB.PWM.SetPWM(Digital.DigitalPortEnum.D15, 100) End Sub

And this is the code i have used for stopping pwm and it does not works: Private Sub button1_click EzB_Connect1.EZB.PWM.StopPWM(Digital.DigitalPortEnum.D15) End Sub

Well, pressing the button, it has no effect and the motor continues tu run. Maybe i have forgot something or i have write something wrong.

Any suggestion?

Thank you.


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.