7

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


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

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


3

You either have to recharge your battery (if you're using a battery pack) or replace the batteries (if you're using normal batteries). If this symptom persists after charging the battery pack, try to do a master reset on the brick. Failing which, you might have to replace the battery pack.


3

Looking at your code, there are a few things that you need to consider. Firstly, you have a while (true) loop which will run infinitely. The first thing you have after the loop is OnFwd(...) which will turn motors A and B on. Together, this means that whatever you do next, when then you will run the code again, turning on motors A and B. The next thing to ...


3

Do you have a gyro sensor on your robot? I'm assuming you're using an EV3 set, and the Mindstorms programming environment. If so, reset your gyro sensor, and then insert a loop block attached to the gyro sensor. Set the loop settings to >= 16 degrees, and insert a tank move block into the loop. The motor should be set to 'on', with wheels going in opposite ...


3

Just as an aside you can also do the following: sudo ln -s /dev/usb/legousbtower1 /dev/usb/legousbtower0 That worked for me, and my challenge now is that there is no firmware :-)


2

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


2

Not C but you might take a look at https://github.com/JorgePe/pyb00st


2

Here's some pseudocode that does what you need: Reset timer Loop block: Sensor block, output logical TRUE when condition is reached Timer block, output logical TRUE when X seconds have passed Logic block, outputs logical TRUE if sensor OR timer is true End loop when it receives TRUE from the Logic block. Switch block: if sensor = condition,...


2

I have had this problem in the past, and have not been able to find a solution, other than program it with the software meant for programming EV3s, as it is backward compatible (except that Bluetooth doesn't work, so that may be a problem as your photo shows Bluetooth blocks). Hope this helps!


2

As far as I see, you have two possible ways of accomplishing this, given that you have already built an Altazimuth mount or any other two-dimension mount from the two motors that can hold the color sensor and point it in any direction. Calculation This is the harder way but it grants neater results. It involves taking a precise measurement of the device's ...


2

If you want two things to run at the same time place the first just in front of but not touching the start block and the other just below the first. Click on the joiners (grey ovals on the end where blocks join) and press wire from here and tap on the first code. Do the same with the second.


2

There will certainly be some mechanical and robotics questions that you'll need to figure out, such as where on the car to position the sensors, and how to ensure that the car is reliably reading both colors at every intersection. (Which brings up contextual questions like "are there discrete intersections?") From a programming perspective, 49 possible ...


1

Using variables is probably a better solution, but you can pass data wires into a switch block if it is tabbed view.


1

To get technical, this thing (pictured below) is a "parameter", not a "variable". "Variables" look like this: You can use a data wire to write the parameter value to a variable before the switch block and then read the variable inside of the nested switch blocks. Something like this...


1

You have not provided your programming language of choice, so I'll answer in pseudocode which can then be adapted to the specific environment. It should be possible with the following construction: do { if (on_line) { // this may be a variable you update periodically or a method to call every time last_time_line_seen = now() // ...


1

You can't start a program with the remote (8885) or beacon (45508), however you can certainly have your program respond to a remote or beacon if you have the IR sensor (45509). So what you desire can for example be achieved by embedding your base program in one big loop and at the start of the loop have the program wait for a button pressed on the remote or ...


1

You can use Python with Lego Boost. https://github.com/undera/pylgbst


1

According to Wikipedia's Lego Mindstorms NXT page Next Bytes Code (http://bricxcc.sourceforge.net/nbc/) can be used to decompile the bytecode program on the brick. I have however no experience with this, nor have I heard of people being successful with this.


1

NXT programs are compiled into a program the brick can run. It might be possible to pull the compiled code off the brick, but I'm not aware of any disassemblers or decompilers for the compiled programs. I think your best chance at recovering the program would be to try to recover the deleted file on your PC with a deleted file recovery program.


1

Unfortunately, it's difficult/impossible to fix your program once the bug has occurred. You'll have to recreate the program from scratch (i.e. delete the file and start over). There are a few ways to avoid this going forward: Save often. If the bug happens, DON'T overwrite your file! Revert to the previous save. Don't resize the white LEGO liftarm ...


1

If we knew the developers' thoughts ... maybe they intentionally made it hard to change blocks in order to support some programming paradigm for kids (according to their opinion). What I do is: Always put the variables into the block while their values come from outside constants. Never cross commands boundaries with wires. Put all the variables inside the ...


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