Module Identification on Ports


#1

Is there a way to identify which module is connected on a port? For instance, Port 10 is used for the Ultrasonic module on the standard firmware_for_Auriga, is there a way that I can find out if this module is already connected?
Or is there a way that I could iterate through all Ports and ask if it is a special module?

Code-snippet from Firmware_for_Auriga.ino:

void ultrCarProcess(void)
{
  if(us == NULL)
  {
    us = new MeUltrasonicSensor(PORT_10);
  }

Thanks


#2

On I2C bus you can do such a thing.


#3

Ok thank you!

But what if the module doesn’t use I2C, is there a way to find out if these Modules are connected?
For instance the MeUltrasonic sensor?


#4

You may try to get data through all ports one-by-one. I’m not sure what will you get back, when there is no sensor, or when there is something else…


#5