Posted: 06:52pm 30 Dec 2015 |
Copy link to clipboard |
 Print this post |
|
You can use the esp8266 basic firmware from esp8266basic.com
It can send and receive serial msgs from the module and yo can produce buttons and other gui widgets in the browser.
This is an example that will put up a gui and send a msg to the external micro and then return a web page with the micros response.
[top]
textbox MsgToSendToDevice
button "Send" [SendIt]
wait
[SendIt]
cls
input MsgToSendToDevice varforreturnmsg
html varforreturnmsg
goto [top]
Note that the input command is blocking.
Once the microcontroller receives the ">" character the esp is ready to receive a msg back. The input command is blocking and requires a cr+lf to terminate the response.
You will see what ever was in the response in your browser.
Not too bad for 8 lines of code.
ESP8266 basic can also handle GPIO, i2c, some oled screens and some one wire temperature sensors. Here is a simple program to turn an led connected to a gpio pin 3.
button "ON" [turnOn]
button "OFF" [turnOff]
wait
[turnOn]
io(po,3,1)
wait
[turnOff]
io(po,3,0)
wait
Hopefully this helps a bit. Edited by mmiscool 2016-01-01 |