Free 173 Best Homemade Tools eBook:  
Become a founding member: 500+ tool plans, full site access, and more.

User Tag List

Results 1 to 3 of 3

Thread: Bridging the Gap Between Realtime and Data in an Arduino

  1. #1
    Supporting Member rgsparber's Avatar
    Join Date
    Nov 2012
    Location
    Phoenix, AZ
    Posts
    845
    Thanks
    425
    Thanked 1,762 Times in 454 Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    rgsparber's Tools

    Bridging the Gap Between Realtime and Data in an Arduino

    The difficult place to debug is at the boundary between the real world and software. I can use my 'scope to look at the voltage on a given input pin as a function of time. I do this with high confidence in the information. I can also insert print statements into my code and know where it is going. But if I use software to look at a signal associated with an input pin, I will affect its realtime performance. On many occasions, these extra print statements ended up being why my program didnít work.

    I am proposing a program that temporarily replaces the existing code. After triggering on a change in state, it only looks at the input, and as fast as it can, saves it to memory. After taking 255 samples, it stops recording and starts printing it out to my PC. Then the cycle repeats.

    The user defines which pin they want to read plus the sampling rate. With my Pro Micro, I can sample as fast as every 6 microseconds. This will be faster than my program can read the input so I get a good idea of what it sees. There is no limit on how slowly I sample if I'm looking for slow moving disturbances.

    If you are interested, please see

    https://rick.sparber.org/DigitalRecorder.pdf


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


    Thanks,

    Rick
    Rick

  2. The Following 3 Users Say Thank You to rgsparber For This Useful Post:

    anrivera1 (07-07-2020), Jon (07-09-2020), Paul Jones (07-07-2020)

  3. #2
    anrivera1's Avatar
    Join Date
    Dec 2015
    Posts
    4
    Thanks
    5
    Thanked 2 Times in 2 Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your post. I am a novice to Arduino so this will help me troubleshoot.

  4. The Following User Says Thank You to anrivera1 For This Useful Post:

    rgsparber (07-07-2020)

  5. #3
    Content Editor
    Supporting Member
    DIYer's Avatar
    Join Date
    Aug 2013
    Posts
    3,090
    Thanks
    562
    Thanked 1,344 Times in 1,211 Posts
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


    Thanks rgsparber! We've added your GPIO Recorder to our Electronics category,
    as well as to your builder page: rgsparber's Homemade Tools. Your receipt:





    Post your reply!
    Join 42,532 of us and get 500+ tool plans, tool eBooks, build guides, and much more.



    eBooks for Supporters

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
  •