Connecting OBDII adapter to different serial port?

I'm not sure if this is the right forum for this.

I have the OBDII adapter here: Freematics OBD-II Adapter for Arduino | ArduinoDev.com

I am running this on a Mega, and want to connect the OBD adapter to a different serial port. Nowhere in the initialization do you have to define which port it's connected to. How do i define which port it's connected to?

Mike

Without seeing your code how can we know ?

...R

I don't really have code yet.

Here's the default code provided on the OBD-II adapter page. Nowhere does it define which port the device uses.

#include <Wire.h>
#include <obd.h>

COBD obd; /* for Model A (UART version) */

void setup()
{
  // we'll use the debug LED as output
  pinMode(13, OUTPUT);
  // start communication with OBD-II adapter
  obd.begin();
  // initiate OBD-II connection until success
  while (!obd.init());
}

void loop()
{
  int value;
  // save engine RPM in variable 'value', return true on success
  if (obd.read(PID_RPM, value)) {
    // light on LED on Arduino board when the RPM exceeds 3000
    digitalWrite(13, value > 3000 ? HIGH : LOW);
  }
}

mike944:
Nowhere does it define which port the device uses.

Then you will have to delve into the entrails of the OBD library.

...R