Arduiniana is a collection of useful Arduino software libraries, project descriptions, and (eventually) advice for writing solid Arduino code.  Here you’ll find the latest versions of NewSoftSerial, TinyGPS, Flash, PString, Streaming and others.

It is also the home of the Reverse Geocache Puzzle™.

This site is owned and maintained by Mikal Hart.  For more information, contact mikal <at> arduiniana.org.


Page last updated on January 14, 2011 at 9:15 pm
44 Responses → “About”

  1. Tim

    14 years ago

    Dear Mr. Hart,

    When I read about your reverse geocaching puzzle I was amazed. Not only by the articles on it and you by many websites that I follow, but by the amount of thought you put into the project. I would very much like to continue a conversation about the project and the use I may have for it in my future plans. If you would be willing to discuss this further, please email me at either timothy.j.engler08@business.colostate.edu or at noodlengler@hotmail.com. Thank you for your time and consideration. Good luck with any future projects!


    Tim Engler

  2. John Raines

    13 years ago

    Some GPS modules seem to have the option of a wire antenna, typically just a couple of inches, I think. It seems to me that this would give a nicer appearance especially if the antenna were glued into a small slot routed into the box at a corner or something. On the original box with the elephant I suppose it could go in the carved depression above or below the elephant.

    Very intriguing project and story! Thank you for the great libraries, as well.

  3. Mikal

    13 years ago

    Thanks for the note, John.

    Yeah, when I was building my first reverse geocache I was under the (mistaken) impression that the GPS module had to be “exposed” to work. This turns out not to be true — as anyone who has ever used a hand-held GPS unit can tell you. :)

    In my recent designs I simply tuck the EM-406A underneath the lid of the box. As long as the wood is not too thick and/or dense it seems to work pretty well.

    Thanks for your kind words.


  4. Greg

    13 years ago

    recently i started trying to make my own. i have a gps module and am able to get a signal and my coordinates. i was wondering what calculation you used to determine the distance. my basic code is from this website http://www.arduino.cc/playground/Tutorials/GPS which i have modified to store the lat and lon as floats. any help would be greatly appreciated.

  5. Mikal

    13 years ago

    Greg, I use the “distance_to” function from Maarten Lamers’ nice NMEA library: http://www.maartenlamers.com/nmea/.


  6. Ian

    13 years ago

    Could you possibly email me some further details for the construction of the reverse geocache please. I want to construct one for use in expedition and orienteering exercises with a cadet unit i work with.

  7. Paul

    13 years ago

    I would love to build one of these as well. Could you please email me some info on what to do with the parts you have listed on The Reverse Geocache™ Puzzle Box page? I would like to know just how complicated this is before I commit to buying the hardware.

    Paul S

  8. Mikal

    13 years ago

    Hi Paul.

    Start off at the “mothership”: http://arduino.cc. Check out tutorials also on ladyada’s great site: http://www.ladyada.net/learn/arduino/. This will get you a long way to getting started. It might take a while to master all the components, but it journey is part of the joy.


  9. Di

    12 years ago

    Is there anywhere/one in Australia making these boxes that we could purchase
    We really only need the electronics as we could fit it to our own box

  10. halil ibrahim köklü

    12 years ago

    hı mikal My name is halil ibrahim köklü
    I make magic box 15 step magic box I want to sale magic box I want to help
    for me your help please help me

  11. marc

    12 years ago

    Hi Mikal I plan on building one of your puzzle boxes as a gift for my friends wedding. I would very much like to buy one of your custom shields

  12. Justin Shaw

    12 years ago


    Thanks for the several great libraries. I made some mods to TinyGPS to enable fix notifications.

    I needed this for consistant GPS time syncing.

    The mods are published here:

    or directly from the source:

    Thanks again,

  13. Mikal

    12 years ago

    @Justin Shaw,

    Hey, cool. That’s a pretty good idea.


  14. Amy M. Burks

    12 years ago

    WOW, your reverse geocache puzzle is such a dazzling idea, AND you had the brains to build it. I think your mind is the biggest “gem” of this page!!!!

  15. Diego Paez

    12 years ago

    Thanks for the great work you develop, I was wondering if you have not thinking about developing the library TinyGPS for a Chipkit, would appreciate it fully.

    Thank you.

  16. Christopher Creel

    11 years ago

    This is really fantastic stuff! I would love to see you put your work in Github so that I can stay up to date with changes.

  17. Miguel

    11 years ago

    Hi Mikal, I’m using your excellent SoftSerial library. I need to read multiple ports at the same time. Bandwidth is not an issue as I might not even send the data to the PC. I only need to proccess some 400bps on each port. Is it possible to remove the multiple instances limitation? I’m not afraid of getting into the source code and try it for myself, I just want to know if it is doable…

  18. Mikal

    11 years ago


    With the algorithm that SoftwareSerial uses there is no way to read multiple ports at once–regardless of the speed. There are algorithms that would allow you to multiplex serial ports (at slow speeds), but these are complex and way out of the scope of SoftwareSerial.

  19. Kevin

    11 years ago

    Can I buy a reverse geocache from you or somewhere? Building something like this isn’t my cup of tea.

  20. Mikal

    11 years ago

    @Kevin, yes we make a number of boxes on commission. I’ll contact you by email…


  21. Dirk

    11 years ago

    Hi Mikal,

    I’d like to buy a reverse geocache. How can I do that? :-)

  22. Rodger

    11 years ago

    Good day Mikal, I am looking to get one of your reverse boxes. I sent you an email as well as this note. Let me know



  23. Mikal

    11 years ago

    Hi Dirk–

    We are putting together a Reverse Geocache site at http://sundial.com. It should be live any day now. Thanks for your interest.


  24. Fred Murphy

    10 years ago

    Good Day My friend and I are designing an marine autopilot and need to parse magnetic variation out of the GPRMC sentence. It appears that you are not parsing that when I look at the library. Is it possible to rewrite the libraries to include it without upsetting you!

  25. Mikal

    10 years ago

    Hi Fred–

    You might try the new TinyGPS++ library. Here’s a bit of code that I think would watch magnetic variation. It doesn’t work on my setup, because my EM-406A doesn’t generate that data, but I’m sure it would on yours.

    #include <TinyGPS++.h>
    #include <SoftwareSerial.h>
    // The TinyGPS++ object
    TinyGPSPlus gps;
    SoftwareSerial ss(4, 3);
    TinyGPSCustom mag(gps, "GPRMC", 10);
    TinyGPSCustom eastWest(gps, "GPRMC", 11);
    void setup()
    void loop()
      if (mag.isUpdated())
      while (ss.available() > 0)

  26. Rob McKinnie

    10 years ago

    Mikal –

    I was playing around on Creative mornings and saw that you were going to speak this month there in Austin. Congratulations and its exciting to see my old neighbor be a part of such a great event. I hope all is well in the neighborhood and the family is great. Feel free to reach out any time. Nashville is going strong and Dakota is happy as she can be. Take care and keep being creative.


  27. Mikal

    10 years ago

    Rob! Wow, great to hear from you in such an unexpected place. Oh, yeah. Lot’s of good neighborhood gossip, but perhaps it would be prudent to send that via email. Thanks for reaching out.

  28. Nagesh

    10 years ago


    I am Nagesh, newbie in Arduino world. You can say more of hobbyist person.

    I am from India. I bought the UNO compatible board and GSM shield from Entesla (http://entesla.com/microcontroller-development-boards/arduino).

    I am using GSM shield now and able to make/receive calls and also send/receive SMS. So far the kit is working perfectly fine.

    I need some help to do:

    1. I want to make use of the same kit (UNO board + GSM shield) as answering machine. I mean, when someone calls, GSM Shield should pick up the call after certain rings/time, and play some predefined audio like “Welcome to House of Arduino. Press 1 to switch on lights. Press 2 to switch of lights. Press 3 for status.”

    2. Detect whether call has pressed button “1″, “2″ or “3″ etc. so that i can take action accordingly.

    On some of forum post I read that, you can convert audio file to numeric array and play it, but not sure how to do that. I would appreciate if you send me sample code or direct me to location. I googled a lot for above need but no succss so far.

    THanks in advance.


  29. Mikal

    10 years ago

    @Nagesh, this question is better asked on the Arduino forums.

  30. joy

    9 years ago

    Hi! Im trying to send coordinates via SMS to my mobile using SIM900D with the tinyGPSPlus library. I’m totally lost.All my codes are not working

  31. Michael

    9 years ago

    Hi Mikal! I cant change update rate to GPS shield. it use 1Hz always. I try to use line GPS.println(“$PMTK220,100*2F”); for change it and it’s nothing (( what’s wrong ?

  32. Mikal

    9 years ago

    @Michael, I’m guessing you might need to do GPS.print(“$PMTK220,100*2F\r\n”);

  33. Sam Jay

    8 years ago

    Hello, I’m hoping that you can help me with the sketch for a high altitude balloon project I’ve been struggling with. I’m trying to read several sensors (BMP Pressure sensor, additional external thermometers, and Ada Fruit GPS), with the ultimate goal of logging and sending the data back down to a base station via XBee Pro XSC S3B radios. I’ve been struggling with this for the past few weeks and am unable to figure out how to fix the issues I’m having.

    Copied below is the sample code, followed by sample output (when GPS data does show up I’ve replaced the first few numbers with & signs…

    Could you please help me? Seems like an issue with softwareserial buffer overflows?

    Thank you,
    - SJ

  34. Mikal

    8 years ago

    @Sam Jay,

    You are certainly pushing a lot of data out to the serial console. This takes time, and I think it’s possible you are experiencing overflow, although you didn’t really explain what your issues were. Try to minimize the amount of output you generate.

  35. Walker Eric

    8 years ago


    I’m using your lib in my tracking project, when I look at HDOP value, it never go below 9X after a long time outsite.

    I’m using NEO6-M GPS (pedestrian mode, nema only)

    Could you enlight me on the relation between HDOP and the accuracy comming from your lib ?

    Thanks for the lib !

    Best regards

  36. musti

    8 years ago

    hello mikal, i wanna ask you about TinyGPS arduino code,
    what is the bool feedGPS used for? is it essential in the code? woudnt i still get the location without returning values from feedgps?
    here is the code:

    void loop()
    { bool newdata = false;
    unsigned long start = millis();
    while (millis() – start < 5000)
    {if (feedgps())
    newdata = true;
    float flat, flon;
    gps.f_get_position(&flat, &flon);

    static bool feedgps()
    while (Serial.available())
    {if (gps.encode(Serial.read()))
    return true; }
    return false;

  37. Mikal

    8 years ago

    @Walker Eric,

    The library doesn’t influence the accuracy in any way; in fact it doesn’t even really know what HDOP is. The numbers you get are exactly what the device has most recently reported.

  38. Mikal

    8 years ago


    To use TinyGPS, your program must frequently check for incoming data from the GPS and process it. The feedgps function is simply a convenient way to encapsulate this functionality and inform the calling program that a GPS sentence was processed.

  39. Madan Singh

    6 years ago

    I would like to know why setTimeout() has been excluded from this library?

  40. Mikal

    6 years ago

    @Madan Singh, which library?

  41. Elijah

    6 years ago


    Do all of your projects (including globalBeacon.ino) fall under the GNU General Public License?

  42. Mike Morrow

    5 years ago

    I have rather aggressively modified your Sat_Elev_Tracker to capture GPGSV and GLGSV statements to track GPS and GLONASS and update any time any change (as per your original). Makes a quite wide printout on the Serial monitor but it works. And, now, I better understand TinyGPSPlus as a side benefit.

    Thanks for the original. I would never have gotten there without it!


  43. Bill Dimitriou

    5 years ago

    Dear Mikal,
    I copied and run your project KitchenSink.ino but I get all zeroes.
    Can you please tell me what may be wrong?
    Demonstrating nearly every feature of TinyGPS++
    Testing TinyGPS++ library v. 1.0.2
    by Mikal Hart

    DATE Fix Age=3ms Raw=0 Year=2000 Month=0 Day=0
    TIME Fix Age=25ms Raw=0 Hour=0 Minute=0 Second=0 Hundredths=0
    TIME Fix Age=13ms Raw=0 Hour=0 Minute=0 Second=0 Hundredths=0
    SATELLITES Fix Age=79ms Value=0
    HDOP Fix Age=113ms raw=9999 hdop=99.99
    DATE Fix Age=2ms Raw=0 Year=2000 Month=0 Day=0
    TIME Fix Age=23ms Raw=0 Hour=0 Minute=0 Second=0 Hundredths=0

  44. Mikal

    5 years ago

    @Bill, I’m guessing that you need to give it time to get a fix?

Leave a Reply