Giter Site home page Giter Site logo

Comments (9)

Hopperpop avatar Hopperpop commented on August 17, 2024 1

I think that you can't use delay() or yield() in an event. If you call beep_rr() in loop(), it works perfectly. I tested this with this code:

enum class statemachine{
    none,
    beep,
    rr
};
statemachine state = statemachine::none;
int beepv;


void loop ( void )
{
    dnsd.processNextRequest();
    ArduinoOTA.handle();  // Handle remote Wifi Updates

    switch (state){
        case statemachine::rr:
            beep_rr();
            state = statemachine::none;
            break;
        case statemachine::beep:
            beepC(beepv);
            state = statemachine::none;
            break;
    }
}

Instead of calling the beep functions in the web-socket event, change the state variable to the desired state. Note that this will block the dns proces for a short time when playing a note/song.

from mobile-rr.

boneskull avatar boneskull commented on August 17, 2024

likely related to esp8266/Arduino#836

from mobile-rr.

idolpx avatar idolpx commented on August 17, 2024

Thanks for the info and for posting about it on that thread. I hope a solution is found. It really doesn't make much sense to me right now. I'm still trying stuff to try to get it working.

from mobile-rr.

boneskull avatar boneskull commented on August 17, 2024

I messed with it for a bit and could only assert the code was running. almost positive it's not a bug in your code rhoigh

from mobile-rr.

boneskull avatar boneskull commented on August 17, 2024

Though

from mobile-rr.

idolpx avatar idolpx commented on August 17, 2024

Thanks for looking into it. I was hoping an update to the SDK might fix it. It's not a critical function and it's nice that it works on boot up at least. :)

from mobile-rr.

idolpx avatar idolpx commented on August 17, 2024

Oh awesome!!! I'll check it out. Thanks for the feedback!

from mobile-rr.

idolpx avatar idolpx commented on August 17, 2024

Works like a charm. :) Thanks again.

from mobile-rr.

boneskull avatar boneskull commented on August 17, 2024

@Hopperpop Nice catch & solution; didn't know that about the event handler.

from mobile-rr.

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.