Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Building an Arduino-based laser game, Part 3: Transmit, and that's a hit

Jump-start your electronics projects with the open source hardware and software platform Arduino

Duane O'Brien, PHP developer, Freelance
Duane O'Brien has been a technological Swiss army knife since the Oregon Trail was text only. His favorite color is sushi. He has never been to the moon.

Summary:  Arduino is an inexpensive, easy-to-use electronics platform. The entire platform, both the hardware and the software, is completely open source, and the language is loosely based on C/C++. Arduino was built for makers, tinkerers, and artists who want to take the plunge into creating interactive physical objects. This three-part series starts with basic Arduino hardware and uses it to create an interactive laser game called "'Duino tag," where players can play tag using devices built nearly from scratch. In this final part of the "Building an Arduino-based laser game" series, you'll build the transmitter and complete the 'Duino Tag gun.

View more content in this series

Date:  24 Feb 2009
Level:  Intermediate PDF:  A4 and Letter (288 KB | 23 pages)Get Adobe® Reader®

Activity:  10833 views
Comments:  

Before you start

Whether you're new to Arduino or a seasoned builder, this project has something for you. There's nothing quite as satisfying as creating an interactive physical object, knowing that if it breaks or needs modification, you know where all the parts go and how everything works. The 'Duino tag gun is a great project to work on by yourself or with friends. To complete this project, you should at least have a basic understanding of electronics (you should know what a resistor is, but you don't need to know the science behind one) and have an understanding of programming (you should know what loops and variables are, but you don't need to be able to parse Big O Notation). Don't be afraid to jump right in.

About this series

In this series, you use Arduino technology to create a basic interactive laser game called 'Duino tag:

  • Part 1: Learn some Arduino basics, lay out the project, and do an experiment that will help you understand how infrared works.
  • Part 2: Build and test the receiver part of the 'Duino Tag gun, including the testing.
  • Part 3: Build the transmitter and complete the 'Duino Tag gun.

About this tutorial

To follow along, you don't need any electronics experience, although experience working with electronic components can certainly serve you well. If you've worked with microcontrollers, you'll have an edge, but keep in mind that the Arduino platform is well suited for people without that experience. Above all, you should be willing to stretch your skills. Working with electronics and microcontrollers can be rewarding. Most software engineers don't get a chance to write code for devices that interface with the physical world, and Arduino provides a low-cost entry point into working with interactive devices.

This tutorial focuses on building the transmitter for the 'Duino Tag gun. The actual component assembly is minimal and won't take much time. You'll spend time working with the code to handle all of the firing needs for a player's gun. You'll learn what's needed to build a referee's gun and explore some casing options. This tutorial closes by suggesting some ideas for taking things beyond this series.


System requirements

For this tutorial, you need a few tools and supplies. See Parts 1 and 2 for a list, including the Arduino hardware and software. Following are the basic items needed for Part 3.

Infrared LED
Just about any would do, but the brighter the better.
Infrared sensor
This series was written using a TSOP2138YA Infrared Sensor (from All Electronics).
10,000-ohm resistor
Brown-black-orange markings.
82-ohm resistor
Gray-red-black.
0.1uF capacitor
You will need a capacitor of 0.1uF.
Switch
You need a single pole momentary switch.
Wire
Get 22 gauge, solid or stranded.
PVC or other rigid tubing
You need only a short length.
A small magnifying lens (three-quarters to 1 inch in diameter)
You can use a cheap plastic one, such as those given as party favors.

You can also get all these parts in one kit (see Resources).

A breadboard worked fine when prototyping the receiver, and you can continue to prototype your 'Duino tag gun with a breadboard. You'll need to solder everything together before you can put your gun into a decent case.

In Part 2, you got around needing a second gun by using a remote control to help test your receiver. Here, you need another gun or, at the very least, another receiver. It's not practical to try to test-fire and detect from the same unit. (It could probably be done, but it will be easier if you have two guns or a few friends on hand building their own guns.)

Before diving into work on the transmitter, we need to revisit the receiver.

1 of 9 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source
ArticleID=370753
TutorialTitle=Building an Arduino-based laser game, Part 3: Transmit, and that's a hit
publish-date=02242009
author1-email=d@duaneobrien.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.