Neo Brusless Motor problems

For reference, I’m doing this on the new 2023 version of the WPI VS Code. I have no errors at least syntactically. However, every time I run this super bare-bones code it always fails to build. Is there a new way to create the neo encoders in java?

also here are my imports

package frc.robot.subsystems;

import com.revrobotics.CANSparkMax;

import com.revrobotics.RelativeEncoder;

import com.revrobotics.CANSparkMaxLowLevel.MotorType;

import edu.wpi.first.wpilibj.CounterBase.EncodingType;

import edu.wpi.first.wpilibj2.command.CommandBase;

import edu.wpi.first.wpilibj2.command.SubsystemBase;

import frc.robot.Constants;

Error message

Task :compileJava FAILED
C:\Users\clark\OneDrive\Desktop\Command\COMMAND\src\main\java\frc\robot\subsystems\DriveTank.java:23: error: cannot access SpeedController
private final RelativeEncoder lefEncoder = leftFrontMotor.getEncoder();
^
class file for edu.wpi.first.wpilibj.SpeedController not found
1 error
Compilation Error!
GradleRIO detected this build failed due to a Compile Error (compileJava).

1 Like

You’ll need the new revlib for 2023. Not sure when it is available, but should be soon.

1 Like

Oops… appreciate the help

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.