Skip to first unread message
Assigned to lizl...@google.com by taifu...@gmail.com

Cate Sheller

unread,
Feb 26, 2016, 2:54:55 PM2/26/16
to MIT App Inventor Forum

I have App Inventor app that connects my Android via Bluetooth to a Lego NXT brick running LeJOS. All of the remote control functions work perfectly except for the that attempts to use NXTdirectcommands; on that one I get "Error 401: the Bluetooth property has not been set."


I am mystified by this error, as all of the other commands (for controlling the motors) work just fine, both before and after I click the Run Program button and receive the error. Here's a screencap of my blocks:

The one that's giving me trouble is the last one, "when ProgramButton.Click." My original intention was to have it run a program stored on the brick, but since that wasn't working I tried the current incarnation, in which I'm just trying to get the NXT brick to play a tone - instead I get the bluetooth error. Anybody know what I'm doing wrong?

lizlooney

unread,
Mar 1, 2016, 3:19:41 PM3/1/16
to MIT App Inventor Forum
You need to go back to the Designer (not Blocks) and select your NxtDirectCommand1 component. In the Properties panel there will be a property named "BluetoothClient". You need to click on that and select your BluetoothClient component. Here's what it looks like:


Reply all
Reply to author
Forward
0 new messages