Go to Post You definitely know you've overdosed on first when you wash the aluminum shavings off your hands AFTER you eat dinner. - Maxpower57 [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
  #1   Spotlight this post!  
Unread 16-05-2015, 23:00
tahmid0517's Avatar
tahmid0517 tahmid0517 is offline
Registered User
AKA: Tahmid Sheikh
FRC #5036 (The Robo Devils)
Team Role: Engineer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Toronto, Ontario
Posts: 11
tahmid0517 is an unknown quantity at this point
Would this code work for kaj drive?

Hi, I'm new to programming and I wrote a piece of code that I don't have access to a robot right now to test on:

frontRight.set(stick1.getY() - stick2.getX());
backRight.set(stick1.getY() - stick2.getX());
frontLeft.set(stick1.getY()+ stick2.getX());
backLeft.set(stick1.getY()+ stick2.getX());

Assuming all the motor and joystick ports are declared correctly and this code is in the teleop periodic section, would this code work as a form of kaj drive where a robot's forward and backward motion is controlled with the left joystick and turning is controlled by the right joystick?
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:41.

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