Tag Info

Hot answers tagged

5

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


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

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

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

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

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


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

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 wrote an android app to do exactly this using LEJOS. I have an example java project that uses bluetooth communication here I'll come back with a link to the actual android app project later, but this will get you started.


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

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


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

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

You could start here for example: LEGO MINDSTORMS NXT Tutorials Overview For a generic C# introduction see here: C# Tutorials or The complete C# Tutorial or C# Tutorial or just do a Google search for "C# tutorial".


2

MyBlocks are not reentrant; only one can be running at a time. When a second thread tries to execute a MyBlock that is being used by another, the second thread blocks until the first thread finishes with the block. This normally isn't a problem for MyBlocks that do simple calculations. They finish quickly and all threads make progress. But if a MyBlock ...


1

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


1

Here's what I found researching your issue: It seems that the issue with Mac OS X's kernel claiming HID USB devices before libusb does is a known issue since OSX 10.5 (see here). Libusb has no functionality to alter this behavior, so it would be up to the WeDoMore developers to use an alternative way to utilize USB on the Mac if they want to build in this ...


1

A temporary fix I found that works: using the provided "gray blobs", there is one named "PBRStringAtIndex" (or something like that) which will indeed compile (EV3 only). This does not address the similar "write at index" issue, and the output is a "byte" (presumably ASCII), not text. (I will update this answer as I find out more.)


1

The command that you are looking for is setMotorTarget as shown in the documentation here. Essentially, you need to set the target rotation for the motor in degrees and then wait for the movement to take place: //Sets motorA target to 50 degrees at a speed of 100 setMotorTarget(motorA, 50, 100); // Waits for movement to complete ...


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

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

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

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

This can be done using ev3dev. https://github.com/ev3dev/ev3dev/issues/46


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



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