Our team is using C++ programming for the first time this year, and we’ve encountered some issues with our Swerve X program control. Our Swerve X module doesn’t have an internal encoder, so we’re relying on an external encoder to read the wheel’s angle, but we’re having trouble with control. Is there anyone who can provide C++ code for Swerve X or offer a solution?"
Can you provide your code?
Not for Swerve X, but this code shouldn’t be hard to convert: https://github.com/Jagwires7443/Scrappy/tree/master/src/main. More to the point though, control problems tend to be in code that works the same for different absolute encoders or different motor controllers. One thing this code has that can be really helpful is extensive test mode code for bringing up a swerve drive base.
Curiously what made you decide to switch to C++ and what were you using before?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.