View Single Post
  #3   Spotlight this post!  
Unread 17-02-2013, 13:36
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Ramping up motor tied to a button

That makes sense, but as Alan pointed out, the code will run every 20ms, so either don't increment it every pass or make the constant small to take that into account. If you know how fast it should ramp, and you know that happens every 20ms, it should be easy to come up with a constant value.

Also, be sure to reinitialize the value in the initialize() method.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote