logo elektroda
logo elektroda
X
logo elektroda

Receiving and displaying JSON from local server on ESP8266-01 in lua on LCD 2x16

rafik73 2361 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 15693048
    rafik73
    Level 13  
    How can I receive and display JSON data sent from a local server? I am talking about a script in lua fired on ESP8266 version 01. Ultimately I want to display this data on a 2x16 lcd connected to the ESP8266 via i2c.
  • ADVERTISEMENT
  • #2 15696427
    rafik73
    Level 13  
    I have such a listing in lua:

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


    which when run on the ESP throws up:

    {"lowVersion":1, "highVersion":3}

    and it's OK, it's valid JSON data.

    Then I try:

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


    throws out:

    test.lua:10: Expected value but found invalid token at character 1

    How to display a single value "lowVersion" or "highVersion"
    I want to save them as variables.
ADVERTISEMENT