Motor and sensor

maybe but in try here to make a constant value fo speed for the motor