Trouble with digitalWrite

Hi, I'm new to Arduino, and I'm trying to write a program that acts like a monostable circuit. I've written the following code that was supposed to run a motor off pin 5 if pin 8 has power applied to it. so far it is not working - I do not appear to be getting power at pin 5. any thoughts about what I'm doing wrong?

int motorPin = 5;
int switchIn = 8;
int val = 0;
void setup() 
{ 
  pinMode(motorPin, OUTPUT);
  pinMode(switchIn, INPUT);
 
}

void loop() 
{
  val = digitalRead(switchIn);
  
  if (val == HIGH)
  {
    digitalWrite(motorPin, HIGH);
  } 
   
}

The motor may require more than 40ma which the pins can't supply. You need to drive an external source with the pin instead.

The Arduino pin may be damaged also.

Read these before you proceed:
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html
http://www.thebox.myzen.co.uk/Workshop/Motors_1.html