OBD2 and nodemcu

Hi all,
I have connected an arduino nano to an elm327 obd adapter (using rx / tx and common ground), and using the code below I am able to reat the rpm and coolant temperature.

If I put the same code on a nodemcu board (I want this because of wifi) and also same wiring and same elm327 (rx / tx and gnd) is not working anymore.
Actually is stuck in " while (!obd.init()); "

#include <LiquidCrystal.h>

LiquidCrystal lcd(8, 9, 4, 5, 6, 7);           // select the pins used on the LCD panel


#include <OBD2UART.h>

COBD obd;

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

void loop()
{
  int value;
  obd.readPID(PID_RPM, value);
  int value2;
  obd.readPID(PID_COOLANT_TEMP, value2);
  lcd.setCursor(0,0);
  lcd.print("RPM = ");
  lcd.print(value);
  lcd.print("     ");
  lcd.setCursor(0,1);
  lcd.print("ECT = ");
  lcd.print(value2);
  lcd.print("     ");
  


  }

Any idea why? Is there any difference on nodemcu that I missed?

Thank you in advance

lucian_v:
Any idea why? Is there any difference on nodemcu that I missed?

Maybe the difference in working voltage? (3.3V for the NodeMCU, 5V for the Arduino Nano).

Node mcu is 5V?! Maybe I am wrong. If this is the case, then maybe a voltage level converter from 5v to 3.3 should work. I will buy one tomorrow and will try.

No, it's operating at 3.3V.

Supplying 5V to a pin is a good way of destroying at least that pin.

OBDII Pin 2 is a 7volt high signal, pin 7 is a 12v high signal...

Lots of smoky goodness can happen just sticking wires in..

I used an obd2 adapter which had bluetooth on it. I removed it and used that rx/tx so for sure i don t have more than 5V there. Also this is working perfectly on a nano or uno, tested on both.