User Tools

Site Tools


built_in:nxt_setonconnected

Differences

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

Link to this comparison view

Next revision
Previous revision
built_in:nxt_setonconnected [2015/03/09 16:22]
octazid created
built_in:nxt_setonconnected [2015/03/11 15:50] (current)
Line 1: Line 1:
 ====== SetOnConnected ====== ====== SetOnConnected ======
  
-The **SetOnConnected** function allows you to set the name of a function that you would like to be called when the NXT has been successfully connected via Bluetooth.+The **SetOnConnected** function allows you to set the name of a function that you would like to be called when the NXT has been successfully connected via Bluetooth.\\ Do not use SetOnConnect while using SetOnConnected!
 <code>nxt.SetOnConnected( myfunc );</code> <code>nxt.SetOnConnected( myfunc );</code>
  
Line 9: Line 9:
 { {
   nxt = app.CreateNxt();   nxt = app.CreateNxt();
-  nxt.SetOnConnected( OnConnect );+  nxt.SetOnConnected( OnConnected );
   app.SetMenu( "Connect" );   app.SetMenu( "Connect" );
 } }
Line 19: Line 19:
 } }
  
-function OnConnect()+function OnConnected()
 { {
   app.ShowPopup( "Connected!" );   app.ShowPopup( "Connected!" );
 } }
 </code> </code>
built_in/nxt_setonconnected.1425918160.txt.gz ยท Last modified: 2015/03/10 00:22 (external edit)