Comments (9)
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.
likely related to esp8266/Arduino#836
from mobile-rr.
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.
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.
Though
from mobile-rr.
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.
Oh awesome!!! I'll check it out. Thanks for the feedback!
from mobile-rr.
Works like a charm. :) Thanks again.
from mobile-rr.
@Hopperpop Nice catch & solution; didn't know that about the event handler.
from mobile-rr.
Related Issues (20)
- Feature: Disconnect station from AP after receiving Rick Roll
- error: '_ws_client' was not declared in this scope HOT 5
- SSID changes not processed HOT 5
- Too many redirects on windows, ios and android HOT 1
- Broadcast SSID remains unchanged after changing variable HOT 1
- Browser Error HOT 3
- lib ESPAsyncWebServer not installed HOT 1
- no loading/welcome page pop-up HOT 1
- Unable to build -> '_ws_client' does not name a type HOT 7
- Can't log in to console HOT 3
- HOT 3
- Curiosity HOT 3
- HOT 1
- Can't build mobile-rr in Atom or VSCode with Platformio HOT 5
- 'class DNSServer' has no member named 'onquery' HOT 5
- serial.serialutil.SerialException: [Errno 2] could not open port /dev/cu.wchusbserial14440: [Errno 2] No such file or directory: '/dev/cu.wchusbserial14440' HOT 4
- Can we still make this work? HOT 3
- What libraries are needed I cant compile it?!
- Error when compiling HOT 8
- Error Compiling HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobile-rr.