Sareno:
I was looking for a unipolar hall sensor that detects and counts the moments that the magnet passes it. This way I only have to detect once per rotation.
Why can I read 6 digital pins? The uno has 13 digital pins or do I miss something?
ATmega chips are 8-bit machines. The ports have 8-bit registers, the CPU can only work on 8-bits at a time.
Have you ever seen a pin map for an Uno?
Will the 1284P work together with an Uno or Nano?
The Uno is a board with a 28-pin socket that can use ATmega48, ATmega88, ATmega168 and ATmega328.
The Nano is a board with a surface mount ATmega328.
The ATmega1284P is a bigger microcontroller with the same CPU as the others, you can make your own Duino with one the same as you can with an ATmega328. 1284 is 328's big cousin, either can run on their own. The 1284P will let you read 8 inputs in 1 cycle, 62.5 nanosecs quick.
Nick Gammon shows how to breadboard either chip.
Anyway, it has to (edit) detect the revelations and once every 100ms or so, calculate the RPM.
Basically, it needs to detect how long ago the last detection was, this way I can calculate the RPM. So it only has to "remember" the last detection as wel as the shortest (highest RPM). Then, every 100ms or so, write the RPM to SDCard. Or into a variable and then once a 1 second, clear that VAR to SD.
If you try and time single detections you will end up needing to average 10+ since Arduino micros() has a granularity of 4 microsecs and interrupts have an overhead over 5 microsecs on top of the ISR code. Also the faster the magnet moves the stronger the effect on the sensor.
You want RPM 10 times per second? That should be 100's of revs to average out one time +/- 3 usec error.
How fast will these sensors change spin rate anyway?
For light, a slotted wheel can be laser printed black on transparency at an office store. The diameter can be smallish and one printed sheet can have many such on it. The wheel lets you be more accurate, divides error.