WiFi Signal Strength using any Statements

This program uses the /wifisig system variable to display how good the Wifi signal the JackBord has is. It uses the any statement to determine which message to display based upon the strength of the Wifi signal.

Program


---

Wifi Signal Strength Program using any

This uses the /wifisig system variable and

a set of any commands to check the wifi strength,

and tell you about it.

NOTE: Each time the /wifisig system variable is used it updates

the wifi signal reading, so they will vary.

---


prog_vars =

d/wifi_state ""

d/wifi_sig 0

d/runs_to_do 0

d/runs_done 0

d/current_wifi 0

prog_vars.


prog_start =

print "Wifi Signal Strength Program"

/runs_to_do 50

prog_start.


prog_loop =

-- Reset the wifi state var and get the wifi

-- signal level from the /wifisig sys var.

/wifi_state "XXX"

-- Get the wifi signal strength here once as it can

-- change on subsequent calls to the /wifisig sys var.

/current_wifi /wifisig

any /current_wifi <= -30 -> /wifi_state "V GOOD"

any /current_wifi <= -40 -> /wifi_state "GOOD"

any /current_wifi <= -50 -> /wifi_state "BETTER"

any /current_wifi <= -60 -> /wifi_state "WORSE"

any /current_wifi <= -70 -> /wifi_state "LOW"

any /current_wifi <= -80 -> /wifi_state "TOO LOW!"

print "Wifi /wifi_state /current_wifi"

any /runs_done = /runs_to_do -> exitprog

inc /runs_done

prog_loop.


prog_stop =

print "Good bye"

prog_stop.