View Single Post
  #2   Spotlight this post!  
Unread 24-03-2015, 14:23
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 429
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: Updating Speed Using Ultrasonic Sensors

* Put your robot on blocks so it wont drive.
* Add print statements to your code that lists the distance and motor output value for each loop itteration.
* Run your code while moving an object in front of the ultrasonic sensor.

There's got to be a case where your if/else logic doesn't result in the motor.drive() method being called.


Also, why are you using the setSensitiviy method, that affects turning not rate of travel.
See: http://team2168.org/javadoc/edu/wpi/...obotDrive.html
__________________
http://team2168.org

Last edited by otherguy : 24-03-2015 at 14:29. Reason: question set sensitivity use
Reply With Quote