ADIS16470 VS Code Setup

Hi,

I’m trying to setup the ADIS16470 library in VS Code for Java. I’ve downloaded the latest ZIP file from Releases · juchong/ADIS16470-RoboRIO-Driver · GitHub , and unzipped it to C:\Users\Public\wpilib\2022 . In VS Code, I’ve selected the WPI Lib Button, pressed Manage Vendor Libraries > Install New Libraries (Offline) and selected the ADIS16470. It then prompts me to do a build, but when I do, I get this:

  • What went wrong:
    Could not determine the dependencies of task ‘:jar’.

Could not resolve all dependencies for configuration ‘:runtimeClasspath’.
Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository ‘WPI6606dc7e-fb96-436f-a804-c07a5d841a14_0Release(http://maven.highcurrent.io/maven)’ to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See UrlArtifactRepository - Gradle DSL Version 7.3.3 for more details.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 2s
The terminal process “cmd.exe /d /c gradlew build -Dorg.gradle.java.home=“C:\Users\Public\wpilib\2022\jdk”” terminated with exit code: 1.

It seems that it doesn’t want to download the contents because the URL is not HTTPS, but I’m not sure how to implement its suggested fix for allowing unsecured URLs. Does anyone have any ideas?

Try adding allowInsecureProtocol = true ?

https://exerror.com/using-insecure-protocols-with-repositories-without-explicit-opt-in-is-unsupported-switch-maven-repository/

It is not necessary to use that zip file, WPILib now includes ADIS16470 support (ADIS16470_IMU). You should also make sure you’re using WPILib 2022.4.1 and image 2022v4.0.

1 Like

ADIS16470 should not need any additional libraries. Like @Peter_Johnson said, check your WPILib and roborio image versions. For more info, check out the docs.

ADIS16470_IMU m_gyro = new ADIS16470_IMU();

// In RobotPeriodic
SmartDashboard.putNumber("Gyro", m_gyro.getAngle());

Also, if your RoboRIO is not mounted flat (i.e. parallel to the floor), make sure to call setYawAxis() so that the gyro returns the angle of the correct axis.

1 Like

Thanks everyone. That was the exact info I needed. And in retrospect, I feel a little foolish for having had to ask!

No worries! I did the exact same thing with the ADIS16448 earlier in the season. Happy coding :slight_smile:

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