Original Author Paul Laughton, 2011
Page 145
De Re BASIC!
BSSID
String
BSSID of current access point
xx:xx:xx:xx:xx:xx (MAC address)
MAC
String
MAC address of your WiFi
xx:xx:xx:xx:xx:xx
IP
Numeric or String IP address of your WiFi
Number or octets (see below)
speed
Numeric
Current link speed in Mbps
Number
Format notes:
SSID: If the network is named, the name is returned, surrounded by double quotes. Otherwise the
returned name is a string of hex digits.
IP: If you provide a numeric variable, your Wi-Fi IP address is returned as a single number. If you
provide a string variable, the number is converted to a standard four-octet string. For example, the
string format 10.70.13.143 is the same IP address as the number -1887287798 (hex 8f82460a).
Running in the Background
Home
The HOME command does exactly what tapping the HOME key would do. The Home Screen is displayed
while the BASIC! program continues to run in the background.
OnBackground:
Interrupt label that traps changes in the Background/Foreground state (see "Interrupt Labels"). BASIC!
executes the statements following the OnBackground: label until it reaches a Background.resume
command. The Background() function should be used to determine the new state.
Background.resume
Resumes execution at the point in the BASIC! program where the OnBackground: interrupt occurred.
WakeLock <code_nexp>{, <flags_nexp>}
The WakeLock command modifies the system screen timeout function. The Code parameter
<code_nexp> may be one of five values. Values 1 through 4 modify the screen timeout in various ways.
Code value 5 releases the WakeLock and restores the system screen timeout function.
Code
WakeLock Type
CPU
Screen
Keyboard Light
Partial WakeLock
On*
Off
Off
Screen Dim
On
Dim
Off
Screen Bright
On
Bright
Off
Full WakeLock
On
Bright
Bright
5
No WakeLock
Off
Off
Off
* If you hold a partial WakeLock, the CPU will continue to run, regardless of any timers
and even after the user taps the power button. In all other WakeLocks, the CPU will run,
but the user can still put the device to sleep using the power button.
You can use the optional Flags parameter <flags_nexp> to change the screen behavior, as shown in the
table below. If the WakeLock Type is Partial WakeLock (Code 1), the Flags parameter is ignored.