12

Official Docs Word Blocks The Word Block Descriptions for the block language (Scratch) are under Help & Support in the Settings. Settings are found by clicking on the gear icon on the home page. Basic Python For Python, there is a Knowledge Base on the side of the screen. Click the book icon to show or hide it. Advanced Python There is also separate ...


10

LEGO calls this communication protocol the "LEGO Wireless Protocol" (LWP). The documentation is publicly available at https://lego.github.io/lego-ble-wireless-protocol-docs/. There is also a GitHub repository that provides the source of this website at https://github.com/LEGO/lego-ble-wireless-protocol-docs. Because of this, it seems reasonable to expect ...


9

If you wish to program the EV3 with Scratch, then check out this project on github: https://github.com/koen-dejonghe/ev3-scratch-helper-app This software is a so-called helper app, that interfaces between the Scratch 2.0 offline editor and the Lego Mindstorms EV3. The EV3 must be booted from Lejos (http://sourceforge.net/p/lejos/wiki/Home/), requires a ...


8

Yes, it is possible to pass the port number as a parameter to a sensor or motor block via data wire. It's just that it's manually selected by default. To change this, go to the port of the sensor or motor block, and select the top-most option which has the plug icon on it: It will then create a data port for which motor port you want to use: The same ...


8

Here is the schematic of an input port on the EV3 (available on official LEGO MINDSTORMS download page): And this is the implementation of the resistance() method from Pybricks MicroPython: STATIC mp_obj_t iodevices_AnalogSensor_resistance(mp_obj_t self_in) { iodevices_AnalogSensor_obj_t *self = MP_OBJ_TO_PTR(self_in); int32_t voltage; uint8_t ...


7

I know that this question is old, but if someone else has this question, I have found that these error messages often appear when you are either trying to access a non existent array (i.e. you copied the block from another project and you did not change the name of the variable) OR when trying to access a value of an array with an index that does not exist (...


7

I could not find this in the help file, but according to this thread "Another little known characteristic of MyBlocks is that they aren't re-entrant. No two copies of the same MyBlock can be running at the same time." I tried a few simple programs in EV3-G and confirmed that this is true. The order in which they run appears to be random.


7

This is actually a surprisingly difficult task. If you search for similar questions over on the Robotics stack exchange, you will find very smart people who can't even get it right with thousand-dollar localization solutions and graduate-level control theory. If you have a Gyro sensor like Michael suggested, you're on the right track. You can probably get ...


6

One way of doing this is using a loop and interrupting it. How it works: The "Loop Interrupt" block stops all blocks running inside of the loop, so by interrupting the loop after either wait block, it will stop the other wait block. The type of loop doesn't actually matter because we never reach that point. I chose to wait for "Logic" with a value of "...


6

I think it would be more realistic to have the robot drive in a straight line but have a linkage to the foci of the ellipse that "pulls" the robot towards the center of the ellipse just as orbiting objects are pulled toward Earth by gravity. For example, you could use two nails in a board as the foci. Tie a string in a loop to use as the linkage. Place the ...


6

Update: There is a tool at http://ev3treevis.azurewebsites.net/ that can be use to create a new .ev3 file from a .rbf file recovered from an EV3 brick. Some information will be lost, but at least simple programs should be able to be recovered. Original answer: You can extract the compiled program from the EV3. Compiled programs have a .rbf file extension. ...


6

A sensor port can't directly output to a motor. The sensor drivers can't provide enough power to supply a motor. You have a couple options: Daisy-chain two EV3s together. The first can control the sensors and motors of the second. Use an electronic motor multiplexer. EDIT: It should be noted that this requires an external power supply, which will increase ...


5

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. ...


5

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 ...


5

This can usually be achieved on the EV3 with a bootable SD card - you would set that up with a new firmware image and a loader that copies it across to the brick. The leJOS team have ported their codebase to the EV3 - so with a bootable SD card you can indeed load a modified version of the firmware onto your EV3 brick. You can then use their WiFi stack to ...


5

To get the actual time of day, you can use the mindsensors.com Realtime Clock Sensor.


5

It is possible now (since version 1.3.0) by pressing the button at the upper left corner of the block:


5

This is more of a LabView answer than a Mindstorms answer, but you should be able to create a SubVI that represents a task, and then you can place that in the main VI. This help document might be useful: http://zone.ni.com/reference/en-XX/help/372962A-01/lvnxt/creatingusingsubvi/


5

The possible solutions involve realizing that you can multiply the number of possible inputs by implementing long clicks, double clicks, click-and-holds, simultaneous clicks, etc. on the buttons. If I were you, I'd also include a Confirm and maybe a Cancel buttons, but the latter can be substituted by a timeout. You could ease your job if you don't handle ...


5

There are two options that I can think of. Do the "hardware" fix before every run of the robot to reboot the sensor along with the "software" fix to zero it. Don't use the Angle reading at all. To calibrate the sensor, sample the rate (d/s) 10 times or so and take the average to get the "at rest" rate offset and store it in a variable. Subtract this ...


5

My team put their software fix in a loop with a small wait that cycles until the d/s = 0, then reset it to 0. Here's a simplified version: It works like a charm. We don't mess with the hardware reset anymore. Combined with a heading variable, a turn my block, and a few drive my blocks they can program a maze run in minutes. FWIW: They output their angle ...


5

You only need the official LEGO MINDSTORMS EV3 software. LEGO provides a "EV3 Block Developer Kit" on the MINDSTORMS downloads page. This contains some minimal instructions on creating blocks. It also contains an older version of the EV3 software. However, I have found that any version of the MINDSTORMS software can be used in "developer mode" by creating ...


5

Boost and the other Powered Up components (the new City trains, the app-controlled batmobile, and WeDo 2.0) are controlled via Bluetooth. Any environment that can send bluetooth commands can be used to control these components. There is a github page which documents some of the reverse-engineering that has been done and it links to several third-party Boost/...


5

The EV3 brick runs a linux kernel so it is extremely compatible with many different programming languages. 3rd-party support packages for basically any language you can think of have been made, and most are very mature by this point. A quick google search can come up with some of these. This previous post, among many others on this site, can help point you ...


5

You can get community support for Pybricks at https://github.com/pybricks/support. ir.buttons(1) returns a list of pressed buttons, so in this particular program if ir.buttons(1) == Button.BEACON: needs to be changed to if Button.BEACON in ir.buttons(1): This will test if item is in list.


5

Can you just install Scratch? MIT supports EV3 directly


5

The new Scratch-based software from LEGO Education is called EV3 Classroom. The link on the LEGO Education EV3 downloads page for Chromebooks takes you to the EV3 Classroom app at the Google Play Store. So it seems that you will need a Chromebook capable of running Android apps in order to use it. As of this writing, the equivalent retail version of the ...


5

Under operators, there is a block "Pick Random" where you can specify to pick an integral number between x to y... x and y you can type... So for a random direction, set it between 0 and 359 degrees ...


5

Recently following web-page appeared: https://lego.github.io/MINDSTORMS-Robot-Inventor-hub-API/ I learned it from David Lechner (https://github.com/gpdaniels/spike-prime/issues/7#issuecomment-850643719). I haven't seen an official announcement, but the URL implies it's from LEGO.


4

Yes, global. 5 variables may be 4 more than required. I think one is enough. Set intSensor = 0 Loop until intSensor > 0 If leftButton then intSensor = 1 If rightButton then intSensor = 2 If enterButton then intSensor = 3 If bumped1 then intSensor = 4 If soundVal > 50 then intSensor = 5 End Loop If intSensor = 1 then ...


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