====== GetBtName ====== The **GetBtName** function returns Bluetooth name of a connected NXT brick NXT brick name given as optional **obj** parameter. btName = nxt.GetBtName(); btName = nxt.GetBtName( obj ); ====Example - GetBtName / GetBtAddress of connected NXT==== var nxt, lay, btnConnect; function OnStart() { lay = app.CreateLayout( "Linear", "VCenter, FillXY" ); btnConnect = app.CreateButton( "Connect", 0.5, 0.1 ); btnConnect.SetOnTouch( btnConnect_OnTouch ); lay.AddChild( btnConnect ); app.AddLayout( lay ); nxt = app.CreateNxt(); nxt.SetOnConnected(onNXTConnected); } function onNXTConnected() { if (nxt.IsConnected()) { app.ShowPopup("Connected to: "+nxt.GetBtName()+" : "+nxt.GetBtAddress()); } } function btnConnect_OnTouch() { if (!nxt.IsConnected()) { //Show list of NXT devices. nxt.ShowDevices(); } }