Go Down

Topic: How to ID Various Objects (Read 1 time) previous topic - next topic


Nov 06, 2012, 05:50 pm Last Edit: Nov 06, 2012, 05:54 pm by gelboy500 Reason: 1
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.


Nov 06, 2012, 06:11 pm Last Edit: Nov 06, 2012, 06:14 pm by wizdum Reason: 1

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.


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  :)
Don't PM me for help as I will ignore it.


Spam removed, spammers banned.
"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.
I speak for myself, not Arduino.


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.


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.

Go Up