How can i set the pin?

Look at the digital examples that ship with the IDE.

if (digitalRead(28) == HIGH) {