digitalWrite(10,LOW); You are trying to make this pin LOW but you have not made this pin an output. Do this in setup.