View unanswered posts | View active topics It is currently Fri Jul 20, 2018 3:03 am






Reply to topic  [ 3 posts ] 
Function fordetecting if there is a motor on a specific port 
Author Message
Rookie

Joined: Thu Sep 25, 2014 8:34 pm
Posts: 22
Post Function fordetecting if there is a motor on a specific port
Is there a function that can detect if a motor is connected to a port?
I know there is a function for checking for sensors. The function for sensors is called "SensorType()". You give it the port number and it will tell you what type of sensor is connected to that port: (0=None; 92=EV3 Touch Sensor; 93=EV3 Color Sensor; 5=NXT Light Sensor). The values for these different sensors are stored in the "includes" folder in the file called: TSensorTypes.h

There is a TMotorTypes.h file stored in the "includes" folder. However, I am not sure what functions use this to tell me if a motor is connected to a certain port. Is there a function that can tell me if a motor is connected to port A that can return a value such as:
0=None;
5=NXT Motor;
10=EV3 Medium Motor;
11=EV3 Large Motor;
...

Is there such a function for motors like there is for sensors? If not, can it be added in the next update?
This would help.

Thx.


Mon Jan 11, 2016 11:05 am
Profile
Rookie

Joined: Thu Sep 25, 2014 8:34 pm
Posts: 22
Post Re: Function fordetecting if there is a motor on a specific
RobotC team,
Is there a chance that this capability may be added in the next release of the software?

Is there a function that can return the 'type' of motor plugged into a motor port?

Is there a way of detecting if any motor is plugged into a particular port?


Tue Mar 29, 2016 10:05 am
Profile
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: Function fordetecting if there is a motor on a specific
The NXT and EV3 large motors are functionally equivalent, in the eyes of the firmware. The difference between the medium and large motors is handled in the kernel. Do you have a use case for this specific functionality?

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Mon Apr 11, 2016 1:11 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.