Images used are attached but you may want to make them phancier.
Will Make an image button that can be toggled.
'Toggling Image button example
io(po,D4,0)
[TOP]
CLS
if io(laststat,D4) = 1 then
IMAGEBUTTON "ON.PNG", [ON]
else
IMAGEBUTTON "OFF.PNG", [OFF]
end if
wait
[ON]
io(po,D4,0)
goto [TOP]
[OFF]
io(po,D4,1)
goto [TOP]
http://esp8266basic.com
A BASIC interpreter for your ESP
Working now on Autodrop3d. A 3d printer with automatic part ejection system. https://autodrop3d.com