I have a project in mind for which I need to detect the location of a physical marker, which then causes an output particular to that location. Imagine a game board with 31 locations. I need to detect which location a user places the game piece upon.
Creating a connection which would be closed when the marker is placed upon the location seems like one way, only I don't know how to extend this to multiple locations. I need to detect if marker is in location #1 versus location #15.
Any thoughts on how this might be done?
Is there another platform upon which this might be more easily done?
Well, it's not really a game. That was the easiest concept I could think of to explain it.
It's more a calendar type thing. The user moves an object to the current day, which lights up an LED, and a 16x2 liquid displays shows a message for that day. I'm hoping to use primarily wood, both for the calendar portion (which would be essentially be a long chunk of wood marked 1-31) and the marker also primarily of wood, approx 2.5" by 2.5" or so.
I guess once you've arranged for the markers to be placed and stay in position you could affix a magnet to the back of the marker and have a hall switch in each day which switch would be activated by the marker. The hall switches could be either one long string of parallel contacts to a PISO shift register register or be arranged in a matrix pattern.
I think I have what I need to get to the next step. I appreciate everyone's input. I had never heard of a hall sensor (but I have one on hand, luckily!) and I'm going to try that. The "exact" location is a conundrum I'll tackle later, if necessary, as I think code will get me most of what I'm after.
If you arrange magnetic reed switches in a matrix you can use the Keypad library to scan the matrix and report the position of the marker. This would allow 31 positions with 12 pins (6x6=36 or 5x7=35 or 4x8=32)