Go Down

Topic: Communication between arduinos over 4 interchangeable pins (Read 1 time) previous topic - next topic

Coding Badly


PeterH

Does that mean that each end point will be in common with up to four devices, all trying independently to discover and identify each other? That strikes me as a very difficult approach to make work. I'd say you have a far greater chance of success if you put contacts on each face of the cube. I'd look for a solution which used asymmetrical contact positions to make it possible to know which contact was which, so that the 'discovery' part only had to establish a handshake between the two devices (that could be achieved by a collision detection/random backoff algorithm).
I only provide help via the forum - please do not contact me for private consultancy.

MichaelMeissner

#14
Mar 18, 2013, 07:24 pm Last Edit: Mar 18, 2013, 08:02 pm by MichaelMeissner Reason: 1
I would imagine rather than using multiple wires, a different approach might be to have a 4 wire connection to use i2c communication in a standardized location, such as the center of each face of the cube.  You would assign each cube a separate i2c address.  For each connection point, each cube would send out a query to the other cubes asking who its neighbors are, and the cube would then record who is each of its neighbors, and then when queried, it would respond, listing each of its neighbors.  The master would then build up a list in real time of the geometry.

<edit>
In case it wasn't clear, i2c is a 4 wire connection (ground, power, 2 data wires) where each device on the bus has an address, and you can transmit bytes, words, etc.

granmicky


Trying to visualize this. When you say cubic puzzle, I am picturing a rubik's cube, but you mention only 6 to 9 pieces, which is not enough. So, then I am thinking sliding puzzle, but that doesn't use cubes. So, I did a search and found photo puzzles, but couldn't find any example that would work with 6 or 9 pieces.

Do you have a link to a simple example?

The reason I am asking is because math is likely to solve your problem easier than trying to figure out how to communicate over different wires. When I was assuming rubik's cube for example, I was envisioning a way to simply complete a circuit based on position since a single piece is actually limited in the combinations it can be in.

There is likely a much simpler way using truth tables, if I could visualize this properly.


The puzzle should be something like this. http://www.finewoodentoys.com/files/3373883/uploaded/SG_farm_cube_puzzle_1.jpg
There's quite a lot of math worked out already in order to limit the amount of information being transfered and to make it easy to process by the arduino. But it always boils down to a cube transmitting thru each corner the id of the corner, the id of the cube itself and the info of the cubes connected to it and reading from each corner such information. Hope to make the project clearer. Thank you all!

Retroplayer

Trying to visualize this. When you say cubic puzzle, I am picturing a rubik's cube, but you mention only 6 to 9 pieces, which is not enough. So, then I am thinking sliding puzzle, but that doesn't use cubes. So, I did a search and found photo puzzles, but couldn't find any example that would work with 6 or 9 pieces.

Do you have a link to a simple example?

The reason I am asking is because math is likely to solve your problem easier than trying to figure out how to communicate over different wires. When I was assuming rubik's cube for example, I was envisioning a way to simply complete a circuit based on position since a single piece is actually limited in the combinations it can be in.

There is likely a much simpler way using truth tables, if I could visualize this properly.

Go Up