Free 50 Best Homemade Tools eBook:  
Remove advertisements
Results 1 to 6 of 6

Thread: A Diagnostic Tool for Arduino Software

  1. #1
    rgsparber's Avatar
    Join Date
    Nov 2012
    Location
    Phoenix, AZ
    Posts
    415
    Thanks
    71
    Thanked 620 Times in 239 Posts

    rgsparber's Tools

    A Diagnostic Tool for Arduino Software

    There are times when Arduino software must be debugged and you are not connected to a Software Development Environment. It then becomes near impossible to know what is going on. In these cases, it is handy to be able to turn on a diagnostic mode and see exactly where you are in the code plus specific pieces of data at these times. Here is one way to do it.

    If you are interested, please see

    http://rick.sparber.org/DTSW.pdf


    Your comments are welcome. All of us are smarter than any one of us.


    Thanks,

    Rick
    Rick

  2. The Following User Says Thank You to rgsparber For This Useful Post:

    Paul Jones (06-21-2017)

  3. #2
    Ralphxyz's Avatar
    Join Date
    Dec 2016
    Posts
    320
    Thanks
    0
    Thanked 58 Times in 48 Posts

    Ralphxyz's Tools
    Nice, thank you for posting.

    Ralph

  4. #3
    rgsparber's Avatar
    Join Date
    Nov 2012
    Location
    Phoenix, AZ
    Posts
    415
    Thanks
    71
    Thanked 620 Times in 239 Posts

    rgsparber's Tools
    Do you program Arduinos?
    Rick

  5. #4
    Ralphxyz's Avatar
    Join Date
    Dec 2016
    Posts
    320
    Thanks
    0
    Thanked 58 Times in 48 Posts

    Ralphxyz's Tools
    Yes, also also micro processor programing in C, but never really proficient just a hobby.

    I like having the embedded analytics I can see where that could be very helpful.

    Thanks again for posting.

    Ralph

  6. #5
    Christophe Mineau's Avatar
    Join Date
    Jul 2014
    Location
    France, Brittany !
    Posts
    671
    Thanks
    398
    Thanked 939 Times in 367 Posts

    Christophe Mineau's Tools
    Hi Rick,
    Nice work, it can be useful for synchronus applications looping forever.
    Here you used an LCD display, but in some cases you may have to use even more rustic interface like the status led D13 or a piezzo buzzer to provide the user with some basic status information (remember how a computer beeps its diags when the video adapter is down)

    One comment, you didn't say much about your debounce routine ?
    typo page 4/1st line : I guess you mean setup() instead of startup()

    Other comment, you might receive it as well from others, I know that the programming style can be very personal, but the Arduino allows you to program using C++/C, so it is quite odd that you use label: Goto Label for your loops .
    It would have been more readable if you had used :
    while (DebouncedRead(PABPin) == Pushed);

    Notice that in order to avoid such loops, you could have used interrupts, detecting edges in both directions, but honestly, it's always preferable to use a polling like you did. (Using interrupts, the de-bouncing is crucial and can be annoying)

    Well done, keep posting !
    Christophe
    Cheers !
    Christophe
    ________________________________________________________________
    Visit my Website : http://www.labellenote.fr/
    Facebook : La Belle Note
    All my personal works, unless explicitly specified, are released under
    Creative Commons BY-NC-SA license.

  7. The Following User Says Thank You to Christophe Mineau For This Useful Post:

    Paul Jones (06-28-2017)

  8. #6
    Content Editor DIYer's Avatar
    Join Date
    Aug 2013
    Posts
    3,087
    Thanks
    327
    Thanked 626 Times in 567 Posts
    Thanks Rick! We've added your Arduino Diagnostic Tool to our Electronics category, as well as to your builder page: Rick's Homemade Tools. Your receipt:



    Post your reply!
    Join 33,912 of us and get our 50 Must Read Homemade Tools eBook free.



    50 Must Read Homemade Tools

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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