lesson3laser

Laser Shooter Tutorial

In this tutorial you'll create the firing circuit for your laser shooting game! Below you'll find a diagram and link to the code.

WARNING Lasers can cause permanent damage to your eyes. DO NOT look directly into the laser when on or point it at another person's face.

Set up

    1. Open your Arduino software on your laptop
    2. Use a USB wire to connect your Arduino board to your computer
    3. Select the Arduino under Tools > Port

Schematic

When you setup the Arduino it's very important that all the wires go into the same spots as shown below. Also the laser is like the LED, it only works in one direction so if the laser isn't working try flipping it around.

In the schematic you'll see a lightbulb instead of a laser. Instead just plug in your laser using the wires on the left and right of the laser's circuit board (the outside wires).

Code

For this tutorial you already know everything you need to know to make a laser shooter! In fact you can use the buttons tutorial's code! But try writing the program yourself. Otherwise you can find the code below to program your arduino! Simply copy this file into your Arduino editor and upload it!