CANSparkMax

I am trying to import the rev robotics CANSparkMax but I can find the link? I will also add that I am a new. One more thing we are also trying to import the CANSparkMaxLowLevel.Motortype and dont know how to.
Thank you in advance for you help.

Did you import Rev Robotic’s library?

Go to this link to download it or use the following online link
https://www.revrobotics.com/content/sw/max/sdk/REVRobotics.json

Then refer to this tutorial on importing vendor libraries

Yeah but this still comes up with an error MotorType.KBrushless, and same for this import com.revrobotics.CANSparkMaxlowLevel.MotorType;. Where is the link for this??

It should be included in the library as well. Did you build and save the code after the library was installed? Are you in a WPLib project?

Yes I did build and save but it failed the build I think it was bc of some errors that are in the code at the moment. I can build and check again.

here is the error that I get C:\2020Coding\2020 Robot Code\CodeReal\Code\src\main\java\frc\robot\Robot.java:15: error: package com.revrobotics.CANSparkMaxlowLevel does not exist
import com.revrobotics.CANSparkMaxlowLevel.MotorType;

  1. Check your case (I don’t know if that matters or not). The import is com.revrobotics.CANSparkMaxLowLevel.MotorType

  2. If that doesn’t help I would build before importing it into the code. So comment out any revrobotics code (You can use multiple line comments with /** code */), build, and then uncomment.

Java imports are case-sensitive. Once the import is fixed, the error should go away.

In the event that you missed what LMoose was saying in the first part, the L in Low needs to be capitalized.

thank you so much, I forgot to capitalize the L, sometimes I surprise myself with my stupidity.

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