Let's focus on the laser beam.....

http://www.keysigns.co.uk/images/warning-laser-beam-signs-p889-14769_zoom.jpg

We must be very careful when we handle laser pointers and laser beams. Remember, never to point the beam to your eyes or the eyes of any person as it may harm you or them.

Now let's return to our playing environment. First, we have to build the circuit below:


In this picture we notice that the Signal (red cable) is connected to D0 pin. Considering that D0 matches to number 16 in Arduino IDE our program will be as below:

void setup() {
  pinMode(16, OUTPUT);
}

void loop() {
  digitalWrite(16, HIGH);
  delay(500);
  digitalWrite(16, LOW);
  delay(500);
}

Copy the above code to the Arduino IDE and then upload it to the NodeMCU.
As you can see, the beam is blinking with a delay of half a second. Try to change the tempo and have more fun.