Skip to content

Instantly share code, notes, and snippets.

View dc74089's full-sized avatar

Dominic Canora dc74089

  • Lake Highland Preparatory School
  • Orlando, FL
View GitHub Profile
@dc74089
dc74089 / DriveSubsystem.java
Created February 20, 2021 17:36
1902's "minimum viable" swerve drive code... You probably won't be able to copy/paste this whole thing into your own project, but the logic, functions, and structure in this file has worked for us to drive in tele-op.
package frc.robot.subsystems;
import com.revrobotics.CANSparkMax;
import com.revrobotics.CANSparkMaxLowLevel;
import com.revrobotics.ControlType;
import edu.wpi.first.wpilibj.geometry.Translation2d;
import edu.wpi.first.wpilibj.kinematics.ChassisSpeeds;
import edu.wpi.first.wpilibj.kinematics.SwerveDriveKinematics;
import edu.wpi.first.wpilibj.kinematics.SwerveModuleState;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
@dc74089
dc74089 / pong.pde
Last active March 1, 2023 19:40
Simple Pong Game in Processing
float x, y, speedX, speedY;
float diam = 10;
float rectSize = 200;
void setup() {
fullScreen();
fill(0, 255, 0);
reset();
}