Go to Post If you squeeze cost out hard enough, any component can become a failure point. - EricVanWyk [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #17   Spotlight this post!  
Unread 02-24-2014, 04:47 AM
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 102
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: Joystick 2/Program issue

Just a heads up, in the autonomous example, I had an error in the code that was suppose to drive for three seconds. The original code would start driving, wait for 3 seconds, but fail to stop driving afterwards. This would have resulted in your robot to continue driving for the next 1.5 seconds as it raised its launcher (until stopAll() was reached).

I've corrected the example in the previous post. Here is the fragment of code that was corrected with the addition of myDrive.stopMotor() (it will stop driving before raising the launcher):

Code:
        // Example of driving at half power for 3 seconds (not sure if this
        // will be forward or backwards on your robot)
        myDrive.drive(-.5, 0.0);
        Timer.delay(3.0);
        // Stop drive motors
        myDrive.stopMotor();
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:14 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi