Hello! Thank you for all your reply! I'll be happy to try them later
Updates:
- I tried using H21A1 opto-interrupter for rpm measurement. I detached the LED and transistor and placed them side by side.I used a 220 ohm pull up resistor on the anode side of the sensor, then I placed a 100K ohms resistor to the collector side and connected it to [digital] pin 12 of my arduino. The reading was stuck to zero so I changed the pin to A0 and got a reading from 200-300. I was happy. Then I tried running black and white stripes to the sensor; for the white area, I used the shiny part of a double sided tape. Nothing happened. I tried other shiny things but nothing happened. I moved on. I guess point-to-point IR is the solution so I tried it. I used pin A0. It reads 0 when there's no object blocking the beam and 200-300 when there is. I was happy (again. well, it's something) but then when I read the code from pyroelectro.com and learned that it uses attachInterrupt-- for digital pins 2 and 3 only here-- I cried.
So... Masters, can I use a line tracking sensor instead? I found this link and maybe this (http://www.seeedstudio.com/wiki/Grove_-_Infrared_Reflective_Sensor) is the answer crossfingers