Tag Info

Hot answers tagged

15

The programming interface used by LEGO creates programs which make use of the standard firmware, that is, the one provided by LEGO. If you look at alternatives (see also this answer for more information), you'll notice that quite a lot of them use the same firmware. This means that the programs they produce use the same language which is interpreted by the ...


10

I was looking into this just recently. There are libraries and also it seems there are other firmwares offering alternative operating systems you can embed on the Mindstorm. For C++ you could try: nxtOSEK is an alternative OS offering a C++ api BrickOS is an alternative OS with a C/C++ development environment NXT++ is a C++ lib for controlling the ...


9

There are alternate text-based programming languages for the NXT. Three of the most popular ones are NXC/NBC, LeJOS NXJ, and RobotC. There are many more, all with their pros and cons, and are much more versatile than NXT-G, even on slow computers. I my personal favorite is NXC/NBC. But really it's up to you. The best way to see what suits your needs is to ...


8

Yes, this is definitely possible! You can connect up to 7 different NXT devices from one computer and one Bluetooth dongle (theoretical limit). I have tested this with the RWTH - Mindstorms NXT Toolbox for MATLAB) successfully with 5 NXTs on Linux and with at least 2 NXTs on Windows. In real life, it depends on your Bluetooth hardware. Your Bluetooth stack ...


6

You can't calibrate the motors, neither mechanically or in software. There is however several methods in the software to account for this. The standard NXT firmware contains a synchronization mode which attempt to keep the two motors aligned. In NXC you can do this by using the function OnFwdSync like this: OnFwdSync( OUT_AC, 75, 0 ); First parameter is the ...


6

The difference in speed can't be avoided. Even if the motors themselves were carefully paired, differences of friction on the axles or weight unbalance of the robot would result in speed mismatch. I am not used to LabVIEW, but the NXT firmware has a way to synchronize two motors, this functionnality should be available in LabVIEW.


6

I think that all you might need is the Microsoft Robotics Developer Studio. The examples that I could find all refer to C#, VB.Net, or the included VPL languages but there isn't any reason you wouldn't be able to reference the same objects from managed C++. It does look like there might not be a full set of services for all of the more recent parts judging ...


5

It turns out that the issue is a faulty/weak motor connector socket. While randomly trying to troubleshoot, I found that if I did nothing more than press or move the cable, the motor would act bizarrely. Initially I thought it was a bad cable, but after trying additional cables it seems that it is more likely just a poor connection at the motor. I suppose ...


4

You can program the raw hardware: The main microcontroller in the NXT is an Atmel AT91SAM7S256 (data sheet), which uses the ARM7TDMI core from ARM. This core is supported by gcc, so you can use GNU tools to program it in Assembly/C/C++. You can build a firmware for the AT91SAM7S256 and load it via USB, after putting the controller in SAM-BA mode by a long ...


4

Mitch Resnick at the MIT Media Lab is the developer of both Scratch and the original Mindstorms programmable brick, and the original Mindstorms programming interface was very similar to Scratch. If you have one of the original Mindstorms Robotics Invention System sets (and a PC of the proper vintage on which to run the software) she would probably find it ...


4

After looking around a bit in the NXT IO palette in LabVIEW, I found a few functions which will sync the motors while driving the robot. The "drive distance" and "steering on" VIs will both sync the motors appropriately to make the robot drive straight. The "motor on" and "motor reverse" blocks, which are the default options if you don't go down into the ...


4

Your code handling the behaviours like "Shoot 3 times if the touch sensor is triggered" or "Shoot if the light sensor is triggered" should use 'if' statements. Then, instead of always being called, the "shooting" code would append only on sensor events. After shooting, the robot would then go back to the "Driving around" part of the code. This page is a ...


4

The problem can be restated: 360 / 20 = 18 deg / sec = 1 deg / .056 sec One degree is the smallest increment provided by the rotation sensors. NXT-G has a timer sensor with 1/100th second resolution. In pseudo-code: Set a motorPower variable to 10 Start a timer Loop until rotationDegrees >= 360 If timeElapsed * 18 > rotationSensorDegrees ...


4

No, the standard NXT-G software provided by LEGO will not allow you to program a RCX brick. Outside of official software, your best bet is probably to use NQC which is C-like; there's also NXC for the NXT which is similar. There are a lot of others which have been discussed in the following questions: Is there any other way to program the Lego Mindstorms ...


3

I think the simplest way is to use an NXT Converter Cable (Available from Bricklink). This has an NXT connector on one end and the standard 9v connector on the other. You can connect the 9v connector to any 9v battery box, (e.g. Battery Box with Switch (9V)) and, depending on the polarity, power the NXT motor forward or backward. Now, the issues: The ...


3

As was pointed out, this question is not specific in nature, so it's hard to give a definitive answer. If you haven't already done so, it would probably be helpful head over to Lego.com and grab get the NXT 2.0 User Guide and perhaps begin looking through the sample programs. This book may also be helpful to you: The LEGO MINDSTORMS NXT 2.0 Discovery Book: ...


3

As you say yourself, you want to detect the tilt of the pendulum rod, so I'm assuming what you're after is actually its angle. Measuring anything else would probably result in tedious calculations anyway; and in addition, considering you'll want to try to keep the angle in a specific range, you'll need to know it. As such, an angle sensor may seems the most ...


3

I believe that you need to run the Mindstorms Education program in Compatability mode. The easiest way to do this is to: Right click on the Mindstorms shortcut on either your start menu or desktop and select "Properties". Switch to the "Compatability" tab. Check the "Run in Compatability mode", and from the drop down that is then enabled select "Windows ...


3

From the page you linked to we can see that the NXC OnFwd method has the following parameters: void OnFwd (byte outputs, char pwr) The power or speed parameter is listed as a char type, and looking around elsewhere on the site we find the definition of the char to be: In NXC the char type is a signed 8-bit value. This type can store values from ...


3

I believe one possible answer can be found in the sample program for the color sorter in the Mindstorms control software. The technique that kit uses is to create a series of nested if/then loops: if (Color == red) { //do red things here } else { if (Color == blue) { //do blue things here } else { if (Color == green) { //do green things ...


3

The ultrasonic cannot detect the color of objects. It's just to detect the distance between the sensor and an object in it's line of sight. To find objects in the surrounding area of your robot you have to look all around. This is simply done by rotating your robot or your sensor. When you measure a distance in a certain range (best results between aprox. ...


3

As far as I remember there is no possibility within NXT-G to programmatically execute another program. Moreover, as I understand it the default firmware simply doesn't have that possibility (the command to start a program is a direct command which must be sent via bluetooth and can't be used in a program). Maybe other programming languages using other ...


2

It sounds like you will need to create an infinite loop block to constantly check which touch sensors are being pressed and if not, carry on with whatever instruction you wish. The loop block can be found under the flow category: I recommend you read through the instructions (listed under Help > Contents and Index... in the LEGO MINDSTORMS NXT software). ...


2

I would recommend you post this question to the National Instruments Discussion Forums. We have a dedicated board for supporting the LabVIEW for Mindstorms software. Since you are using LabVIEW, you can post the question there and NI support engineers are guaranteed to help you. http://forums.ni.com/t5/LabVIEW-for-LEGO-MINDSTORMS-and/bd-p/460


2

I am not used to LabVIEW... but RIC image files, supported by NXT firmware, can also be used by LabView I guess. So nxtRICEdit may help. See also RICfont utility, more information (though targetted NXC/NXT-G, should be useful) here.


2

Most sensors have the capability of sending you notifications or updates as the value of their sensor changes. This is accomplished by repeatedly contacting the NXT brick and querying the sensor. The polling frequency allows you to configure for each sensor how often this is done. In most cases, you may leave this value set to 0, which indicates ...


2

If you are you using ROBOTC 2 for RCX you need to install the separate driver for windows 32bit. This driver is not included in the ROBOTC install (at least not with version 2.03). It might also be a good thing to start with a fresh install of ROBOTC 2.03.


2

By "smoother limit", if you mean "when it gets closer to the limit, it will softly land there by slowing down" then: I recommend using PID control where the response (how fast the motor is moving to the limit) is controlled proportional to the error (how far away from the limit you are). Wikipedia has a good intro to PID control: ...


2

The RWTH documentation about initiating connections has a sub-chapter called "Using multiple NXTs" which can be found here: PC to NXT Communication - Using multiple NXTs The C++ communication from norgesgade14.dk claims to support: "Open and close connections with multiple NXT units" on its overview page. So it should be possible to do this, though I can't ...



Only top voted, non community-wiki answers of a minimum length are eligible