General area when it fits no where else

Moderator: Mmiscool

User avatar
By dziloo@wp.pl
#63108 Hello everyone! Little questions:
Is there ESPbasic function like a standard internet PING ???
I mean, that like to come home with my phone, my router automatically assigns me my IP.
example such as 192.168.1.100

Now ESP detects in timer loop this event and automatically launches, for example:
- Runs my computer,
- Runs my favorite light,
- Or warms up my dinner ....

It looks to me like this:
Code: Select all
'*** Example code- Not work !!! ***
IF PING "192.168.1.100" = 1
Then GOTO [Warm Dinner]
Else [Do Nothing]


Thank you for any suggestions: dziloo@wp.pl
User avatar
By Mmiscool
#63117 Added a new command to the latest version.

Please note it will only work for the 4meg build.

See
https://docs.google.com/document/d/1EiY ... irbdj5sq3u


Code: Select allif ping("192.168.1.150") = 1 then print "Ping successful"
User avatar
By dziloo@wp.pl
#63151 Something is wrong. Please take a look..
My examply code:
Code: Select all'PING everything ESP Basic Branch 3.xx

Print "PING everything in my intranet.... wait..."

For x = 1 to 254
 if ping("192.168.1." & x ) = 1 then
   print "Ping 192.168.1." & x & " Successfull !!!"
 Else
   print "Ping 192.168.1." & x & " NOT Visible !"
 End If
Next x

After RUN ....PRINT Effect:
--------------------------------------------------------------------------------------
PING everything in my intranet.... wait...
Ping 192.168.1.1 Successfull !!!
Ping 192.168.1.2 NOT Visible !
Done...
--------------------------------------------------------------------------------------
Program stopped after first Pinging NOT successfull.
Where is the next part of the for "Loop .. Next" Looping???

My configuration:
192.168.1.1 - this is my Router
192,168.1.2 - this is NONE
192.168.1.80 - this is a ESP

What is wrong? - Regards - Slawek: dziloo@wp.pl