starting a vibrator motor

can you please show me in the code..i am unable to get the exact picture.