Serial port not selected Error

Hi All

I am trying to run the project number 14 on this page :

but I get an error when I run the code :

Arduino: 1.8.8 (Windows 7), Board: "Arduino/Genuino Uno"

Sketch uses 1942 bytes (6%) of program storage space. Maximum is 32256 bytes.
Global variables use 184 bytes (8%) of dynamic memory, leaving 1864 bytes for local variables. Maximum is 2048 bytes.
Serial port not selected.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Go to the Tools menu in the IDE and select the port that your Arduino is connected to.

Thank you so much ! yes that was it

but now It uploads the code but nothing runs

Farzadtb:
but now It uploads the code but nothing runs

What code? Post your program if you want help with it.

How do you know that nothing runs?

...R

The motor had to run for 3 seconds and stop for 3 secs on a loop. I actually had connected the transistor leg to the wrong end of the diod, now it works thank you