logo elektroda
logo elektroda
X
logo elektroda

ESP8266 Arduino: Adding Newline to String Responses for Smartphone App

heyka 1902 36
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #31 17966945
    Slawek K.
    Level 35  
    Did it work?

    Greetings
  • ADVERTISEMENT
  • #32 17973382
    heyka
    Level 17  
    Slawek K. wrote:
    It worked ?



    Of course it worked. :)

    I'm trying to figure out the library.

    There is such a method in it for saving memory:

    Code: C / C++
    Log in, to see the code
    .

    what does the offset parameter mean?

    Added after 4 [minutes]:

    and also this:

    Code: C / C++
    Log in, to see the code
    .

    what the ARDUINO of the condition means

    Code: C / C++
    Log in, to see the code
    .
  • ADVERTISEMENT
  • #33 17973439
    Slawek K.
    Level 35  
    The first is about reading rather than writing. As for the second question, it's about the Arduino IDE version, below 1.0 or above, depending on the version, a different definition file is included.

    Greetings
  • ADVERTISEMENT
  • #34 17973882
    heyka
    Level 17  
    Slawek K. wrote:
    The first is a read rather than a write. As for the second question, it's about the Arduino IDE version, below 1.0 or above, depending on the version, a different definition file is included.

    Greetings
    .

    Clearly a readout, but what does "offset" mean?

    Added after 5 [hours] 47 [minutes]:

    Offset - which byte to start writing from?
  • ADVERTISEMENT
  • #35 17974395
    khoam
    Level 42  
    heyka wrote:
    Offset - which byte to start writing from?
    .
    It looks like this, starting from DS1307_REG_RAM i.e. 0x08:
    Code: C / C++
    Log in, to see the code
    .
  • #36 17974473
    heyka
    Level 17  
    DS1307_REG_RAM 0x08
  • #37 17974476
    khoam
    Level 42  
    heyka wrote:
    DS1307_REG_RAM 0x08
    .
    Correct. I am correcting my previous post :) .

Topic summary

The discussion revolves around the issue of the ESP8266 not sending string responses correctly to a smartphone app via WiFi TCP/UDP. The user suspects that adding newline or carriage return characters to the end of the response strings may resolve the issue. Various solutions are proposed, including using special characters for newlines, constructing strings with numeric values using the sprintf() function, and the importance of buffer size when handling strings in Arduino. The conversation also touches on the use of the NodeMCU module and libraries for sensors like the BMP280 and DS1307 RTC, discussing their initialization and data handling methods.
Summary generated by the language model.
ADVERTISEMENT