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

4th JC The Twins

4th Joint-US-GE-Cache „The Twins“ (GC???) 

At this moment only a first glance of an idea:

  • A cache which can’t be solved by the „lonly cacher“
  • 2 Stations quite nearby
  • both with a key to press
  • when pressing, the stations says „Great, but you need to press the key at the other station…“
  • same with both stations
  • only when the key is pressed at both stations the same time, the cache (station 1) will be unlocked


It’s not my own idea, because I saw this on YouTube:

As ever: By clicking the YouTube button, you can watch it in 1080p…

And just realized, Tim just left a comment on it…


Realized by 2 Arduinos with nRF24L01 receivers and transmitters (already lying around at me).


Update 28.10.2015

You just sent me a short eMail from your "The  Broadcaster of the Year award“ stating, that you would like to built this cache… So, let’s start!

Unlike me, you received an answer to your post at YouTube and Stephen sent his final sketch to you. I had a short look to it and it seems to be not so difficult. But I’ll start to rewirte it, so our subroutines for the LCD display, the GeoCaching logo and Wait_a_While() (replacement for delay()) and some other existing voids can be used. His programming is a little bit „spaghetti code“...

I just ordered the nRF24L01 transmitters. 

im120606002 7 1


You can order them from Amazon US, while I needed to buy at eBay. In addition I ordered some LCD displays, because I’m "running out of stock" at home. 

I’ll try to set up with Unos. I was very close to order 2 Uno clones for €5,25 each from the same seller, but fortunately I had a closer lock to the picture:

$ 57

 

This Uno clones are offering a mini USB port instead of a „normal“ one. I had problems to connect to the Nanos (on OS X and Windows7 as well) I bought recently. They also came with mini USB ports. So I didn’t ordered that clones… But I ordered some breadboards, because for testing I need to built two stations of the cache.

Regarding the housings we’ll have a lot to discuss. But why not birdhouses???

I decided to skip the lunch today (nothing offered, I would love to eat) but to work on the sketch. I think, I did a big step ahead. I didn’t uploaded the sketch to an Uno, neither tested it (transmitters need to arrive), but I finished the „alpha version“ (no errors during compling). I’ve put it into DropBox and you „are allowed“ to test, if you want.


Update 29.10.2015 (at the morning)

There is a clever idea inside the sketch from Stephen: Instead of dimming the brightness of the LCD by a resistor, he did it using the Uno. Here’s the complete Fritzing:

Twins


As you can see, I also successfully integrated the first „my own part“ into the Fritzing library. It’s the RF24L01 transmitter. All stuff you can pick from our shared folder inside DropBox.

Unfortunately Stephen didn’t explained his sketch by a lot of comments inside. So the wiring of the key is a „best guess“ at this moment. I’ve still some large keys available with a LED inside (perfect for building a Simon Says). Maybe I’ll update the Fritzing and the sketch by integrating the LED of the key…


What happened up to now? (2.11.2015):

I think, the sketch is more or less ready. The RF modules arrived, but I had no time to work on it. If there was time, we worked on our 2nd joint cache - the GPS one. But here’s already an ideo of the certificate:

Schnappschuss (2015-11-02 09.34.36)



1st prototype ready (6.12.2015):

Meanwhile I worked on some other topics, but this weekend I finished the prototype of the twins. It was a hard road to go:

  1. Quite soon I wired the LCD and the RF24 (exactly the nRF24L01+) to the Uno and started the sketch. When initializing the RF24, the program (sketch) stopped at the command line „Mirf.setup()“. I tried a lot of things, but no success.
  2. I mailed to Steven O’Gara, who realized that cache already, but he wasn’t able to help me, because his cache was outside and so he wasn’t able to answer my questions. He gave me some hints and I started googeling…
  3. I discovered that for the RF24 break out a lot of different libraries are existing. Some better than Mirf.h, but I didn’t want to rewirte the whole sketch. But I realized that the channel the RF24 is using can be changed. I did it, but no real success. By looking into an example sketch coming with the library, I discovered the first big mistake. Everywhere is stated, that the RF24 must have power ( 2 pins) and the CE and CSN pins are variable (usually set to 9 and 10). This means 4 pins in total. But there’re 3 more pins (MOSI, MISO and SCK) which must be connected with pins 11-13 of the Uno. Unfortunately I’ve used pins 11 and 12 with the LCD. Now it became obvious, why the sketch stopped. Quite probable, that the LCD on pin 11 and 12 didn’t replied what was expected to come from the RF24.
  4. Fortunately I optimized the LCD part inside the sketch, so it was very easy to rewire. After that the first twin was running.
  5. I soldered another LCD. I decided to exactly use the same colors of the jumper cables as with the first one and also I did with the second RF24. It took less than half an hour to have the second twin running.
  6. But I discovered a strange behavior: Even not hitting any button, sometimes I received the success message on one of the twins. I tried to understand the sketch regarding pressing the button, but I was not able to realize it. I’m guessing it was more or less used as an reset button. So I totally reworked the button part. If the putton is pressed, roughly 4V are sent to pin A5. I inserted a test message into the sketch and I discovered that without pressing the button an analogueRead gives a value between 150 and 500, with the button pressed a value > 1200. So I defined a threshold of 1000 to decide whether the button is pressed or not. After that the prototype is running well.


Here’s a video of the first prototype (If you want to watch in 1080p, klick on the YouTube button on the bottom of the clip):


As ever: By clicking the YouTube button, you can watch it in 1080p…

And here’s the Fritzing (updated): 


screen-capture


The code is running a little bit different as expected. If the button on one twin is pressed, the success message appears on the other twin. At the moment I’m thinking that’s a benefit, because also the lonly cacher is able to solve it: Press button on twin#1, go to twin#2, read part 2 of success message, press button on twin#2, go to twin#1, read part 1 of success message… We need to discuss, if you’re seeing it like me or if I should try to make it different: Both keys must be pressed at the same time…


Optimizing… (7.12.2015):

But I’m already thinking about that and I’m starting to optimize the cache:

  • Sketch should „hold“ the button by software so the code should be shown quite better.
  • I’ll include a „flag“ into the sketch to make it working as described above or in the way, we thought about in the beginning: Both buttons must be pressed simultaneously.


I’m calling it Twins2 and will rename to Twins when really working fine.

And I just renamed, because it’s working fine:

As ever: By clicking the YouTube button, you can watch it in 1080p…


You can pick the full sketch here





©  Olaf Goette 2008 - 2018