Waypoints Game (for Arduino)

The Project

A few years back, I read a story about a guy who made this box. On the outside of this box, there was a screen and a button. When the button was pressed, the screen showed a distance in Miles. There was no direction.

This same guy took his girlfriend out one day, with the box. He made a rule for the box - you could only have 10 button pushes. He choose a special spot for them both, and they took off. They found that the trick is to draw a circle on the map that matches the given distance around your current location. With enough circles, they made it to their waypoint. The box unlocked, and inside was a ring. Engagement, huzzah!

I wanted to make the same thing since I’m becoming gifted with dealing with GPS and coordinate based systems. I wanted the experience and more importantly I want to play this game with my friends soon. No engagement rings, or even unlocking functionality here - my game would involve a prize buried at a location!

Getting Started

Like most Arduino projects, this is not going to be a complete solution for you and your hardware, unless you copycat my setup. I choose an older Arduino UNO SMD edition, an EM-406A GPS Module, and a Parallax LCD Screen (With Backlight).

Grab the code from the Github repo and get that uploaded.

You’ll need to hook these all up and have them working independently prior to dropping in the code. When you have the components working, change some of the variables in the top of the INO accordingly. Then turn it on and TADA, Waypoints Game!

Technical

This project thought me a good chunk about how to handle multiple serial devices with Arduino. For the GPS, I use the hardware UART because of it’s reliability, and for the LCD I used SoftwareSerial. The GPS was returning a ton of garbage data for me at first, so I tried writing the implementation in lower C (meaning less Strings, not no Strings) and now it works absolutely wonderful!

If you choose the same GPS module as me (which I recommend, it’s a workhorse of a module), I recommend running this bit of code before you jump off:

Serial.write("$PSRF103,01,00,00,01*25\r\n");
Serial.write("$PSRF103,02,00,00,01*26\r\n");
Serial.write("$PSRF103,03,00,00,01*27\r\n");
Serial.write("$PSRF103,04,00,00,01*20\r\n");
Serial.write("$PSRF103,05,00,00,01*21\r\n");

That will disable all the GPS messages other than the GPGGA sentence, which contains all the data we need.

It doesn’t work!

This project was made for my pleasure and wasn’t created with dynamic use cases in mind. Therefore, some things may be static for my setup (I think my altitude code may break things) and need your own craftiness to mend. Just fork and tweet at me if you change some things to make it work better for you - I’d love to hear your milage!

The Game

Requirements

  • Assembled & working Waypoints module
  • Working Vehicle
  • Paper map of your locale, with clear scale
  • A directional compass and a drawing compass
  • Something to write on

How to Play

Waypoints is a challenging game. You’re absolutely going to need at least 2 or 3 people per team, depending on the technical understanding of those team members. It can also be a very expensive game, since it deals with a fair amount of driving.

It can be played against other teams or against a clock. Other teams creates a pretty awesome competitive edge! If you’re playing against other teams, make sure all the Waypoints modules are going to the same location and spread people’s start areas a few miles apart.

Once the game gets started, start driving! Then power on your Waypoints module. You’re not going to know which direction to go until the Waypoint module beeps. Make sure one of your teammates knows where you are on the paper map and is ready when the Waypoints module gives the first distance. At this point, another team member should draw a circle with a radius of the distance given around your current location. You’re still not going to know which direction to go - so at this point, find the closest road to turn on that goes another direction and get going! The next time a point shows up, do the same thing with the circle radius on the map. Now you should have two circles on the map and it’s time to use discernment to determine which way to go next. The two circles should intersect somewhere and you should make your way to that area. Try to think about who chose the point and where in that area they’d want to go… Also remember that your target is going to be somewhere near a road (this only applies if whoever chose the point isn’t a jerk). The winner is the first team to get to the objective. Or if you’re playing with just one car, everybody wins!