Arduino w/ADC for reading a voltage output propotional to length., and changing directions.