B4R Question Timer or Digital Interrupt

Discussion in 'B4R Questions' started by rodmcm, Sep 14, 2018.

  1. rodmcm

    rodmcm Member Licensed User

    Are there program calls for these in B4r for the ESP32.?

    I want to sample an analog (1 sample per mS) and measure frequency based on a square wave into a DI derived with external hardware from the analog signal.
    What approach would I use with B4R?

    At present, with conventional Arduino the analogRead() interferes with the Digital interrupt, so B4r may be the solution.
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. rodmcm

    rodmcm Member Licensed User

    Yes,I've been thinking about addlooper for a while. ,I'll give it a try thanks.. Is the count rate deterministic, in other words if the same addlooper program was placed in a lot of ESP32s would the count/period be the same in all of them? I see that the frequency of the count is 1.75MHZ for the 80MHZ ESP32.. What actually determines this?
  4. Erel

    Erel Administrator Staff Member Licensed User

    Assuming that the chips are identical then they will run in the same way. Nothing else runs on the MCU except of your code.

    B4R uses a scheduler to handle the timers and loopers. There is a bit of code that is executed every loop.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice