Code Monkey home page Code Monkey logo

Comments (4)

bbkiwi avatar bbkiwi commented on July 26, 2024 1

from fsbrowserng.

gmag11 avatar gmag11 commented on July 26, 2024

Please, send a link to your code. Are you using delay() to control sampling?

from fsbrowserng.

bbkiwi avatar bbkiwi commented on July 26, 2024

No. I discovered delay is not compatible with the async library.
This is the simplest example that fails
FSBrowserNGmod.txt

Here I slow down sampling and it works if interval is 2ms or more. I also moved ESPHTTPServer.handle();
to setup
FSBrowserNGTestAddingCode.txt

from fsbrowserng.

gmag11 avatar gmag11 commented on July 26, 2024

Yes, it works as you've noticed.

Think that ESP8266 is a limited device. Its IP stack runs on software and there is one unique core. So, if you ask for intensive work IP will be unstable.

I've tested that you can do sampling as fast as 250Hz, but anyway sampling is unstable; if processor attends HTTP requests then it cannot do sampling. You can increase sampling to around 350 Hz if processor clock is set to 160 MHz.

For real-time operations, you can look for a different platform as, for instance, ESP32. Moreover, you will have to play with timer interrupts to be able to get stable sampling frequency.

You can check Color Chrod by CNLohr where high-frequency sampling (around 600Hz) is done but that project does not use Arduino environment and has needed a great optimization using assembler code.

More details here: http://spectrum.ieee.org/geek-life/hands-on/how-to-turn-music-into-colors-with-a-wifi-bridge.

Another option is to use an external I2S ADC.

from fsbrowserng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.