Free 186 More Best Homemade Tools eBook:  
Get 2,000+ 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
    1,277
    Thanks
    733
    Thanked 2,758 Times in 649 Posts

    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

    186 More Best Homemade Tools eBook
    Rick

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

    anrivera1 (Jul 7, 2020), Jon (Jul 9, 2020), Paul Jones (Jul 7, 2020)

  3. #2
    anrivera1's Avatar
    Join Date
    Dec 2015
    Posts
    4
    Thanks
    10
    Thanked 2 Times in 2 Posts
    Thank you for your post. I am a novice to Arduino so this will help me troubleshoot.

    2000 Tool Plans

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

    rgsparber (Jul 7, 2020)

  5. #3
    Content Editor
    Supporting Member
    DIYer's Avatar
    Join Date
    Aug 2013
    Posts
    3,057
    Thanks
    771
    Thanked 1,850 Times in 1,652 Posts


    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:






    186 More Best Homemade Tools eBook

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
  •