Go to Post "Defense wins qualifying rounds, offense wins championships." - Paul Copioli [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 16-02-2016, 18:52
grim42 grim42 is offline
Registered User
FRC #1018
 
Join Date: Feb 2016
Location: indianapolis
Posts: 1
grim42 is an unknown quantity at this point
Question How to speed up Motors?

I am new to Java, and i'm wondering if there is a way to speed up the motor or decrease the speed by pressing a button?
(sorry if i'm too vague with my question)
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2016, 19:40
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 231
TimTheGreat will become famous soon enoughTimTheGreat will become famous soon enough
Re: How to speed up Motors?

Quote:
Originally Posted by grim42 View Post
I am new to Java, and i'm wondering if there is a way to speed up the motor or decrease the speed by pressing a button?
(sorry if i'm too vague with my question)
Code:
int x = 0

if joystickButton.get()
    x+=.2
if joystickButton2.get()
   x=-.2

motor.set(x)
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
Reply


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 09:35.

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