Hi,
i've been struggling with with a project of mine that requires data from two HMC5883l compass sensors to be used by two corresponding servo motors.
The hardware im using is:
- 3x NodeMCU ESP8266
- 2x HMC5883l magnetometer sensors
- 2x Sg 90 Servo motors
The method i've ended up at is using three ESP8266 boards overall,
- Board A - to be the server, has two servo motors, moves them using the sensor readings it receives from Board B & Board C.
- Board B - to be a client, has the first HMC connected to it, required to send this reading to the Board A.
- Board C - to be another client, has the second HMC connected to it, required to send this reading to the Board A.
The problem is that, being a beginner to coding, I'm having trouble understanding the right functions and syntax to write the code for what I want to do.
So far, I've been referring to this tutorial
where they show how to set up a client to read from a server:
in the server code:
server.on("/temperature", HTTP_GET, [](AsyncWebServerRequest *request){
request->send_P(200, "text/plain", readTemp().c_str());
});
and
in the client code:
temperature = httpGETRequest(serverNameTemp);
what I need to do is the opposite of this, having two clients write to a server.
from reading through the library documentation
I've understood that the tutorial was using the get method to read values from the server whereas I need to use the post method to write values to the server.
but I've tried to break the get command down and understand the syntax used in the tutorial and modify it into a post command to no avail.
I've had no luck trying the find a "list of functions" that I can refer to, no luck finding examples where a client writes to a server.
I would greatly appreciate some help in understanding the syntaxes for the get and post methods.
Thanks in advance !

