Feasability / Accelerometer advice

Hi all. I've had a arduino UNO for a few weeks now and have been enjoying tinkering with it, following the tutorials etc... Now I want to put it to use in a www.geocache.com project. What I want is for the finder of my box to tilt the box in a specific pattern to unlock the box.

I was thinking along the 4 edges of the top of the box will be a row of LEDs. (1 side red, 1 side green, 1 side blue, 1 side white) The finder will get clues over the course of the adventure, and at the end they will have a set of clues like: red, blue, red, green, white, red. After tilting the box in the right manner all the lights blink and a servo unlocks the box.

I see Sparkfun has an accelerometer http://www.sparkfun.com/products/9269 for $25 and I see this one http://www.robotsimple.com/MMA7341L_3_Axis_Accelerometer_3_11g for less then half that at ~$12. They both require voltage between 2.2v and 3.6v. I guess I can connect these to the 3.3v pin on the UNO? Is one of these accelerometers better then the other, or any caveats I'm missing?

Any advice or code help will be greatly appreciated.

DJ

Thye look very similar and you have not got much in the way of a demanding application so I would go with the cheapest one.

You should use this for 5V arduino uno and look at my project of music box.

http://shop.moderndevice.com/products/mma7260qt-3-axis-accelerometer

I used each side of a box as a music note when the box is oriented with that side up and knocked. I have the idea to make it into a geocache that unlocks when knocked in the correct faces up sequence but didn't have time. The accelerometer I linked to is what I used. Works great and cheap. Ditch sparkfun.

I guess you'll be continuing what I didn't finish. I might be able to find my code for you if you want it. All you need is to make up a different password and attach some servo to open a box instead of playing a bonus song after the password is correctly entered. Besides, I don't have a nice box for geocaching either. I really would like to see this project come to life but there are other things that I need to do, so ...

Thanks for the advice. I like the knocking idea, and the music box is awesome. I've got my accelerometer on it's way. I have a neat wooden box I found at Goodwill and it fits perfectly inside a 50cal ammo can that I can chain up somewhere. I may hit you up for some code help if you don't mind.

My goodwill has nothing worth my money. I did buy a used ac adapter from them though but that was it. No boxes (yes I checked). I'm on a conference so I'll dig up my complete code when I get back and post on my blog. So then if you want, you can take it. I should be able to help since I still have the hardware and will review my code. My code is always better than your average find online :wink:

I've updated my question on the forums now that I've actually had time to fiddle with my accelerometer and streamlined my idea some.

http://arduino.cc/forum/index.php/topic,68736.0.html

I had a rough idea of what I wanted to do before, but now after seeing your music box liudr, I've kind of merged the two things.

I'm finally back from my trip and will upload the code so check back on this thread in a day at most :slight_smile:
If you have some artistic skills (unlike I who has none), you will do well on this project. You can make your treasure finder dance with joy when they finally open the box and maybe find an arduino uno inside and a few pointers to get them started with similar projects :slight_smile: