LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

EV3

I am trying to build a native block for the EV3 software using the developer EV-3 software. This is for a sensor that does not yet auto ID. I've got the sensor working, collecting data, and doing comparisons for loop control and the like. My dificulty is in the port view and data logging portions of the software. The EV3 seems to insist on identifying my sensor as a LEGO sound pressure meter. Is there a way to get this to stop, and ideally pick up the information I want displayed in these two portions of the program? Thanks

Steve

 

 

0 Kudos
Message 1 of 4
(6,229 Views)

You need to insert in the type data yourself by putting a file called '/home/root/lms2012/sys/settings/typedataXX.rcf' onto the brick where XX is a two digit number. Types 50-98 are reserved for 3rd party sensors. Restart the brick, and then read using the type of your sensor.

 

Here is a template for the type data file from the lms2012 source code :

 

https://github.com/mindboards/ev3sources/blob/e5be3a6d591c60b26a3fb853989a9c86f5a7cc56/lms2012/lms20...

Message 2 of 4
(6,221 Views)

Thank you very much! This looks like it might be the key we are missing in our development.

If I understand you correctly, this is what I should do.

  1. I can simply pick a number between 50 and 98 and assign it to our sensor.
  2. Then I can assign any number of modes to that sensor.
  3. I then create a text file following your template and install it on the EV-3 brick. If I understand this step correctly, my text file can be stand alone and does not need to recreate all the entries in the example you sent me.
  4. I can then call the brick using the type and mode variables in the "gray blobs" in my VI's and get the readings from the selected ports.

If this is true, it raises a couple of questions.

Is there any central clearing house for the type number I pick? I'd not like to step on someone else's sensor.

Is there a way to have the native EV-3 block auto download the text file the first time it's called? This would keep a school with many EV-3 units from having to touch each brick before our sensor would work in their classes.

 

Thanks again for your quick and very helpful response.

Steve

0 Kudos
Message 3 of 4
(6,179 Views)

Hi Steve,

 

I did a little testing and here's what I found out.

 

You're correct about 1-4. In the public lms2012 source, HiTechnic i2c sensors are types 50-60. At least these types will ship with ROBOTC and LabVIEW. There are presently no plans to use types 61-99 that I'm aware of.

 

Adding the .rcf file will cause the sensor data to show up correctly in the Port View app on the brick, but it looks like the Port View app in the EV3 software greys out when an unknown type is detected, so they don't work the same way.

 

In the EV3 software, I'm not 100% on whether or not you can make the sensor autoid, but you can definitely manually choose it. The guide to doing this has not been published officially, here it is:

 

https://www.dropbox.com/s/qqqwtgd12u8gnz8/EV3%20Build%20Your%20Own%20Blocks.zip

0 Kudos
Message 4 of 4
(6,164 Views)