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;}

Arduino Sketches


I just decided, to publish some of our sketches. Some are brand new, some older. You’ll become aware about, because only the newest ones are based on multiple tabs inside the Arduino IDE. Just download the ZIP file and unpack into your „normal“ folder. If one folder is containing more than the INO file, having the same name as the folder, this sketch is based on multiple tabs.

Last advise: It might be you must change the Arduino board (under „tools“ inside the Arduino IDE) to the one, you’re using...  

Last update of the sketches: 19/1/2019


From here you can pick them:

Running sketches 

  • Altitude - This cache must be taken some feets up (a tower) or downhill. More here...
  • Crazy Potis - You must turn 4 poties (= potentiometers, changable resistors) into the right position. But the correct position of one poti will be changed by the current position of the others. This sketch has a very nice graphical interface (on a 4x20 LCD) for the potis and needs some thinking prior turning… More here...
  • Dancing Cacher - This one is working with super sonic distance measurement. The cacher has to come close and step back from the cache a lot of times prior the code is displayed. A fun cache! More here...
  • Fire and Water - First the cacher has to show fire from a lighter to a flame sensor and then pull some water into a tube. More here...
  • Reverse GPS - So many Reverse GPS have been built. But this was my first Arduino based cache. More here...
  • Laser - Working with laser diodes for a great show. The cacher has to answer some questions about lasers. Final one laser will beam to the final hide. More here...
  • Light the Hole - The cacher has to light into some holes in the right order. More here...
  • Multiple sensors - This cache contains of multiple sensors for sound, light and magnetism. Also a key must be pressed long enough but not too long. At the end the whole box must be pinned. More here...
  • Resistance Measurement - Not a real cache but a nice sketch to measure the resistance (e.g. used in Fire & Water) More here...
  • Smart - Simon says - Who desn’t remember this game? In Germany it was called „Senseo“...More here...
  • SMS Antwortmaschine - SMS answering device - (New version 2017/11/26) This is what it is - an Arduino based SMS answering device. I combined it with a lot of my caches e.g. to deliver hints. The cacher must send a specific code (e.g. #GC123456#S01 - # mandatory to deselect all received SMS not starting with a #, GC code, # as separator, S01 for station 1) to immedeately receive the hint by a SMS sent back to him. New Version 2018/03/29: During the night from 03/24 to 03/25 in Europe we switched to DST (daylight saving time). Unfortunately the sketch dirdn’t worked. I’ve built a complete new algorithm, which you can understand looking into the Excel file also included into this pack. What to say? Now it’s working! More here...
  • Temperatures - This cache has been already built by a lot of people. First you have to decrease the temperature and after that to increase. A nice feature is that this cache automatically changes from summer to winter mode. More here... 
  • Test Time - A questionaire about Geocaching. 10 questions must be answered up to receiving the code. After each wrong answer the questionaire is going 2 steps back. More here...
  • Twins - Idea stolen from Steven O'Gara, but a great one: At 2 stations a button must be pressed at the same time. Caches are sending and receiving RF signals. No cache for the lonly cacher. More here...
  • Virtual Flight - RFID cards must be placed in the correct order to get the cache opened. More here...
  • Wire Loop Game - A loop around a wire must be moved from the start to the end without touching the wire. (Update 3/22/2017: Tim and me had a lot of problems with the servo. Now it’s running fine. This is version 2 of the sketch. More here…) (Update 3/23/2017: Just received a „100% perfect“ (including 2 LEDs) from Tim. So a new version is ready for download.)
  • JumpRun - An easy jump & run game only needing a button and a 16x2 LCD. More here...
  • Birduino - (new version 09/09/2018) The first touch TFT cache. Including the URTOUCH and a modified UTFT library (to be used with the actual Sainsmart 3.2 touch TFT display. More information you can pick here
  • Casino - My second touch TFT cache. It’s inpired by „one-armed bandit“. Also including the URTOUCH and a modified UTFT library (to be used with the actual Sainsmart 3.2 touch TFT display. More about the cache itself here.
  • NTP_2_RTC - This one was done for fun and to learn. You need an Arduino Uno, an Ethernet shield, an RTC3231 real time clock and a 4x20 LCF display. Time and date is shown and you can set the time of the RTC via the internet from a NTP server. More about this exercise here. I just (12/23/2016) uploaded the latest version. Z_LCD is including the new version to center text on the display…
  • Time_Stamp - A two station multi as described here. The LCD subroutine now has a new function LCDCenter() to „automatically“ center text on the LCD. This update is also in Z_Common_Subs below. If you want to use it with previous sketches, you have to replace the file inside your folders…
  • Frequency - After months of work, I prevailed! More here
  • Tone_Key - A supporting sketch for Frequency. It’s a simple tone generator. More here
  • AlarmSystem - A bilingual alarm system checking two different rooms but with one single system and siren. The Z_LCD() subroutine was updated to avoid flickering, when inside a loop the same text is displayed. Some values can be choosen by a button without changing the code of the sketch. Values are stored inside EEProm and will exist even after rebooting. Last not least: A Arduino Mega used, because I needed 3 interrupts. More here
  • Flashing LEDs - A cache with nicely flashing rainbow LEDs and a puzzle also based on LEDs. More here
  • M&M Dispenser - A game for the kids based on the game „Simon Says“. For a reason, I didn’t understand up to now, I needed to declare a variable of Wait_a_While() different. It was working great as „integer" in all the previous sketches, now I needed to declare it als „long“.
  • Across the River - Flussquerung - (New version 09/09/2018 - now with the possibility to change the language at the beginning) A brainteaser cache. See more here… 
  • Snake Cache - A cache with a touch TFT based on the famous SNAKE! game. More about here.
  • Useless Cache - This is a cache based on the „useless machine“ principle. It’s running with 2 servos, a LCD and a switch. More about here
  • Mathematica - A cache where you need to decide, wherther formulas are correct or wrong. More about here.
  • Leiter-Spiel (Ladder Game) 
  • Moving LEDs
  • Pixel Chase Game
  • Green / Grün 




And here’s the folder containing my „sub sketches“:

Please be aware that there’s no change of the packages above, when I’m changing the sub sktetches only. So it’s a good idea, to download the sub sketches, when I did updates on them and to copy them into the folders of packages.

This folder contains (at this moment) the following sub sketches:

  • Z_AVG: This routine calculates the average of a probe of up to 10 samples. First replacing „non valid“ probes. It’s very good if most of your samples are very close to the others, but some few are quite different.
  • Z_Better_Seed: If you want to have different random numbers all the time the Arduino is starting, this is a much better way as to take the signal from an unused analogue pin, as proposed all the time in internet.
  • Z_Better_Timer: A much better approach than the usual ones, if you need to have a timer inside your sketch. New version: The screen will only be shown, when the time changed.
  • Z_FreqMeasure: A new subroutine to determine the frequency of a tone fetched by a microphone. Much more difficult than expected… Read here...
  • Z_LCD: To show text in different manners on a 16x2 or 20x4 LCD. New version with LCDCenter()If you want to use it with previous sketches, you have to replace the file inside your folders… New version with automatic scrolling of text longer than the columns of the display. Read here
  • Z_Mic_Calibration: A subroutine to use to calibrate a microphone. Read here
  • Z_TFT: To work with a TFT monitor
  • Z_Visitor_Count: If you want to count e.g. the visitors. Maybe the way to store values inside the EEPROM of the Arduino when powered off is interesting for you.
  • Z_Wait_a_While: Using delay() is stopping the Arduino. That will cause even a timer stopping. Instead of delay() I’m using this very small sub sketch all the time.
  • UTFT fonts
  • Z_Stepper: A subroutine to work with a stepper motor. You only have to define the speed and the angle to turn. 
  • new: Z_GC_Logo: Because the bGeocachingLogo.h library isn’t working, when the LCD is connected via I2C, I wrote my own version. If you want to see, how I’ve integrated that into a full sketch, download the „Mathematica“ sketch.


More about on Tims page here...

If you want to use the the displasplashscreen() subroutine showing the GC logo on the LCD, you must add the library GeoCachingLogo to your libraries folder. You can pick the library from Github. It’s open source, not written by me… 

If you don’t want to use it, comment the whole subroutine in LCD.ino and also the reference to that library on the top of the main sketch.

But you can also pick it here:



©  Olaf Goette 2008 - 2022