Library encoder arduino. Counts up or down an counter depending on encoder rotation.