Go to Post Can you describe how you utilized your human head device on your intake? - Kevin Ainsworth [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 20-12-2013, 13:17
BlackUnicorns BlackUnicorns is offline
Registered User
FRC #5135
 
Join Date: Dec 2013
Location: Israel
Posts: 3
BlackUnicorns is an unknown quantity at this point
Re: Just began using Java

Quote:
Originally Posted by Jon Stratis View Post
Change this line:

RobotDrive myDrive = new RobotDrive(1, 2);

to:

RobotDrive myDrive = new RobotDrive(2, 1);


Think about what's happening. When you push forwards on the joystick, the RobotDrive tells both motors (1 and 2) to drive forward, which works fine. Likewise, pulling the joystick backwards makes both motors go backwards.

But if you want to turn left (spin in place) then one motor has to go forwards and one has to go backwards. In this case, it picked the wrong ones, and as a result spins in the wrong direction. By switching the order you pass in the motors, you'll switch it's choice and it'll turn in the right direction.
What you say makes a lot of sense, but i remember that we tried doing it today and it didnt work..
I dont have the robot now to try it but i will try it tomorrow and see if it works.

by the way, i remember when we used labview, it had a robot simulator, does java has something like that too?
Reply With Quote
  #2   Spotlight this post!  
Unread 20-12-2013, 13:43
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Just began using Java

Quote:
Originally Posted by BlackUnicorns View Post
by the way, i remember when we used labview, it had a robot simulator, does java has something like that too?
There isn't an official java simulator like there is for LabVIEW.

I've seen a few different attempts where people have tried to put one together, for example http://www.chiefdelphi.com/forums/sh...d.php?t=112024, but I have not tried any of them.
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 10:37.

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