Go to Post Bottom line for us is this... By elevating what ANY team can do, we also push those outstanding teams to go even further. - Rich Kressly [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 11-11-2009, 18:46
jamie_1930's Avatar
jamie_1930 jamie_1930 is offline
Registered User
FRC #2228 (Cougartech)
Team Role: Student
 
Join Date: Feb 2008
Rookie Year: 2008
Location: Rush-Henrietta
Posts: 371
jamie_1930 is a splendid one to beholdjamie_1930 is a splendid one to beholdjamie_1930 is a splendid one to beholdjamie_1930 is a splendid one to beholdjamie_1930 is a splendid one to beholdjamie_1930 is a splendid one to beholdjamie_1930 is a splendid one to behold
Re: [FTC]: Spin Motor Wind Down: Programming

I would use this

if(joystick.joy1_y1 == 0 && motorspeed > 0)
{
motorspeed = motorspeed - (desired decrement)

}

it's simple and simplicity is the key. So what is basically happening in this code is that if you've let go of the left joystick and the motor hasn't stopped then it will decrease the speed then the rest of the code will execute then the process will repeat. The only tricky thing about this is the decrement will have to be small because the code will repeat almost immediately.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wind River License Server Down? keericks C/C++ 4 19-06-2009 20:02
[FTC]: January Run Down and New FTC Pictures ttldomination FIRST Tech Challenge 6 04-02-2009 13:18
Driver Station Watch Dog / Motor Won't Spin Issue RMiller FRC Control System 5 20-01-2009 09:58
Motor Spin Direction archiver 2000 6 23-06-2002 23:43
How Many RPM does a Fisher-Price Motor Spin At? archiver 2000 7 23-06-2002 23:22


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

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