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
6
votes
1answer
342 views

Where can one find the documentation for the LEGO Mindstorms Robot Inventor software?

Is the documentation (either official or unofficial) of the programming "language" for the LEGO Mindstorms Robot Inventor software available somewhere? Preferably online, without requiring ...
1
vote
2answers
57 views

How to get a random value in the LEGO Mindstorms Robot Inventor software

I am making a Python program with the LEGO Robot Inventor software which will, among other things, turn the robot a random amount periodically, which of course requires a random number. However, I ...
4
votes
1answer
506 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 ...
9
votes
2answers
82 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.
9
votes
1answer
125 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 ...
1
vote
1answer
135 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 ...
6
votes
1answer
130 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
1answer
117 views

Automating self built models

I have just started with Lego, building the excavator with the 2 Bluetooth hubs. Can I program a model I build using this type of hub and motors or do I require EV3 (if indeed EV3 allows you to ...
1
vote
0answers
187 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 ...
3
votes
1answer
64 views

Any way to get the current motor position or angle in WeDo 2 (when accessing hub via BLE protocol)?

I have managed to write a small C# program that lets me play around with the WeDo 2 hub. I can read sensor values or set the speeds of up to two connected WeDo motors independently (I am aware that ...
1
vote
0answers
54 views

EV3 square pattern motion

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
2answers
152 views

Online link to the LEGO NXT firmware (v1.31) source code or IAR ARM LEGO development tools?

I am looking for the source code to latest NXT firmware (v1.31). I found the binary image is on LEGO site: https://www.lego.com/en-us/themes/mindstorms/downloads, but no links to firmware source code ...
4
votes
1answer
215 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
1answer
61 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 ...
2
votes
2answers
164 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 ...
0
votes
1answer
100 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 ...
2
votes
0answers
98 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/...
2
votes
0answers
106 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 ...
1
vote
0answers
254 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 ...
2
votes
1answer
67 views

EV3 program runs fine when connected to PC but does not respond when copied to the brick

I am building the race car mentioned in the LEGO Mindstorms discovery book using an EV3 brick. The problem I am facing is that the driving program runs fine when the brick is connected to the PC via ...
2
votes
0answers
156 views

How do I make a single arm double tap a piano key?

I am trying to make a Lego play piano from ev3, where I have connected two arms to a single motor on either side using Lego elements. Both the arms move counter clockwise to one another (if one plays ...
0
votes
1answer
117 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 ...
2
votes
1answer
60 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. ...
0
votes
1answer
308 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, ...
1
vote
0answers
84 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
1answer
102 views

Detect distances over 255cm with EV3 ultrasonic sensor?

In my use case, I have to detect things about 3-4 meters. I don't need to be accurate, +-2 or 3cm is enough. The EV3-G and most other places have a max distance of 255cm, which I understand that it is ...
2
votes
1answer
105 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 ...
1
vote
0answers
42 views

T-R3X the look My Block problems [duplicate]

OK I am making the look My block for the T-R3X program but there is this block which don't know how to make at the end of the diagram in the book.
1
vote
2answers
168 views

What does this symbol on the EV3 Brick mean?

I can’t figure out how to get my R3PTAR to open and close it’s mouth to bite. I keep getting this symbol. What does it mean?
0
votes
0answers
59 views

Using switch block with Hitechnic color block

Can I compare the Hitechnic block --> measure --> color output in a switch block? For example, if the Hitechnic color sensor is seeing black, then do something, else do another thing. If not, then how ...
2
votes
1answer
97 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'...
0
votes
1answer
212 views

Using two color sensors simultaneously

I am new to the world of robotics, and I'm preparing a new project with my students. Our goal is to make a self driving robot that can read colored signs from the road in order to turn right or left a ...
0
votes
2answers
247 views

Can't link variable inside a switch when creating a new block

I have a problem when connecting the variable (from the create a block) to a variable in the function because it's inside a switch. How can I link them? I want to connect the variable to each (20) in ...
5
votes
2answers
217 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
1answer
203 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 ...
3
votes
1answer
68 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
1answer
563 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 ...
7
votes
4answers
5k 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+...
3
votes
3answers
313 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. ...
9
votes
1answer
2k 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?...
0
votes
1answer
139 views

How I can program a solar panel heliostat? [closed]

I want to make a program for an EV3 solar heliostat. It consists of two motors and a color sensor. I want it to follow the light. The station is fixed. EV3SolarStation pdf
1
vote
1answer
182 views

Program for NXT golf robot not looping properly

This is what I made: I will put this robot straight in line with the ball I have to make this robot go forward and once it reaches the ball, I have to make it stop and hit the ball with the swing ...
4
votes
2answers
371 views

How to make an exact 16 degree turn?

Does anyone know how to make an exact 16 degree turn with a LEGO robot?
6
votes
1answer
1k views

Is it possible to use 5 motors on an EV3 brick?

The EV3 brick has only four output ports (A B C & D) to run motors. Is there any way to use port 1 (sensor port) to control a motor?
2
votes
3answers
799 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 ...
1
vote
1answer
94 views

How to send through Bluetooth motor angle position and mirror that position on another motor?

I've built a steering wheel that checks the servomotor position using NXC function - MotorRotationCount(). Now, I want to send that position to second brick using Bluetooth and apply that servomotor ...
2
votes
1answer
337 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 ...
2
votes
1answer
255 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 ...
1
vote
0answers
108 views

Function in EV3 Basic

I have been programming in basic for ~30 years. I want a translation of the following code into EV3 Basic: function index( x , y ) return x + y * ( maxx , + 1 end function sub look for i = 0 ...
1
vote
0answers
533 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" ...