Questions tagged [programming]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
70 views

Program just stops motors and won't move

I'm trying to make a program in the NXT software that turns on the motors unlimited, then waits until something is less than 30 cm, stops the motors, turns to the left 30 degrees and saves the value ...
4 votes
0 answers
243 views

Migrate Lego Boost Android app data to another device

I have a Lego Boost Android application installed on device #1 and the app is logged into my LEGO cloud account (the same used for Lego Life etc. too) and is fully synced with cloud. On this device I ...
0 votes
2 answers
186 views

Mindstorms - want to perform various tasks, but never two of the same in a row (and other restrictions)

I want to make a program that does a few things in a random order: I have this so far: The problem here is... I have set the switch block with the random number block to 3 different programs to run. ...
4 votes
1 answer
582 views

When using pi * distance between wheels/tracks, how do I measure distance between wheels?

I am trying to make a program that requires my 51515 to turn a specified number of degrees. I found a way to do that on the LEGO app's "Knowledge Base", but the given example was: import ...
8 votes
6 answers
9k 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 ...
8 votes
1 answer
255 views

Help with my Ev3 printer

I'm building an image printer using my ev3 set and several more pieces, as a project to keep me occupied while I'm stuck at home. Here's how it looks: I've done the build part, the way I've chosen to ...
9 votes
2 answers
2k views

Programming on a chromebook with EV3

How do I install the new Lego block programming software on a chromebook? We have the standard version, but want the new one that looks like Scratch.
6 votes
1 answer
384 views

Why doesn't my LEGO Micropython remote control program work?

I am writing an EV3 micropython program meant to test my remote, but it does not work. When I run it, I see no errors at all. Instead, I just see a "play" symbol and the program continuously ...
4 votes
3 answers
3k 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 ...
0 votes
1 answer
161 views

Using Power functions to teach robotics

I am a robotics engineer and I would like to introduce and teach my girlfriend to robotics. I would like to first get her the material for the first project. I would love to build a small Lego car ...
2 votes
1 answer
385 views

Where's the iNXTG app for programming NXT from iPad?

I'm trying to find the old iNXTG to program NXT bricks via iPad but it is no longer available in the Apple Store. Does anyone know if there exists an archive for programs like that? The problem is ...
1 vote
0 answers
202 views

Strange blocks appeared in my program

In my Mindstorms program, I found these strange blocks. They appeared when I sent this program to my other PC on Windows 10, which is more powerful. They don't work and I can't change them. Mindstorms ...
22 votes
8 answers
16k views

Can you program Lego Mindstorms with the Scratch programming language?

My child is learning programming using Scratch in school. Can she program her Mindstorms using Scratch?
11 votes
4 answers
7k 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+...
1 vote
0 answers
133 views

EV3 square pattern motion [closed]

I'm trying to make my EV3 robot move in a square path, and an infinity path. I've tried this code for a square path but it's not working.
1 vote
2 answers
476 views

How do you display multiple items at once on an EV3 screen?

I'm trying to make a program on the EV3 that will imitate the shutdown process. At first, I wanted to make my life easier by naming the program "Shutting Down" and not interfere with the display in ...
4 votes
2 answers
757 views

How to make an exact 16 degree turn?

Does anyone know how to make an exact 16 degree turn with a LEGO robot?
1 vote
0 answers
121 views

EV3 software crashes when coding color sensor switch, how can I fix this? [closed]

When students use the switch block to program the color sensor on their Chromebooks, the app crashes. We have all accessibilities turned off and the OS is fully updated. What other troubleshooting ...
0 votes
1 answer
399 views

Where to start with a custom firmware for the NXT

In the process of hardware hacking with my NXT 2.0 I Found no easy way to connect the device as a USB storage device. Is there a specification that states how the NXT interacts over USB, or should I ...
5 votes
2 answers
254 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.
2 votes
0 answers
270 views

Lego Mindstorms Software: "Error code: 4"

After updating my EV3 Brick's firmware from V1.09E to V1.10E and reinstalling the Teacher Edition of the Lego Mindstorms EV3 software (even though I'm not a teacher), I decided to recover my Brick's ...
5 votes
2 answers
362 views

How can I program a motor to rotate towards the source of sound?

I have 3 sound sensors and a motor connected to four ports of the same brick. My motor should rotate by some angle towards the highest sound detected by the sensor, and now I'm wondering how I'm ...
4 votes
1 answer
2k views

Is there a duplicate/copy paste function in Lego Mindstorms Ev3 programing?

I remember, when I first started out Lego Mindstorms, there was a copy and paste (duplicate) blocks function. I could highlight and right click the blocks then press on duplicate to make another copy ...
3 votes
1 answer
147 views

Error message when using loop index as an array index to get value in arrays

My program moves an ultrasonic sensor around 260 degrees and the values are recorded down in an array variable every 2 degrees it turns. It moves back and measure it 3 more times, storing each ...
6 votes
1 answer
1k views

How to build an automatic Lego train system?

I was wondering if anybody has ever tried using the IRLink NXT sensor to make an automated train system and if so, what kind of setup did you have to make it all work? I have been working on a train ...
2 votes
3 answers
1k views

How to retrieve a deleted program file from the lego NXT

I have been programming a complex file for my Lego Mindstorms 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 ...
0 votes
1 answer
409 views

Is the EV3RSTORM from Lego Mindstorms programmable using a real programming language? [duplicate]

I'm a software developer and Lego fan. I'll create a robot with Lego Mindstorms, but I'll like to know that the is EV3RSTORM is programable using a real programming language (Python, C#, JavaScript, ...
2 votes
3 answers
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
0 answers
331 views

How to get Lego Mindstorms EV3 expansion set (45560) programmes in Scratch

I bought recently Mindstorms EV3 expansion set (45560) and found out that the available programs are written in old LabView-style programming language: https://le-www-live-s.legocdn.com/sc/media/files/...
5 votes
1 answer
2k views

Can't send multiple commands to EV3 using Python

I want to use Python to send commands to an EV3 brick. In C++ things work as expected - for instance, this starts the motor on port A and then stops it after a while: #include <unistd.h> #...
1 vote
0 answers
780 views

Bluetooth connection between EV3 brick and MacBook Pro fails after 2 seconds

As I was adviced, I searched for same questions before posting mine but although some are similar, I can't make their answer useful for my problem. I have a Mindstorms EV3 Education brick and a ...
0 votes
1 answer
435 views

EV3, menu with the buttons?

I've been trying to make a menu that when you press the < button on the block it will start and > button to stop. The menu will also only occur at the start, it will not be ongoing. I've ...
10 votes
1 answer
3k views

Where can I find documentation on the LEGO Wireless Protocol for Powered Up devices?

LEGO BOOST and LEGO Powered Up Smart Hubs use Bluetooth Low Energy to communicate to apps. Where can I find documentation on the communication protocol so that I can build my own app for these devices?...
6 votes
5 answers
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 ...
4 votes
1 answer
13k 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
1 answer
4k 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 ...
0 votes
1 answer
654 views

LEGO EV3 Ultrasonic sensor missing from Home Edition programmer [duplicate]

I'll get straight to the point: When I open my LEGO MINDSTORMS EV3 Home Edition programmer and try to use an ultrasonic sensor, there is no option for it in any blocks. I don't even see any allusion ...
1 vote
1 answer
985 views

A 90 degree turn with Wheel part number 56145

I'm making a program for my ev3rstorm and I want it to have a 90-degree spin turn. I use the standard part ev3rstorm wheelbase or rather, treadbase. Using the move tank block (I use that block all the ...
1 vote
1 answer
81 views

How to make Spik3r move without the pincers moving

How do you make Spik3r move without the pincers moving as well? Seems like the legs are only controlled by the motor on port B, but the move tank and steer modules only allow for the use of 2 ports. ...
8 votes
1 answer
5k views

Mindstorms 2.0 can't download to NXT brick with error 142023

Using Mindstorms education 2.0 on a Windows 7 computer I can't seem to get the program to see the NXT via USB or bluetooth dongle. When connected by USB nothing appears in the NXT window with device ...
3 votes
3 answers
793 views

Could not open serial port or USB device, RCX on Linux

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 ./...
1 vote
1 answer
385 views

EV3 does not react to Bluetooth commands after 1.7 seconds

Short description: I want to send commands via Bluetooth to an EV3 brick from a Linux computer. I use python to send bytecodes via Bluetooth and not any EV3-specific software Pairing the device was ...
2 votes
1 answer
896 views

Stepping through Mindstorm program for debugging

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 ...
1 vote
1 answer
1k views

Using a remote control for an EV3 robot?

I have just started to get into using a LEGO Mindstorms EV3 robot. I know you have to create a program on the laptop, then it has to be downloaded to the EV3 block. Can you use a remote control to ...
2 votes
1 answer
71 views

Unsure of how to use a switch that is time dependent

Have been trying to make a line follower that can auto-correct itself if it would lose the line. The follower is supposed to turn around, go forward and catch the line if the line has not been ...
1 vote
0 answers
608 views

Loop interrupt stops all loops, not just the one designated

I have been using loop interrupts for a while, and not had an issue... until now. And it is driving me nuts. My program has 2 main loops, titled "touch" and "end" with two more nested in the "touch" ...
2 votes
1 answer
228 views

LEGO mindstorm - which product to use to make projects mentioned below

I'm planning to buy a Lego Mindstorms kit for the following projects. I haven't really used Lego before - my friend asked me to consult him about projects (I use microcontrollers and build robots from ...
3 votes
0 answers
457 views

Creating custom blocks using EV3 block developer kit

I am trying to develop a custom block using ev3 block development kit but I get nowhere. I created the XML files according to the documentation and the VIX file but it does not compile, I cannot ...
2 votes
1 answer
109 views

Rearing off to the left without telling it to

I've started to build a robot, but when it drives it veers off to the left even though I'm just telling it to go straight. I think I need to do something to the motors but I don't know what or how. I'...
2 votes
1 answer
190 views

How to distinguish between objects using a sonic sensor?

I am trying to find a ball in the field, grab it, and drop in the specified area. I'm using an ultrasonic sensor on the front of the robot. My current solution for locating the ball is: Turn ...