Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: joepasquariello

Search: Search took 0.00 seconds.

  1. Ah, yes. That's it. It takes multiple passes of...

    Ah, yes. That's it. It takes multiple passes of loop to "burn off" the accumulated microseconds since initialization of global variables prior to execution of setup().

    Another "fix" is to define...
  2. I can't explain it yet, but initializing...

    I can't explain it yet, but initializing g_rising_edge_timer at the end of setup() does fix the problem. I'm using Arduino 1 IDE, TD 1.58b3. Try it.



    #include <Arduino.h>

    const uint8_t...
  3. You're right, the symptom doesn't match the logic...

    You're right, the symptom doesn't match the logic of the fix, but I'd still do it, just to be eliminate any uncertainty in conditions on first execution of loop(). After that, I would use...
  4. Thanks, luni. Good to know. I still think he...

    Thanks, luni. Good to know. I still think he should add the initialization of g_rising_edge_timer before leaving setup(), just to be sure that the conditions on first pass through loop() are he same...
  5. Try defining your output pin using a macro...

    Try defining your output pin using a macro instead of a variable, which will allow the inline function digitalWriteFast() to do more optimization, and add these two lines after call to pinMode() in...
Results 1 to 5 of 5