You are reading a single comment by @lshk and its replies. Click here to read the full conversation.
  • Sun 2021.09.12

    Hi @lshk it appears you may be the first with this specific device functionality.

    There seems to be an apparent mis-understanding of how Javascript timer events work in comparrison with Arduino delays.

    While Arduino code continually loops and toggles a pin with a delay, the timeout L57-L61 that triggers the L58 shot() function, will run after the timeout interval has elapsed.

    This will take a bit of finagling, but first check out with it's live online 'Try It' windows

    https://www.w3schools.com/js/js_timing.asp

  • Ok, but that's not the problem here. I removed all delays, commented out digitalPulse, but these loops are very slow. At this cycle rate, the pulse transmission frequency does not correspond to the required.

  • Mon 2021.09.13

    reply to post #4

    'the pulse transmission frequency does not correspond to the required'

    What is the frequency? How is this being determined? O-Scope? Logic Analyzer?

    I have an example Logic Analyzer image, it is with SPI, but just showing to demo the capturing of example data and frequency.

    Proper technique needed to nest a setWatch()

    Are you able to post something similar?

About

Avatar for lshk @lshk started