I could use some guidance as to what direction I should be googling for a project I'm working on.
I'm pretty familiar with Arduino, but a total beginner with the ESP32 and WiFI communication. I've been going through the basic tutorials on the esp32.net site and Youtube.
To explain my project: I want a remote button press to trigger the ESP to carry out actions (flashing lights, moving servos) and to send a signal to a phone running a media player app. The phone then plays an audio clip through a bluetooth speaker.
The question I have is: how should I approach the red transmission?
Some Constraints:
- I'd like the red signal to be sent over WiFI instead of bluetooth.
I'd like to avoid cloud servers like MQTT, and keep the communication local (is wlan the correct term?)
I suppose my two options are:
- Have the phone (as a client) constantly queue the ESP (as a server) with GET commands as to the status of the button press. This sounds like it will be a very inefficient use of battery life.
Have the ESP (as a client) POST to the phone (acting as a server). This seems more efficient, because the transmission only occurs when it needs to, but I can't find any example as to how to set up a phone as a server.