Command (light LED) does not work for external ip
Posted: Fri Oct 07, 2016 10:58 am
Hello. I ask your help because I made a small code to be able to trigger an LED (pin 2 nodemcu ESP12E) and accessing the local network works and nodemcu responds to the request.
Then I opened a router port and dedicated to an ip that gave the ESP. Then I do access via smarfone (4G internet) and access to the page ESPbasic he already is to run automatically program.bas, so I send command and esp does not respond !! I wonder why?
Here the code:
let pinNo = 2
let pinstat = 0
print "porta"
textbox pinNo
print "status"
textbox pinstat
button "aciona",[SetThePin]
button "exit",[TestExit]
wait
[SetThePin]
io(po,pinNo,pinstat)
if pinstat = 0 then
pinstat = 1
else
pinstat = 0
end if
wait
[TestExit]
end
Then I opened a router port and dedicated to an ip that gave the ESP. Then I do access via smarfone (4G internet) and access to the page ESPbasic he already is to run automatically program.bas, so I send command and esp does not respond !! I wonder why?
Here the code:
let pinNo = 2
let pinstat = 0
print "porta"
textbox pinNo
print "status"
textbox pinstat
button "aciona",[SetThePin]
button "exit",[TestExit]
wait
[SetThePin]
io(po,pinNo,pinstat)
if pinstat = 0 then
pinstat = 1
else
pinstat = 0
end if
wait
[TestExit]
end