How to programme Arduino Leonardo with magnetic pick up sensor?

RS Stock No. 304-166
Manufacturer RS
Mfr. Part No. 11422-050
http://malaysia.rs-online.com/web/p/magnetic-pickups/0304166/?origin=PSF_421345|cav

The magnetic pick up sensor is used to sense the magnet from a propeller which immerse in a beaker filled with water. When the water is stirred, the propeller turning as well. I want to programme the sensor from reading up analog signal and digitize to digital signal. I need help on programming code. What should i define # and write under void()?

0900766b8002baec.pdf (512 KB)

0900766b800319c3.pdf (1 MB)