This is the page dedicated to the laser tag course. The purpose of the course is to teach people how to build laser tag. In order to build laser tag, you need to learn about electricity, programming, logic and how to control an arduino. The hope is that after doing that, students will learn that this isn't hard. In fact, they can build whatever they want. That is the ultimate goal, empowering others.
This is a lab course. There will be a lesson followed by a hands on lab that reinforces the principles taught in the lesson. This course starts with lesson 1 and lab 1, goes on to lesson 2 and lab 2, etc.
Before we dive into the actual lessons, here is a brief overview of what we need to do in order to build laser tag. Laser tag is essentially played with a device that communicates using light. We will use an arduino as the brain of our device. We need to attach a light, a button and a receiver so that the arduino can send signals, receive input from the user and receive light signals. We need to tell the arduinos what the light means in order for the arduinos to communicate. Once the arduinos know how to talk to each other using light, we can decide what we want to send to each other in order to play a game of laser tag. Once we pick that, we tell the arduinos what to do when you push a button or get tagged by another player, and off we go to play laser tag.
Game 1: Go play! Try out the laser tag game you built. What do you like? What don't you like? What would you like to add?
Seventh Lesson and Lab. These cover changing the code so that the unit only sends a tag when the button is pressed (not if the button is held down). It also introduces using functions to make your code easier to read and use.
Review 1: Have them re-create the code using the finalized code with comments
Have them show how to wire the LED, button, IR receiver.
What resistors to use (give them R=V/I, and say what current and voltage should be).
All things that you could add from here (in order of adding): (Note: add links between lessons and labs so that people don't have to come back here to go from lesson to lesson)
8. 7-seg LED's - how one works
9. multiplexing, I2C, how to connect the adafruit 7-segment LED
10. Timing, serial communication, debugging
11. Sending a 0 or 1 (UAM) instead of 'tagged' or not. Displaying that on serial monitor
12. Putting it all together: finite state machine diagram of current system (show a street light. have them make the FSM for laser tag)
4. Lenses - increasing tag distance
4.5 Bug fixes - adding code so that you can't hold down the tag button. (or can if bit disabled...)
5. RGB LED - Teams
6. Teams - To do this, you need to: time how long someone sends a pulse. Have people send their team ID in the send tag function. (you could send a longer/shorter pulse for 0, 1, 2, 3 (2 bits per pulse sent) or just start with two teams and leave it at that).
7. Bases - Respawn - For simplicity, bases could always be team 0 (or team 3). They constantly send out their team ID every second, and if you receive a tag from that team, then your health goes go max.
8. Runes - Add max health rune. If you receive a tag from a max health rune team, you get +1 Max Health and +1 current Health.
9. UAM - Abilities - add to the tag so that you are now sending: team ID, UAM. You will also need to add cooldowns for this. When your ability is off cooldown, an LED lights up, and you can push a button to use it. First ability you can add is: heal. can only heal other people to max health. (self cast by pressing twice?).
7-seg LED - indicating health?
LCD - indicating health? Ammo? cooldown? etc?
And gate to make all IR receivers on same pin. Pro's: more pins. Cons: all signals come to one. probs not big deal as long as you aren't being tagged by multiple people...
1. Playable - Health. Add both health tracking
Lesson 4 - Health. You want to add a global variable of health that counts down when you are hit. You also have to have more than 0 health to send tags. This makes a game of laser tag. Tag the other person, and when they are out of health, they are out.
After that, you want to indicate how much health someone has. You can have the LED dim based on health using analog write and map. (you could change this to a bar graph, 7-sed led, or something else later if you want).
2. Lesson 5 - Sound. You want to add a piezo speaker to make sounds when you send a tag, receive a tag, and can no longer tag. You can also make a sound to indicate that you are out. Let them experiment with sound.
3. Lesson 6: Transistor - increasing current to increase tag distance
Now go build something.