Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
2answers
70 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
33 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
0answers
53 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
0answers
31 views

Are there any coding platforms for my NXT available for my IPad?

Can anyone tell me any app on the App Store so I can program my NXT? Please let it not be one of those ones that you have to pay or one of those that are just controllers. Thanks for your help.
0
votes
0answers
37 views

LEGO train 7898 Arduino Library?

So I want to control the green 7898 train with an Arduino, but the library I have installed doesn't support this specific train. My question is if anyone knows a library that does?
0
votes
1answer
54 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
50 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 ...
3
votes
1answer
76 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.
1
vote
0answers
19 views

iNXTG app 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
1answer
60 views

Unsure of how to use a switch that is time dependent

Have been trying to make a line follower that can autocorrect 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 detected ...
0
votes
1answer
44 views

using a remote control

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
2answers
223 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
3answers
89 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. ...
6
votes
1answer
262 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
91 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
101 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 ...
2
votes
2answers
154 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
282 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
243 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 ...
1
vote
1answer
76 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
68 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 ...
1
vote
1answer
139 views

EV3 does not react to commands (sent via bluetooth) 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
67 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 ...
0
votes
0answers
311 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. The program has 2 main loops, titled "touch" and "end" with two more nested in the "touch" ...
2
votes
1answer
2k 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. ...
3
votes
2answers
250 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 ./...
2
votes
1answer
396 views

What is a better algorithm for wall following with an ultrasonic sensor?

This wall following algorithm uses the ultrasonic sensor. It has a horrible worst case behavior. Place the robot about 3 cm too far from the wall. Instead of moving closer to the wall, the robot ...
4
votes
1answer
125 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 ...
5
votes
2answers
214 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, how do I write an infinite loop ...
5
votes
1answer
628 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 ...
3
votes
2answers
267 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 ...
2
votes
0answers
35 views

NXT Mindstorms software glitch

My FLL team was doing some practice programming exercises this morning. One group wrote a program using color sensors, no issue. The next group opened a new program window and attempted to open a ...
2
votes
1answer
260 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 ...
1
vote
1answer
772 views

A 90 degree turn with 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 ...
0
votes
1answer
53 views

NXT light sensor homework help

Read value from NXT kit using light sensor and show it in the middle of NXT screen. If measured lightness value is less than or equal to 50, right motor will stop and left motor will move with the ...
2
votes
0answers
238 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 ...
1
vote
2answers
2k views

How can I create custom EV3 blocks?

What do I need to create custom blocks and in particular the VIX part?
2
votes
1answer
346 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 ...
0
votes
1answer
100 views

Bazooka blast ev3 Mindstorms using Python

I would like to shoot balls with the ev3 Lego robot. How can I code it using Python? Which components do I need for that and which function and motor use ?
3
votes
4answers
4k 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
1answer
224 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 ...
6
votes
1answer
1k views

What is the best way to program Mindstorms EV3?

I'm just starting to use the LEGO Mindstorms EVE robot and I'm a bit hesitant which way to choose for programming: the official graphic software or any alternative (preferably the Linux based ev3dev)? ...
2
votes
1answer
58 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
0answers
1k views

Bluetooth connection to EV3 from Java on Linux/Android

I would like to connect to my EV3 from PC (and then Android) via Bluetooth. I was able to connect to NXT with LEGO-MINDSTORMS-MINDdroid which uses direct LCP commands but as far as I know the ...
4
votes
2answers
176 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?
0
votes
1answer
286 views

EV3 Program - Menu

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

How do I rename an EV3 project?

I can rename the program in the Home Edition software but I just can't rename a project. Please tell me how to do it. Thanks!
0
votes
3answers
1k views

PC control Ev3 robot

I wanted to see if I could control my robot with a PC and I wanted to know if there was a way to do it. I have already searched for a controller for the PC and didn't find anything.
6
votes
1answer
248 views

How can I make an EV3 vehicle follow an elliptic equation?

Has anyone succeeded in having the EV3 driving base moving following an ellipse? I would like the kids to think about how would we program a satellite orbiting around earth. They would input the ...
6
votes
1answer
6k views

How do you program mindstorms to keep doing a task until either the IR OR the colour sensor state changes

How do you program mindstorms to keep doing a task until either the IR OR the colour sensor state changes. I would like to use the wait block but it can only be either the colour sensor or the IF ...