Free 186 More Best Homemade Tools eBook:  
Get tool plans

User Tag List

Results 1 to 6 of 6

Thread: A Diagnostic Tool for Arduino Software

  1. #1
    Supporting Member rgsparber's Avatar
    Join Date
    Nov 2012
    Location
    Phoenix, AZ
    Posts
    1,321
    Thanks
    778
    Thanked 2,840 Times in 670 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

    186 More Best Homemade Tools eBook
    Rick

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

    Paul Jones (Jun 21, 2017)

  3. #2
    Supporting Member Ralphxyz's Avatar
    Join Date
    Dec 2016
    Posts
    1,733
    Thanks
    3,229
    Thanked 295 Times in 241 Posts

    Ralphxyz's Tools
    Nice, thank you for posting.

    Ralph

    2,000+ Tool Plans

  4. #3
    Supporting Member rgsparber's Avatar
    Join Date
    Nov 2012
    Location
    Phoenix, AZ
    Posts
    1,321
    Thanks
    778
    Thanked 2,840 Times in 670 Posts

    rgsparber's Tools
    Do you program Arduinos?
    Rick

  5. #4
    Supporting Member Ralphxyz's Avatar
    Join Date
    Dec 2016
    Posts
    1,733
    Thanks
    3,229
    Thanked 295 Times in 241 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
    Supporting Member Christophe Mineau's Avatar
    Join Date
    Jul 2014
    Location
    France, Brittany !
    Posts
    913
    Thanks
    832
    Thanked 1,705 Times in 481 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 (Jun 28, 2017)

  8. #6
    Content Editor
    Supporting Member
    DIYer's Avatar
    Join Date
    Aug 2013
    Posts
    3,055
    Thanks
    793
    Thanked 1,888 Times in 1,683 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:




    2,000+ Tool Plans

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
  •