I am trying to use velocity control to set the RPM’s for our ball shooter. As of now I’m trying to just have it print the current RPM’s but it doesn’t seem to be working
m_encoder = m_motor.getEncoder();
To no avail, does anyone know any examples I could use to get started, I’m not very familiar with PID either. I looked at Rev’s online example on GitHub, but can’t seem to get it working.
Edit: added () after velocity
I could never get System.out.println working
Also, don’t forget the parenthesis after getVelocity():
I would send it to the dashboard and view it there. Plus you have to call it in your subsystems’s periodic() method so it continually gets updated
As well as posting [a link to] the code, please let us know what motor controller and motor you’re using, and if its a brushed motor what encoder you’re using and how it’s wired.
Are you getting an error? If so, can you screenshot or copy in the error messages?
System.out.println() should work fine on any robot; I’m curious about your setup in which it didn’t work.
I got it to send it to the dashboard finally.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.