Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: How Does One Choose a Library?

  1. #1
    Junior Member
    Join Date
    Jan 2015
    Location
    Maryland
    Posts
    13

    How Does One Choose a Library?

    We are (sadly, I'm the arduino 'expert' for our STEM group) about to play with the nRF24L01+ for a timing gate project where start and finish lines are 301 m apart (Soap Box Derby). Looking at various simple examples. Looking also at all the various libraries available. Wondering about *which* nRF24L01+ library to use, but then I started to wonder about how to wonder about that. So I'm asking first about how ought a 'casual' user best choose among the spectrum of libraries out there. Is there a better option than to look inside each library for available functions, apparent ease of use, etc.?

    Secondarily, I'm asking which of the ~10 libraries might be best for simple single pair, probably one-way, comm? I guess ease of use and bullet-proof stability would be top considerations. All resources will be seriously underused.

    I also ought to have wondered earlier, which forum might be most appropriate for this kind of question? TIA. ________________________Marty

  2. #2
    Senior Member
    Join Date
    Apr 2013
    Posts
    1,928
    Do not have any advice for nRf but looking at libraries:
    Check if library focus/summary is what you are after (you probably don't need a mesh capable library in this case)
    Check how recently they updated (more than a couple of years old increases probability of adventure)
    Check for documentation
    Does documentation explain how to connect everything or do you need to read the source to find the pins?
    Check for documentation actually for your hardware and use case (does it have examples, or just a description)
    Check if special settings for multiple different devices are listed, or if it only supports the model the author had to hand
    Does documentation describe alternate settings and how to set them from your code or will even minor changes mean hacking inside the library.
    Does it mention things it cannot do, or things it conflicts with (normally a good thing, tells you that author knows how it works)
    Does the install process involve some complex efforts, or just go via the Arduino library function?

    A quick run through the Arduino library list suggest NRFLite may be a place to start https://github.com/dparson55/NRFLite but have not actually used these devices.

  3. #3
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    618
    How about this "ready-to-use" solution on the Teensy?
    https://forum.pjrc.com/threads/60332...l=1#post234918

  4. #4
    Junior Member
    Join Date
    Jan 2015
    Location
    Maryland
    Posts
    13
    Like the day after, with a hangover, I reread my post...
    I don't know what I was thinking, "What's the easiest secret to success in the stock market?". Aye caramba!

    But tho I should have expected no easy answer, it was a good question--Without familiarity how this arduino coding universe works there're a lot of things that look impenetrable.

    Thank you, Wrangler; you answered my question well. To paraphrase, I think you said no free lunch, that I basically need to do the sniff test on the candidate libraries. Things like disuse/staleness, documentation, libraryManagerability, fessing up to features and bugs, ... a good list of specifics that will shorten my time stomping around in the wilderness.

    Especially since you pointed me to nRFlite, which looks like it'll suit my needs. I think I'm done, for now, looking.

    DD4WH, thank you. I think that you've overestimated both my ability to work with more complex programs and our need for such. The closest to concerning ourselves with synchronizing sample rates that we'll get is that we'd like to measure car run times down to 1 ms accuracy, and now I'm reminded about latency; who knows, that may be variable. I'm guessing if I initialize by pinging round trip time I can determine average total transmission time and whatever noise to that there might be. The two hardwares are basically identical so the one-way ought to be half the round-trip time, I'm guessing.

    Again, thanks all. __Marty

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,109
    To take a step back, how does one go about choosing anything when the number of possible choices is overwhelming?

    There are 2 ways to think about choosing, which I’ve heard called maximizing versus satisfying. The maximizing approach seeks to choose the best option, or likely best. The satisfying way involves setting requirements and then looking for an answer that meets them, without concern that a better option may exist. Realistically, you’ll probably end up somewhere between these 2 extremes. You can’t know if your requirements are a realistic expectation unit you’ve learned what choices exist, but you also have limited time and energy to spend, and that’s just to find the beginning of your project.

    It’s easy to fall into a trap of focusing too much on the maximizing approach. If you find a library the meets your needs, really, what is the point of spending more time on others?

  6. #6
    Junior Member
    Join Date
    Jan 2015
    Location
    Maryland
    Posts
    13
    I tend to vacillate between over Maximizing and the unspoken, "ANYthing,PLEASE, just GET ME PAST THIS DECISION!" approaches.

    Here, I'm pretty comfortable taking a mostly Satisfying way. I'm better armed to face the next library choice situation, tho and for that I really thank you guys. ___Marty

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •