Sketch Pad icon Sketch Pad Script-driven Sketch Pad for ARC: draw shapes, text, lines and faces via controlCommand() to visualize object locations, paths and robot data. Try it →
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

Stay at the forefront of robot programming innovation with ARC Pro, ensuring your robot is always equipped with the latest advancements.