Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VEX Spin Up Code for 2022-23

Controller Binds

Axis 3      Foward/Reverse Drive
Axis 4		Left/Right Drive
Axis 1      Left/Right Turn

Button Y 	Enable Precision Mode
Button X	Disable Precision Mode

Button A	Intake
Button X	Reverse Intake 

Button Up	Flywheel

Button L1   Blue Autonomous Selection
Button R1   Red Autonomous Selection

Move functions

Declared and defined respectively in include/bot.h and src/bot.cpp
(All angles mentioned are defined as follows: a clockwise turn is a negative rotation, 
and a counter-clockwise turn is a position rotation)

- void Move(double x, double y, double angle, double lengthTolerance, double angleTolerance, 
             double tickLength, distanceUnits lengthUnit, rotationUnits angleUnit);
    Moves the robot to the target coordinate (x, y) and facing a target heading (angle), 
    with a certain position tolerance (lengthTolerance = 25 mm by default) and heading tolerance 
    (angleTolerance = 1 degree by default). 
    Distance is measured in lengthUnits (default is mm) and heading is measured in angleUnits (default is deg). 
    tickLength is the approximate frequency that the robot recalculates motor headings.
    Note: angles are negative clockwise and positive counter-clockwise

- void Turn(double angle);
    Turns a certain amount specified by angle in degrees.

- void SetHeading(double angle);
    Turns the robot to a specific heading specified by angle in degrees.

- void Shoot(int seconds);
    Shooting disk for (seconds) seconds.

- void Roll();
    Spinning the Roller 180 degrees.

TODO

  • controller code for drive
  • controller code for intake
  • controller code for flywheel
  • controller code for roller (using intake)
  • temperature-based power throttling (unnecessary, remove later)
  • Decide on Autonomous round strategy
  • Autonomous code finished (not yet tested)
  • Updated code structure, putting autonomous functions in bot.h (defined in bot.cpp)
  • Autonomous code structure in main.cpp, add a clock to keep track of Auton time?
  • Separate intake and shoot functions because the robot may need to move around; during intake, slowly move robot forward
  • Potentially need to implement pneumatics

Motor binds in port_config.h

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages