body, html {font-family: 'Open Sans', sans-serif;} #nav a, #nav{font-family: 'Open Sans', sans-serif;} #title #tagline {font-family: 'Open Sans', sans-serif;} #main .gridItem h3 {font-family: 'Open Sans', sans-serif;}

13th JC: Crazy Potis

Monday, 9.5.2016

Last Thursday was a public holiday in Germany and Friday a bridge day. So 4 days free and the weather was wonderfull: Sun only and up to 80°F. When lying in the sun after lunch on Thursday a new idea for cache flashed through my old brain: A cache with 4 potentiometers (adjustable resistors) which must be turned to the right value to solve the cache. But to make it more funny and difficult, 3 target values should be based on the actual values from the other potis. So the cacher has to investigate the order in wich he has to turn the potis. 

At the evening a very first prototype was finished and I asked you about by sharing this YouTube clip (as ever: by clicking on the YouTube icon, you can watch it in 1080p):

You answered, you would love it. So I worked on it up to Sunday. Sunday evening everything was finished, but one bug was still inside the sketch. I was quite proud about the display of potis on the LCD.

On Monday I discovered the bug. If you aren’t interested in knowing, just skip to read the next chapter….

The Bug:

I’m setting up each line of the LCD, which has 20 columns (0 - 19), with an array of 20 places. First I’m writing a „-“ into each place of the array, after that the „X“, „I“ or „*“ into one of the places.

Schnappschuss (2016-05-10 14.45.44)

My mistake was, that the loop went from 0 to 20 instead of 19. So I’ve wrote 21 values into the array I declared properly with 20 places. This isn’t an error, a compiler is able to check. But I’m knowing no other programming language, not offering a runtime error in such a case. Arduino IDE did nothing and it took a lot of time, to discover it. Solving took less than 5 seconds! Ok, again: Wo invented the Arduino IDE? Ah, yes! The Italians! Nothing to add...

On Monday evening I uploaded the final version to YouTube. This one is with sound, because I’m explaining a little bit:

I’m quite nosy about your comment...

The last days there was a little bit of time to start working on the final built. The housing will be an amo can again and the dashboard (correct word???) is finished. I’m quite proud about it. In addition I modified the sketch a little bit, to have different targets az each start of the program. This I did with a better approach to calculate random numbers.

Here’s a short video from it:


Sunday, 18.9.2016: DONE!

Today I finished the cache. Your idea with the countdown counter to show the hint, in which order to turn the poties is working great. 

You can pick the full sketch here

©  Olaf Goette 2008 - 2022