logo elektroda
logo elektroda
X
logo elektroda

ESP8266 (ESP-12E) as HTTP Request Client and Server in an IoT project

Non Opus Dei 1071 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16826714
    Non Opus Dei
    Level 1  
    Greetings to you.
    I have chosen an IoT topic for a team project. The web is full of tutorials on how to download a GET HTTP Request to an ESP server or send such a request from it. But is it possible to combine these functions? E.g..
    if (ip.esp/gpio/0 ( Pin LOW)){
    send to rpi3/stangpio/value=0
    (and this information is written to the DB or displayed)
    else (ip.esp/gpio/1 ( Pin HEIGH))
    send to rpi3/stangpio/value=1
    (and this information saves DB or displays)
    I have set up the server in Flash. I should add that I am using the Arduino IDE.

    Thank you very much for any answer and suggestion
  • ADVERTISEMENT
  • #2 16826753
    JacekCz
    Level 42  
    clean up this code to some meaningful formatting.
    It is possible to combine EVERY FUNCTION.
    What question, what answer.

    As an aside. Sending data is done either POST (new data) or PUT (update of existing data).
    GET is read-only.
ADVERTISEMENT