Hello, I’m new to the forum, so I’m not quite sure if this is the right place to ask this, but anyway…
Is there a way to get the RPM of a motor with an IME in RobotC. Maybe somehow converting the clicks to a speed? I’m not really bothered about using a PID controller at the moment, I just really need to know how to calculate the speed.
Thank you in advance.
The way I ended up doing mine was slow motion videoing our launcher with my phone then counting the rotations in seconds and convering for rpms. I counted how many times a shaft collar went around but it would be better to mark the flywheel with tape or something.
So if you have a task that reads the IME value and then waits 100ms and reads the IME value again the difference between them is Ticks per tenth of a second. Then it is just a matter of conversion.
Use nSysTime and a variable like nSysTime_last. This statement reads how long the robot has been on in milliseconds. I’ll leave it to you to figure out how you can exactly measure the speed with this.
If you’re still having trouble I’ll show you at the next competition we both attend.
Ok thanks.
we normally prefer to use a photo tachometer to measure RPM