Questions tagged [nxt]

The NXT tag should be used when asking question about programming in the NXT 1.0 or 2.0 environment, or about programming the NXT 1.0/2.0 controller using other methods than the language/environment provided by LEGO.

NXT is the previous version of the LEGO Mindstorms robotics kit. NXT includes the microcontroller and the software to program it.

The NXT software was developed for LEGO by National Instruments (makers of LabView) and is a graphical, drag-and-drop programming environment.

NXT environment allows interaction with a wide range of sensors available for the controller as well as interacting with up to 3 motors per controller.

139 questions
1
vote
0 answers

Rotating lego nxt based on an angle

I would like to knows is there a way to rotate the lego nxt using an angle based on two points r(x1,y1) and p(x2,y2) without causing any miscalculation when the robot changes from facing north to south,east or west. Thanks Regards, Edward
Edward
  • 93
  • 10
1
vote
1 answer

Difference between NXT-G visual programming and NXC C-like programming of Lego brick

I'm approaching to Lego NXT programming and I started from the very good site http://nxtprograms.com . In particular I followed instructions for the simple Segway with light sensor as balancing sensor…
user1131951
  • 141
  • 7
1
vote
3 answers

Output Values in the Ultrasonic Sensor for the Lego NXT

I am trying to read ultrasonic sensor reading from an Lego NXT robot using the programming language NBC (Next Byte Code). It says on the Lego Website that the sensor readings range from 0 -255 cm but when I output the sensor data, I get values…
jonathan1987
  • 251
  • 1
  • 6
  • 17
0
votes
1 answer

LabVIEW: multiple loops using the NXT

I have two loops which, when tested separately, works! One loop reads the sonar-sensor and controls motor B+C. The other loop also reads the sonar-sensor but controls motor A. When these are in two separate VIs (ie. no multi-looping), it works as it…
0
votes
3 answers

Why does this program work in LabView when targeted to computer but not to NXT?

I have a program written in Labview for my LEGO Mindstorms NXT 2.0. When the target is set to the computer, the program works just fine. However, when I set the target to the NXT, the program doesn't work the same as when targeted to the…
William
  • 570
  • 3
  • 17
0
votes
1 answer

How to return array from function in NXC?

How to return array from function in NXC? I tried the following string[] strsplit(string str) { string parts[2] = {"1", "2"}; return parts; } but I get Variable name expected. Why? P.S. if there built-in split function I'll be glad to…
theateist
  • 13,879
  • 17
  • 69
  • 109
0
votes
2 answers

Simultaneously bluetooth remote (android) and run program

I'm a student on a hogeschool in the Netherlands. We're working with the LEGO Mindstorms NXT for a project. However, I'm using my phone (minddroid and other applications) to drive the NXT, but I don't know how to simultaneously run a program. For…
Tim Lodder
  • 49
  • 1
  • 12
0
votes
1 answer

how can a light sensor be used to read colors, in particular red

how can a light sensor be used to read colors, in particular red. I don't have a color sensor, I have a light sensor. how can i use light sensor instead of color sensor
0
votes
3 answers

Android - Connecting Samsung Galaxy Ace VIA Bluetooth to NXT

Ok so I've added the permission to the manifest file and paired my devices but I am getting a crash right here: Set pairedDevices = btAdapter.getBondedDevices(); I attempt to connect via a button click: private OnClickListener myListener = new…
richard
  • 87
  • 1
  • 2
  • 7
0
votes
1 answer

Problem with passing object as an argument to createProcess

I am trying to correct a program that makes to other programs with the createProces call. The problem is when I pass an object of the Brick class as a parameter of the createProcess call. I create the object (in the main) this way: char…
RSNL
  • 213
  • 3
  • 15
0
votes
1 answer

jni.h no such file or directory

To install leJos for NXJ brick i follow the documentation tutorial , i set the variables like this : ` export NXJ_HOME=$HOME/leJOS_NXJ_0.9.1beta-3 export LEJOS_NXT_JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 export…
Raymond17
  • 73
  • 1
  • 9
0
votes
2 answers

Programming a timer counter in C#

I am developing a C# application which is supposed to receive data from a Neurofeedback software and transmit it to a Lego NXT brick. Everytime a certain goal is reached inside the Neurofeedback Software, the Software transmits through a TCP socket…
Mudkip
  • 373
  • 6
  • 27
0
votes
1 answer

Can you help me with this simple RobotC exercise?

I mean 2. Second Length found here I think I found all mistakes but still, I can't seem to get the right answer. On line 8 it should be wait1Msec(3000); instead of wait1Msec(4000); Swing turn to the right should be written as 100 power for C and 0…
0
votes
0 answers

Need some help on RobotC coding

I'm working on a project and I really need some help to understand how lego-temp.h works. I want to make a while loop so that I can measure the temperature while the robot is moving. The loop will stop when I'll find a temperature higher than the…
RaizO-
  • 1
0
votes
5 answers

String .replace() not applicable

I am trying to remove the non-number characters from my string. I have tried using the .replace() method but this returns with the error: The method replace(char, char) in the type String is not applicable for the arguments (String, String)…