User Tools

Site Tools


built_in:nxt_isconnected

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
built_in:nxt_isconnected [2015/03/10 20:59]
madlyr created IsConnected
built_in:nxt_isconnected [2015/03/10 21:05]
madlyr [Example - IsConnected Connect / Disconnect to NXT with FontAwesome icons]
Line 1: Line 1:
 ====== IsConnected ====== ====== IsConnected ======
  
-The **IsConnected** function returns true if the NXT brick is currently connected to the phone/tablet. Unlike [[nxt_checkconnected|CheckConnected]] method, it will **not show a popup warning message** and return false if no brick is currently connected.+The **IsConnected** function returns true if the NXT brick is currently connected to the phone/tablet. Unlike [[nxt_checkconnection|CheckConnection]] method, it will **not show a popup warning message** and return false if no brick is currently connected.
 <code>connected = nxt.IsConnected();</code> <code>connected = nxt.IsConnected();</code>
  
Line 28: Line 28:
     if (nxt.IsConnected()) {     if (nxt.IsConnected()) {
         btnConnect.SetText("[fa-unlink] Disconnect");         btnConnect.SetText("[fa-unlink] Disconnect");
-        app.ShowPopup( "Connected to Bluetooth device: "+nxt.GetBtName() + " : " + nxt.GetBtAddress() );+        app.ShowPopup("Connected to Bluetooth device: "+nxt.GetBtName()+" : "+nxt.GetBtAddress());
     }     }
 } }
built_in/nxt_isconnected.txt ยท Last modified: 2015/03/11 18:03 (external edit)