ESP8266 BASIC
  • Home
  • Documentation
    • Editor Interface
    • Flashing Instructions
    • Language Reference
    • FAQ
    • Videos
    • Examples
      • ESP8266-projects.com
      • Wifi Station & AP Examples
      • GPIO & PWM & Servo Example
      • GUI Example
      • Hello World Example
      • Graphics Example
      • Blink example
      • I2C READING DS1321 REAL TIME CLOCK
      • Timer Example
      • MSG URL Usage
      • MSG URL (Advanced)
      • DS18B20 Wifi Thermostat
      • CSS Example
      • WIFI Scanner Example
      • Graphic Clock Example
      • Analog Input Graph
  • Flashing Instructions
  • Download
  • Forum
  • Store
  • Home
  • Documentation
    • Editor Interface
    • Flashing Instructions
    • Language Reference
    • FAQ
    • Videos
    • Examples
      • ESP8266-projects.com
      • Wifi Station & AP Examples
      • GPIO & PWM & Servo Example
      • GUI Example
      • Hello World Example
      • Graphics Example
      • Blink example
      • I2C READING DS1321 REAL TIME CLOCK
      • Timer Example
      • MSG URL Usage
      • MSG URL (Advanced)
      • DS18B20 Wifi Thermostat
      • CSS Example
      • WIFI Scanner Example
      • Graphic Clock Example
      • Analog Input Graph
  • Flashing Instructions
  • Download
  • Forum
  • Store

MSG URL Usage ​(3.0 branch only)

​msgbranch [mybranch]
print "set the branch"
wait

[mybranch]
myColorVar = msgget("color") 
print myColorVar
let myReturnMsg = "You Entered " & myColorVar
msgreturn myReturnMsg
wait
The msg url allows you to communicate with the device and execute actions by using a URL.

If you are connected to the device in AP mode. You can use the following url.
http://192.168.4.1/msg?color=blue

When this URL is passed the msgbranch will be executed and it will pass the argument blue. This can be accessed by the interpreter with the msgget function.

In this example the msgget function takes the color parameter and places it in to the myColorVar variable.

The msgreturn command sets the text that is returned in the web browser.
Powered by Create your own unique website with customizable templates.
  • Home
  • Documentation
    • Editor Interface
    • Flashing Instructions
    • Language Reference
    • FAQ
    • Videos
    • Examples
      • ESP8266-projects.com
      • Wifi Station & AP Examples
      • GPIO & PWM & Servo Example
      • GUI Example
      • Hello World Example
      • Graphics Example
      • Blink example
      • I2C READING DS1321 REAL TIME CLOCK
      • Timer Example
      • MSG URL Usage
      • MSG URL (Advanced)
      • DS18B20 Wifi Thermostat
      • CSS Example
      • WIFI Scanner Example
      • Graphic Clock Example
      • Analog Input Graph
  • Flashing Instructions
  • Download
  • Forum
  • Store