max with a rotary encoder

Cheers for the code!

Can you give an example of a sketch to implement this?

Not sure how I can include this in my loop.

Cheers

Gareth