03-24-2014 03:35 PM
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
03-24-2014 03:58 PM - edited 03-24-2014 03:58 PM
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 :
03-27-2014 12:08 PM
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.
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
03-28-2014 09:57 AM
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