Pages: [1]   Go Down
Author Topic: How to ID Various Objects  (Read 651 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey all,

I'm just starting off with Arduino, and needs some guidance as to how to approach a project I'm hoping to tackle.

Here's the hope. I have about 20 different blocks that will each have a unique sound associated with it. There will be a "base station" with 5 slots in a row. I want to be able to take 5 different blocks, put them in each of the 5 slots on the base, and have the Arduino play the 5 sounds in sequence.

From the research I've done, it seems i'll need an audio shield in order to play the sounds.

The bigger challenge - or at least the question I have - is how to get the Arduino to be able to identify the individual blocks. What's the best way to do this? What would be the best kind of sensors to use?

Help!!! Many thanks.
« Last Edit: November 06, 2012, 11:54:13 am by gelboy500 » Logged

Maine
Offline Offline
Sr. Member
****
Karma: 10
Posts: 413
Caution: Explosives in use.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

In fact I wrote some is not very good read, mainly because I'm lazy! Best to do so
Index = floater. Length;
Floater [index] = d.g etElementById (id);
...
...
Floater [index]. Style. Left = left + "px";


Wow, spammers are trying to blend in by posting code now... Impressive.


This could be done quite easily with RFID. You would need separate readers in every "slot" though.

I did something similar for a Capture the Flag prop, where the arduino needed to be able to tell what flag was in the flag holder. I put a set of pins on the bottom of the flag, and a socket in the flag holder. If the blocks dont have to be uniform, you could make some sort of 4 pin connector on the bottom, and give each block a unique pin configuration. For example, have 3 pins connect to input pins on the arduino, and the 4th pin connect to ground. Turn on the internal pull-ups on the 3 input pins. On block 1, leave all the pins unconnected, so when the block is "plugged in" the three input pins will read HIGH (because of the internal pull-up resistors). For block 2, connect the first pin to ground, and leave the others unconnected. Use a different configuration for the other 3 blocks.

If i'm just rambling, i'm sure someone else will come in here with a good idea.
« Last Edit: November 06, 2012, 12:14:25 pm by wizdum » Logged

"Anyone who isn't confused really doesn't understand the situation."

Electronic props for Airsoft, paintball, and laser tag -> www.nightscapetech.com

Norfolk UK
Offline Offline
Edison Member
*
Karma: 52
Posts: 2214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

In fact I wrote some is not very good read, mainly because I'm lazy! Best to do so
Index = floater. Length;
Floater [index] = d.g etElementById (id);
...
...
Floater [index]. Style. Left = left + "px";
So lazy you got the wrong post  smiley
Logged

Handle every stressful situation like a dog. If you can't eat it or hump it. Piss on it and walk away.

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24351
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Spam removed, spammers banned.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Boston
Offline Offline
God Member
*****
Karma: 3
Posts: 575
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just a thought, but if you only had 1 slot you could use an RFID reader.
Put 1 block in and take it out, then block 2, until you have done this 5 times.
Then sounds play.
http://adafruit.com/products/789
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11173
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

One option is to arrange for all the blocks to have a pair of contact pads on the base and connect them internally using a resistance which is unique for each block. In the socket put a couple of spring contacts which connect to the block when it is inserted properly. You might choose to put a lamp next to each socket and turn it on when you detect the block has been inserted, if you have any trouble getting a reliable connection.

Within the sketch, use the block's resistor as one half of a voltage divider so that you can calculate the resistance of the block and hence identify it.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1]   Go Up
Jump to: