Tacit Modification for Blind Friend

Where can I learn how to control the vibration of the motor and have it spin faster the closer an object is?

Should be pretty simple to interface a small vibration motor as they draw little current. You would use a pwm output pin and use the analogWrite(pin#, value); to set the motor speed in your sketch code where value = 0 would be off and value = 255 full speed. The following circuit would show you the electrical connections you would need (the motors two terminals would replace the solenoid shown in the picture). You may have to find the actual pwm value where the motor just starts to turn as starting at 0 might be too low a starting value.