Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   How to speed up Motors? (http://www.chiefdelphi.com/forums/showthread.php?t=143986)

grim42 02-16-2016 06:52 PM

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)

TimTheGreat 02-16-2016 07:40 PM

Re: How to speed up Motors?
 
Quote:

Originally Posted by grim42 (Post 1541402)
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)



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

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