![]() |
To control motor's rotation...
Hi
I'm trying to control the motor's rotation with a button I want the motor to turn certain degrees when a button is pressed so i built a function called MotorDegree, and used For loop to control the rotation. [pwm01 = MotorDegree(p1_sw_trig)] But it appears that the motor's movement (pwm01) doesn't require the button's activation (p1_sw_trig). It turns automatically once the robot initiates. I used If command in the function so that the function runs only if the trigger is pressed (when it's 1 or above 0) What is wrong? |
Re: To control motor's rotation...
Hi,
How about posting your code for the MotorDegree() function. Are you trying to make the motor turn less than 1 shaft revolution? Or are you trying to use the motor to raise an arm by some angular amount? If it is an arm, what are you using for feedback? A potentiometer? Regards, ChuckB |
Re: To control motor's rotation...
Thanks for replying
I found the problem and the thing works now. |
| All times are GMT -5. The time now is 00:01. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi