tende1.bas este cu css si buton mare
..........................
How functioning:
1.open appinventor and download tende.aia
2.compile to apk and load in your phone or download apk from http://costycnc.it/tende.apk
3.upload esp basic to esp12 wifi module with tool from here :
https://github.com/esp8266/Basic/raw/NewWebSockets/Flasher/ESP_Basic_Flasher.exe
4.load tende.bas
5.connect to esp wifi with phone
and open tende.apk
open servomotor and remove the blocking plastic to turn for ever
turn plastic
................per esp12 (esp basic installed).......................
.............................................................................................
msgbranch [mybranch]
wait
[mybranch]
mydirection = msgget("mydirection")
if mydirection == "open" then
io(servo,16,0)
delay 15000
io(servo,16,100)
end if
if mydirection == "close" then
io(servo,16,250)
delay 15000
io(servo,16,100)
end if
wait
--------------------------------------------------
msgbranch [mybranch]
print "set the branch"
wait
[mybranch]
myColorVar = msgget("color")
let myReturnMsg = "You Entered " & myColorVar
msgreturn myReturnMsg
if myColorVar == "open" then
print myColorVar
io(servo,16,0)
delay 15000
io(servo,16,100)
io(po,2,0)
end if
if myColorVar == "close" then
print myColorVar
io(servo,16,1)
delay 15000
io(servo,16,100)
io(po,2,1)
end if
wait