I have a rotary encoder,can the rotary encoder be used as an RPM meter, my hope is to be able to know the number of revolutions to the left or right in the form of RPM which shows the number minus if the rotation to the left and plus if the right rotation.
Usually that can be made. It depends how fast your object is rotating and what resolution the rotary encoder has. A rotary encoder with a resolution of 400 steps per rotation measuring a motor with 100'000 rpms won't work. As you failed to provide a link to the hardware you're using (the rotary encoder) and also didn't specify the RPM range we're talking about, we cannot give any further help.
Here are a couple of sketch examples I've used to handle tachometer control with an encoder (400 pulses per revolution)Z
can the rotary encoder be used as an RPM meter
here i try with proximity sensor that thank you for sharing knowledge,here I am trying with a proximity sensor instead of the encoder,I tried it based on references from the websitehttp://www.hobbytronics.co.uk/arduino-tutorial6-rotary-encoderfrom this source the pulse signal is generated if each time the A signal pulse changes from positive to zero, we read the value of pulse B. We see that when the encoder is rotated clockwise, pulse B is always positive. When the encoder is rotated counterclockwise, pulse B is negative. By testing both outputs with a microcontroller we can determine the direction of rotation and by counting the number of pulses A to what extent it has changed.Is this working pattern the same as the one you made?