What I'm trying to do is automatically feed a metal rod into a bench grinder at maximum burn rate without stalling the grinder. I've been experimenting using a linear actuator controlled by a manual potentiometer, and I want to switch to controlling it with a button on an Arduino.
I want to use an optical tachometer to determine the speed of the grinder to tell if it's slowing down excessively/about to stall. I was going to use an IR reflectivity sensor to do so, with some black tape on the grinding wheel to change the reflectivity. It outputs high if black and low if not black or vice versa, I'm not sure. https://secure.robotshop.com/ca/productinfo.aspx?pc=RB-See-191&lang=en-US
Then I want to use a button to control a linear actuator. The linear actuator in question can be controlled with a voltage, with 5 volts being full extension and 0 volts being full contraction. I can use an analog out to do this. I'll reduce the voltage if the tachometer reports a stall coming on, and increase it if it's going too quickly.
individually, these seem simple enough, with tutorials for the former and the latter being straightforward. What I'm worried about is whether an Arduino can monitor a button and an optical tachometer at the same time; the button tutorial constantly loops to monitor a button. But then it seems I need to use attachInterrupt() to monitor the RPM which seems like it will prevent reading the button outputs. Is there any way to make this work?