Questions tagged [programming]

Questions about programming the various LEGO programmable bricks, including Mindstorms (EV3, NXT, and RCX), Wedo and Scout, in either the provided languages and editors, or more advanced languages.

Filter by
Sorted by
Tagged with
5
votes
1answer
891 views

Custom EV3 Block: “Unable to compile…” (“string subsection”)

I am attempting to make a custom block according to the EV3 Block Developer kit (found here). I was able to create a simple block that returns the length of a string. This is what it looks like: (The ...
5
votes
1answer
104 views

How to mirror an EV3 motor?

I want to get one EV3 large motor to copy the other. So if I move one half a rotation the other copies.
4
votes
2answers
94 views

Is there a time mechanism that can be added to an NXT program?

I wanted to create a system where an NXT block would be set into function at a certain time of day (maybe 5:00 and then 5:10 and so on). I would want the timing function to be embedded into the NXT ...
4
votes
3answers
1k views

Holonomic robots using Mindstorms

I just got some Rotacaster wheels and want to try building a 3 wheeled Mindstorms omnibot (holonomic robot) and I'm looking for a practical (easy) discussion about writing a driving program. I've ...
4
votes
4answers
5k views

What are the programming languages that can be used on Lego Mindstorm EV3?

My son is interested in robotics. For me, I would like maximum flexibility for programming. For my son, I guess something simpler would be preferable so that his interest is not killed by complexity ...
4
votes
3answers
8k views

Invert motor block in EV3

New to EV3 so this should be simple. I would like my simple wheeled robot to go backwards. So I put two invert motor blocks, one for port B the other for port C followed by a move steering block. The ...
4
votes
3answers
3k views

What is a normal range of reading of the Light Sensor using EV3 Raw Sensor block?

EV3 software does not support the Light Sensor. It does support the Color Sensor. The solution is to use the Raw Sensor Block. What is "normal" for raw sensor block readings? I'm getting readings ...
4
votes
1answer
154 views

LEGO MINDSTORMS EV3 Can't find MyData Block

While going through the challenges of the Gyro Sensor Investigation I came upon the issue that I do not have the MyData Block (It's a dark blue block with a graph on it) on the coding program. Could ...
4
votes
1answer
771 views

How to make Lego Mindstorms EV3 robot go in reverse when move steering input comes from proximity sensor

I saw an program on the Lego Education page which makes a Lego Mindstorms EV3 robot gradually slow down as it approaches a wall. The info from the proximity sensor is used as the direct wire input of ...
4
votes
1answer
524 views

How to minimize the impact of erroneous sensor readings?

A group including myself are using the Lego Mindstorm kit to design a robot that is going to compete in a school competition. However, the sensors aren't as reliable as we would like them to be, ...
4
votes
2answers
2k views

Sort the program list on EV3

When uploading a project to the EV3 brick, is there a way to control the sorting order of the programs on the brick? E.g: Prog_1 Prog_2 Prog_3 ... When playing a robot match in FLL one often needs ...
4
votes
2answers
182 views

Is there any way to find misplaced bricks in LEGO NXT Programming?

I am working on a Mindstorms NXT project. Due to annoying bug (cannot find terminal hotpoint thingy) I can't delete a specific block, and if I do so, part of the program will be cut off from the main ...
4
votes
1answer
266 views

Setting priorities in LEGO NXT Programmer

For a sumo bot competition I made a robot that has a perfectly functioning ultrasonic senor. However, when I made a second branch on the program for a light sensor, I calibrated the light sensor and ...
4
votes
1answer
2k views

How to program light sensor to follow moving light using NXT

Cannot figure out how to simply program Lego Mindstorm NXT robot to follow another moving robot that has a bright LED light attached to it. Currently my programme looks like this:
4
votes
2answers
381 views

Lego EV3 - Get output device type, opOUTPUT_GET_TYPE

I would like to know what kind of motor (XL, L) is connected to EV3 output port (A|B|C|D). I need to use direct command: Instruction opOutput_Get_Type (LAYER, NO, *TYPE) Opcode ...
4
votes
1answer
143 views

NXT brick not executing programs correctly

I have an issue that I am hoping someone might be able to resolve: We're using Mindstorms in the classroom as part of a STEM program, and have one NXT brick that won't execute programs correctly. The ...
4
votes
1answer
617 views

NXT Programming not working

I recently got back into NXT stuff (keep in mind I have a NXT 1.0). My screen was broken, but I got it fixed. The software works, but I think the programming doesn't. I tried to make the motor move ...
4
votes
1answer
229 views

Is code written for NXT bricks compatible with EV3 brick (for Johnny 5 building)?

My son is mad on the robot from Short Circuit (Johnny 5) and I want to build robots with him. We have a copy of Daniele Benedettelli's "Creating Cool Mindstorms NXT Robots" and I was planning to start ...
4
votes
2answers
568 views

How can I find the analog output of a color sensor?

Could anyone provide me with an image of the voltage output of an NXT or EV3 colorsensor. I would like to have the analog output if it's possible, and not the digital output.
4
votes
1answer
67 views

DNX on LEGO Mindstorms

I am not familiar with ARM development but I am wondering would it be possible to compile DNX against LEGO Mindstorms EV3 processor. I know there is some ARM support and even there are some builds ...
4
votes
0answers
618 views

Daisy chaining EV3 with RobotC

I'm trying to run EV3 programs with RobotC and trying run on EV3 Daisy Chaining. I have three independent EV3 bricks labelled A,B,C. I want, according to the color reading by the color sensor on ...
3
votes
3answers
331 views

Access WeDo on OS X from a real programming language

I'm trying to talk to the WeDo USB interface from Python or really any real programming language. I tried the clever WeDoMore library, but can't get it to bind the WeDo. I think this is because the ...
3
votes
3answers
321 views

Could not open serial port or USB device

I am trying to use my old RCX 2.0 set on Linux (Xubuntu). The problem is that when I try to download the (official) firmware into the RCX via the command: nqc -Susb:/dev/usb/legousbtower1 -firmware ./...
3
votes
2answers
302 views

How To Plug Detected Light Values into Variables and Still be Usable in Programs in EV3-G

I've seen teams, mostly in the world festival do this, and what they do is they program the robot so that when a brick button is pressed, the robot detects a value (usually RLI) and it is used later ...
3
votes
1answer
171 views

Are variables always global with NXT?

New to NXT software. What I'm trying to do is get my motor to go one of 5 distances, but I'm not sure how to choose between those actions. What I thought of was setting 5 variables to 5 sensors. The ...
3
votes
2answers
193 views

A wired data logging brick

I need a data logging brick where I can wire an input to the file name. Is this possible? and if so how would I do this?
3
votes
4answers
2k views

IDE recommendations for EV3 programming

Does anybody have any recommendations for non-GUI programming of the EV3 unit? I'm impressed by the LabVIEW software, but as a professional C# and VB.Net programmer (with C, C++ experience), I find ...
3
votes
1answer
1k views

EV3 Block problems?

I don't see what is wrong with the way i made my program. It looks like this. The idea is that in the while loop [01] shall the robot move forward until it see something brown. If it see ...
3
votes
1answer
3k views

RGB sensor HOWTO use?

I've got an RGB sensor (this one with the three LED thingies) and wonder how to access it using NXC. I know I can SetSensorColorFull(IN_1); and then access it using ReadSensorColorEx or, for ...
3
votes
1answer
229 views

Where can I learn how to program an NXT using C#?

I've been toying around with my NXT 2.0 set for a few years now and I would like to learn how to program it using C# language. I have no experience in coding and I am definitely not a computer geek. ...
3
votes
3answers
2k views

My Blocks with return parameter

I have the retail EV3 kit and have created a function with in and out numeric parameters. While using the [in] params seem quite straight forward, it seems that I can only set the [out] param once. ...
3
votes
1answer
1k views

Can EV3-G MyBlocks be recursive?

Imagine I create a MyBlock called function1 from a line of blocks. Can I call that block from within itself? This is the program for the block recursiveTest. Will this block function properly?
3
votes
1answer
162 views

NXT brick erratic programming behavior

I think I have a defective NXT brick. It has been programmed to move in a direction for 1 second, wait 1 second and then move in the reverse direction for 1 second. The code downloads on another ...
3
votes
2answers
185 views

I need a block that can combine a movement program with NXTbee radio

I am a student. I am working on a science project using LEGO Mindstorms robots enhanced with NXTbees creating a mesh network. My engineering mentor has me using LabVIEW. I am trying to find a block ...
3
votes
1answer
2k views

Trying to get a modified traffic signal challenge worked out

The challenge is for a robot to go around the perimeter of a rectangular field and execute 90 degree turns when it gets within 4.5 inches of a wall. Simultaneously, if the bot encounters a red flag, ...
3
votes
1answer
144 views

Teleoperated arm trouble

I have built a robotic arm with the lego Mindstorms ev3. My goal is to control its motion via teleoperation, that is , to have a gyro sensor strapped onto my arm and have the robot mimick the up and ...
3
votes
1answer
483 views

What are the memory requirements of EV3-G software blocks running on NXT bricks?

The NXT brick has about 130K memory available for user programs. With the newer firmware required for downloading EV3-G programs that memory has been reduced to 118K. How much memory is used by the ...
2
votes
2answers
174 views

How to make an exact 16 degree turn?

Does anyone know how to make an exact 16 degree turn with a LEGO robot?
2
votes
3answers
987 views

Which programming environments or APIs are available for the lego BOOST?

Over the holidays I tried the following Python library: https://github.com/undera/pylgbst but I couldn't get it to work. Then again my knowledge of Python is very limited. I'm more experienced with C+...
2
votes
1answer
84 views

Stepping through Mindstorm program

The code does not do what I think it should. It is frustrating to tweak it, download it, run it from the block, and find that once again, it does not do what I think it should. Is there some way to ...
2
votes
1answer
3k views

Can you extract a program from the EV3 brick to the computer?

As part of an assignment, I made a program for my EV3, but however my computer automatically restarted, so I lost that program. I need to show the program! However, the program is still in my brick. ...
2
votes
1answer
291 views

How do you interrupt a MyBlock?

I have a "general-purpose" line-follower encapsulated in a MyBlock that runs an infinite loop. Now, in a client program, I would like to interrupt that MyBlock if some condition is met; what the ...
2
votes
1answer
379 views

EV3 Wired Brick to Brick communication

I'm currently working on a project for my intro to engineering class. As it stands now, one brick is running a LabView program to intake data from a 'barcode' and another brick runs a Matlab program ...
2
votes
1answer
381 views

Direct/system command for reading the display buffer of EV3 bricks?

I recall being able to read in the display buffer of NXT 2.0 bricks over Bluetooth/USB by issuing Read IO Map system commands. I've looked through the bytecodes and communication documentation for the ...
2
votes
3answers
3k views

The Mindstorms EV3 Software crashes on OS X Yosemite 10.10.3. What do I do?

It's crashing on startup which is really irritating. When debugged with terminal it says this: Unhandled Exception: System.UnauthorizedAccessException: Access to the path is denied. [ERROR] FATAL ...
2
votes
1answer
116 views

How to make NXT bricks communicate information?

Is it possible to connect, in some way, two NXT bricks that has program functions running on both. For example, Brick one would tell brick two that it is okay to start a program. Are there any sensors ...
2
votes
3answers
143 views

EV3 Multiple conditions: wait sensor activation for N seconds or

How to program EV3 to wait for a sensor activation for at most X seconds? If the sensor is activated in the given time, begin sequence B. If it is not activated in X seconds, begin sequence A. ...
2
votes
3answers
326 views

How to retrieve a deleted program file from the lego NXT

I have been programming a complex file for my lego NXT. I accidentally deleted my file from the PC, but it is still available on my NXT brick. Is there any way that I can retrieve the file from my NXT ...
2
votes
1answer
64 views

Can I get a JSON value from the internet without flashing a custom FW on EV3?

Got an EV3 for X-Mas. My old NXT brick was broken. So now I have a ton of motors and sensors and all. First project I'd like to create a Bitcoin piggy bank which performs some actions when it gets new ...
2
votes
1answer
3k views

EV3 turning in circles

New programmer feeling my way around. I set the most simple "steering block" to 25, the power to 50, and the number of motor rotations to 40 or 50. Then I let it run expecting the bot to go in a ...