OBD-II Arduino Mega2560

Inquiry and support for Freematics products
Post Reply
justpierre35
Posts: 1
Joined: Sun Oct 11, 2020 4:43 am

OBD-II Arduino Mega2560

Post 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
stanley
Site Admin
Posts: 1039
Joined: Sat Mar 01, 2014 3:15 am

Re: OBD-II Arduino Mega2560

Post by stanley »

White to Tx1 and green to Rx1.
Post Reply