Go Down

Topic: analogRead (Read 818 times) previous topic - next topic

Delta_G

Larry that won't work because that makes all the left side terminals equivalent.  As long as you hook the right resistor to the right terminal on the right side then it doesn't matter what terminal it is connected to on the left side.
If at first you don't succeed, up - home - sudo - enter.

larryd

#16
Dec 07, 2017, 05:22 am Last Edit: Dec 07, 2017, 05:29 am by larryd
Right you are.




EDIT:
Look for 3.33V (681) on A0-A4


No technical PMs.
The last thing you did is where you should start looking.

allanhurst

There are 5 x 5! possibilities - 600 .

It might take a little while to play this game....

Allan

Delta_G

#18
Dec 07, 2017, 06:19 am Last Edit: Dec 07, 2017, 06:20 am by Delta_G
Right you are.




EDIT:
Look for 3.33V (681) on A0-A4

I like that one.  Avoids the other set of pins completely and leaves you only one number to look for.   
If at first you don't succeed, up - home - sudo - enter.

Bapstack

I do like that solution, Danny. Though I ended up going with what Delta suggested, since it only required I change one solder connection in order to work.

There are 5 x 5! possibilities - 600 .

It might take a little while to play this game....

Allan
Ha. Fortunately it's not a matter of simply guessing the correct answer. They are given more to go on. This is a small puzzle in an escape room.

TomGeorge

#20
Dec 07, 2017, 10:12 am Last Edit: Dec 07, 2017, 10:18 am by TomGeorge
Hi,
Or you don't mind using I/O.

But @larryd is more "elegant", leaves the other I/O to use for programming the solution.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Jiggy-Ninja

#21
Dec 07, 2017, 06:18 pm Last Edit: Dec 07, 2017, 06:18 pm by Jiggy-Ninja
Right you are.




EDIT:
Look for 3.33V (681) on A0-A4



I think this only works for a single fixed solution. Bapstack wants to be able to randomize it to have any arbitrary combination as the solution, which would require solving for the value of all possible voltage divider outputs that can be made. By my math, that would require a table of up to 53 (125) different values to be able to distinguish the full set of combinations (each of the 5 left-side terminals can be connected to any of the 5 right-side terminals with any of the 5 wires).

TomGeorge's solution looks much more workable. With all the pull-down resistors being identical and only the wire resistances being different, you only need a table of 5 values to determine which wire is being used. The endpoints of the wire are determined by which GPIO is active and which analog pin the non-zero output voltage is present on.
Hackaday: https://hackaday.io/MarkRD
Advanced C++ Techniques: https://forum.arduino.cc/index.php?topic=493075.0

Bapstack

For my purposes, I only need one correct solution, so Larry's proposal would've worked. But again, I had already made Delta's solution, but reversed (and therefore not functional). I was trying to use my digital pins as the Vin for my voltage divider, and then sending each of my analog pins, through a common resistor, to ground.

TomGeorge

Hi,
Can you post a copy of your version of Delta_G circuit?

Thanks.. Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

Go Up