View Single Post
  #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