Current News

Moderator: Mmiscool

User avatar
By Mmiscool
#32083 Hello,

I added new functionality for doing some nifty tricks with urls and executing code on the device.

A new example has been added
http://www.esp8266basic.com/msg-url-usage.html

A short description of whats going on:
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 command.

In this example the msgget command 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.
Code: Select allmsgbranch [mybranch]
print "set the branch"
wait


[mybranch]
msgget "color" myColorVar
print myColorVar
let myReturnMsg = "You Entered " & myColorVar
msgreturn myReturnMsg
wait