Page 1 of 1

OBD-II Arduino Mega2560

Posted: Sun Oct 11, 2020 4:55 am
by justpierre35
Hi all,

I'm a newbie and I'm having issue to connect my arduino mega2560 to the OBD-II adapter..

Code: Select all

#ifdef ARDUINO_AVR_UNO
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 10);
#else
#define mySerial Serial
#endif
I connect from the OBD adapter cables :
RED -> VCC (5V Arduino mega2560)
BLACK -> GND (GND Arduino mega2560)
WHITE -> 2 (digital Arduino mega2560)
GREEN -> 10 (digital Arduino mega2560)

Do I need to connect the connector in the car just for testing the connection with the OBD adapter?

Thanks in advance,
Pierre

Re: OBD-II Arduino Mega2560

Posted: Mon Oct 12, 2020 12:25 pm
by stanley
White to Tx1 and green to Rx1.