Skip to content

Drivetrain Pseudo Code

Ovais09 edited this page Jan 27, 2018 · 10 revisions

Drivetrain:

  1. Move forwards (different speeds)
  2. Move backward
  3. Spin left (multiple angles)
  4. Spin right (multiple angles)
  5. Stop moving (Hard stop) <-- Need to ask Noodles

Motors: Victor SP (4 motors) One motor controller for each CIM motor

Sensors: Encoder, Gyro

Turn 180 degrees on the spot

One side moves forward, the other side moves backward The encoder checks whether the robot turns 180 degrees and stops the robot

  • Number of rotations
  • Find out how many turns are needed to spin 180 degrees
  • Check if current number of rotations = number of rotations required

Turn 90 degrees on the spot Left or Right The encoder checks whether the robot turns 90 degrees and stops the robot

  • Number of rotations
  • Find out how many turns are needed to spin 90 degrees
  • Check if current number of rotations = number of rotations required

The encoder checks whether the robot turns 360 degrees and stops the robot

  • Number of rotations
  • Find out how many turns are needed to spin 360 degrees
  • Check if current number of rotations = number of rotations required