Replies: 3 comments
-
Hi! |
Beta Was this translation helpful? Give feedback.
-
Not really a BLE-MIDI question, but rather an Arduino platform question (hence why you don't see an answer here). Having Client or Server code based on a 'press of a button' means that the instance of the client (or server) class needs to be done dynamically, rather than (typically) statically on the stack (you can't allocate both during compile time and then, based on a key-press activate one of the other). Dynamically allocating memory (using new()) can lead to heap fragmentation and ultimately have the device to crash on embedded systems. This is also the reason why the underlying lib is totally C++ template based, even avoiding the use of v-tables. So your options are (after a quick reflection):
|
Beta Was this translation helpful? Give feedback.
-
Wouldn't be possible to do something like for example:
|
Beta Was this translation helpful? Give feedback.
-
Hi, would it be possible to initialize an ESP32 as a client or as a server when powering the board ON, and for example by pressing a button?
At the moment I don't see how I could do it, but I am a beginner.
Thanks in advance for your answers.
João
Beta Was this translation helpful? Give feedback.
All reactions