0.5.0 alpha: EV3Port getPortType & getSensorType

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

0.5.0 alpha: EV3Port getPortType & getSensorType

Postby djr667 » Fri Jan 17, 2014 8:06 pm

I am trying to detect the sensors & motors plugged into a lejos.hardware.ev3.LocalEV3 (am NOT using RMI).

If I plug in a Touch sensor into S2 and a motor into C => the lejos.internal.ev3.EV3Port instances returned by LocalEV3.getPort report a Touch sensor in both ports. If I unplug from C and put into A (no program restart), the EV3Port instances report a Touch sensor in S2, A and C.

Am I doing something wrong? Is this supposed to work in 0.5.0 alpha?

Dave
djr667
New User
 
Posts: 2
Joined: Sun Jan 12, 2014 4:01 pm

Re: 0.5.0 alpha: EV3Port getPortType & getSensorType

Postby gloomyandy » Fri Jan 17, 2014 9:13 pm

Should work for sensor ports, doesn't work for motor ports. To be honest I'm not sure how useful this feature is as it only identifies a small sub set of sensors, and I'm pretty sure it will not correctly identify things like the Mindsensors Glidewheel-M motor driver etc.
User avatar
gloomyandy
leJOS Team Member
 
Posts: 4081
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK


Return to EV3 Software

Who is online

Users browsing this forum: No registered users and 1 guest

cron
more stuff