This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package frc.robot.commands; | |
import java.util.function.Supplier; | |
import edu.wpi.first.wpilibj.SlewRateLimiter; | |
import edu.wpi.first.wpilibj.kinematics.ChassisSpeeds; | |
import edu.wpi.first.wpilibj.kinematics.SwerveModuleState; | |
import edu.wpi.first.wpilibj2.command.CommandBase; | |
import frc.robot.Constants.DriveConstants; | |
import frc.robot.Constants.OIConstants; | |
import frc.robot.Subsystems.SwerveSubsystem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) FIRST and other WPILib contributors. | |
// Open Source Software; you can modify and/or share it under the terms of | |
// the WPILib BSD license file in the root directory of this project. | |
package frc.robot; | |
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; | |
import edu.wpi.first.wpilibj.Encoder; | |
import edu.wpi.first.wpilibj.XboxController; | |
import edu.wpi.first.wpilibj.TimedRobot; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) FIRST and other WPILib contributors. | |
// Open Source Software; you can modify and/or share it under the terms of | |
// the WPILib BSD license file in the root directory of this project. | |
package frc.robot; | |
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; | |
import edu.wpi.first.wpilibj.Encoder; | |
import edu.wpi.first.wpilibj.XboxController; | |
import edu.wpi.first.wpilibj.TimedRobot; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Arduino and MPU6050 Accelerometer and Gyroscope Sensor Tutorial | |
by Dejan, https://howtomechatronics.com | |
*/ | |
#include <Wire.h> | |
const int MPU = 0x68; // MPU6050 I2C address | |
float AccX, AccY, AccZ; | |
float GyroX, GyroY, GyroZ; | |
float accAngleX, accAngleY, gyroAngleX, gyroAngleY, gyroAngleZ; | |
float roll, pitch, yaw; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int pin = 9; | |
int value; | |
float xn1= 0; | |
float yn1 = 0; | |
int k = 0; | |
void setup (){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//PID constants | |
double kp = 1; | |
double ki = 0; | |
double kd = 0; | |
unsigned long currentTime, previousTime; | |
double elapsedTime; | |
double error; | |
double lastError; | |
double input, output; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//PID constants | |
double kp = 8; | |
double ki = 1; | |
double kd = 6; | |
unsigned long currentTime, previousTime; | |
double elapsedTime; | |
double error; | |
double lastError; | |
double input, output; |