Tag Info

Hot answers tagged

5

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


4

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.


4

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


3

i had the same problem. i figured out that this is caused by something trying to read something on a numeric array that was not there. well, if that is the problem, use an array function as append and put in value of what you want, kind of like this: i need to put the number two in the array "dorp 2", so I do this:


3

I have started a c++ iOS API at https://github.com/dsjove/legoev3cpp. Contributions are welcome.


3

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/


3

I think I'd use the ultrasound sensor instead of the touch sensor (or the brightness sensor with the light turned on in a dark tunnel). I haven't tried this but I'd worry about the touch sensor derailing or scratching the train. Otherwse, your system sounds pretty doable. The collision risk could be addressed by setting up the sensor a little further before ...


3

You can use the Bluetooth mailbox feature to pass messages back and forth between 2 NXTs. If you want to use sensors, you could use the HiTechnic NXT IRLink Sensor (NIL1046) and NXT IRReceiver Sensor (NIR1032).


2

Since you are a C# pro, I would recommend MonoBrick. I know they have a plugin for Xamarin Studio/MonoDevelop that lets you do remote debugging. Not sure if they have one for Visual Studio yet.


2

Works for me if you set buffering to 0 and get rid of the newlines. import time # command to start motor on port A at speed 20 start_motor = '\x0C\x00\x00\x00\x80\x00\x00\xA4\x00\x01\x14\xA6\x00\x01' # command to stop motor on port A stop_motor = '\x09\x00\x01\x00\x80\x00\x00\xA3\x00\x01\x00' # send commands to EV3 via bluetooth with ...


2

I started coding using NXT software and later EV3 and lately I have switched to java using leJOS. EV3 software ( and NXT ) is great for quickly hacking your ideas but when things get ugly the graphical language doesn't help at all. Just watch what I needed to do to create a playable version of Pong for one player at ...


2

I got also the wheels and found it really interesting... so I wrote an article were I explain all the maths and show you how to build one yourself ( instruction attached ) http://thetechnicgear.com/2014/04/howto-build-3-wheels-holonomic-robot-using-lego/ The code is for EV3 software and I will surely rewrite it for leJOS ( despite there is a class that ...


2

No, EV3 MyBlocks cannot be recursive. If a MyBlock contains a copy of itself, then the following error will be produced upon compiling: For some reason, LEGO's programming software has become progressively less immediate about notifying you that this cannot be done. In EV3-G, it waits until compile to let you know that you can't do this. In NXT-G (the ...


2

Time is thought of as a sensor value, measured in seconds. The Timer sensor can be used directly, as part of a Wait For block, as part of a Loop block.


2

It is not possible to modify the properties of myBlock in the current version of EV3 SW. It is possible by tampering the block source files: create a copy of your *.ev3. Just in case rename *.ev3 to *.zip extract all files from the zip edit files as needed move changed files back into zip (Under Windows drag and drop to zip) rename *.zip to *.ev3 I ...


2

Sadly, there isn't much info yet. Current options for audio are: USB Sound Card BlueZ 4/Pulseaudio 4 (BlueZ 5/Pulseaudio 5 supports A2DP only) The number of devices that have been tested and documented is extremely limited, but at least one has been confirmed to work. The non-bluetooth solutions that have been tested successfully are the following. ...


2

Not sure what language you are using, or calls you are making before this, but: float var_Min = var_R; if (var_G > var_Min) var_Min = var_G; if (var_B > var_Min) var_Min = var_B; Should be (note the use of < rather than >) float var_Min = var_R; if (var_G < var_Min) var_Min = var_G; if (var_B < var_Min) var_Min = var_B; Your posted code ...


2

I am currently maintaining my own fork of NQC for use on OpenBSD and OS X. As you have discovered, the recent compiler changes on OS X broke NQC in many places. Not to mention that the USB tower integration was pretty outdated. If you can compile it, it should work better than the ports version. AFAIK, I am now the de facto maintainer for NQC. (And may ...


2

Checking the source code, it appears that the opOutput_Get_Type command is not implemented. In both links, it is mentioned in the comments, but there is nothing in the actual code. Unfortunately, I am not finding a different way to get this information.


2

You can do this with parallel programs and a logic variable. You will need 3 loops, one for each sensor and one for the motor. In the sensor loops, wait for the touch sensor to be pressed and then set a logic variable to true. In the motor loop, have a switch block that tests the logic variable. If it is true, reverse and turn around and then set the logic ...


2

PosRegSetAngle should set the position of the motor relative to the position the motor was in when regulation was enabled. In what way didn't it work when you tried this? It sounds like you may be asking how to wait for the rotation to finish. I'm not sure if there is a built-in way to do this in NXC or not, but I think that something along these lines ...


2

It is possible to drive the WeDo from Python on a Mac, without a kext. I've only tested motors since I don't (yet) have the other sensors. You need to access the USB HID device directly. There are a couple of prerequisites to install: cycthon-hidapi, which itself depends on hidapi; homebrew can install that for you. cython likewise You'll likely ...


1

Looking at your code, you're saying: Set the motors to a speed of 300, acceleration of 1000 Run the motors backwards Pause execution of your program for 500ms Stop the motors If you're not seeing colour id 7, go to 1. Assuming that this was exactly the same code you had on the Brick, I'd guess the delays introduced by the communication will cause a ...


1

The TACHO parameter is 4 bytes (32 bits). (Data32) *TACHO – Current output tacho count However, you have only allocated it 2 bytes (16 bits) GV2(1) // tacho in return Try using GV4 instead of GV2.


1

If I were you, I'd make it this way: The leader robot has a very bright light shining backwards, but not in a tight beam, rather a wide cone, so it can be seen from the back easily. The follower robot has the light sensor facing forward, with a cowl around and in front of the sensor in order to narrow its sensing angle. In other words, the sensor is ...


1

You can use finite state machine. In this case you will have these 5 states: RUN Action: turn on the motors for moving straight Transition to state TURN in case of event: ultrasonic sensor detects obstacle closer than 4.5 inch). Transition to state WAIT in case of event: color sensor detects red color WAIT Action: stop motors Transition to state ...


1

There's an official app released by LEGO called the LEGO MINDSTORMS COMMANDER. It's available on both Android and iOS. I believe this is what you are looking for. LMC lets you control the EV3 brick via bluetooth on your smartphone. It's not exactly an API, but it lets you control the EV3.


1

There are a few options for the cause of the error. It could be at the microprocessor level, meaning that the execution of the program is wrong, or it could be at the motor driver port, meaning that the NXT tries to drive the motor attached to the specific port but can't due to some electrical failure. The first option can be eliminated by using other forms ...


1

If you need to change something that is setup in the "My Block Builder" dialog box like the default value or min and max values for a slider, then yes, you need to create a new My Block. This is easy though. Just select everything in the existing My Block except for the Input Parameter block, the Output Parameter block and the Start block and then select ...


1

The main problems I see are the following: The value in the numRight variable is wrong for two reason: The 'right' sensor is not reseted at the proper time and you read the 'left' sensor value instead of the 'right'. The angle calculation is faulty The half rotation is performed in the wrong direction Here are my code comments: //Move forward until you ...



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