def run_on_change(callback, mv_change=10, interval=0.01, repeats=nil)
      AIN::run_on_change(callback, @pin, mv_change, interval, repeats)
    end
def run_on_change(callback, mv_change=10, interval=0.01, repeats=nil)
      AIN::run_on_change(callback, @pin, mv_change, interval, repeats)
    end
Runs a callback after voltage changes by specified amount.
 This creates a new thread that runs in the background and polls at specified interval.

 @param callback A method to call when the change is detected
 This method should take 4 arguments: the pin, the previous voltage, the current voltage, and the counter
 @param mv_change an integer specifying the required change in mv
 @param interval a number representing the wait time between polling
 @param repeats is optional and specifies the number of times the callback will be run

 @example
   # This polls every 0.1 seconds and will run after a 10mv change is detected
   callback = lambda { |pin, mv_last, mv, count| puts "[#{count}] #{pin} #{mv_last} -> #{mv}" }
   p9_33 = AINPin.new(:P9_33)
   p9_33.run_on_change(callback, 10, 0.1)