Hi,
I've recently ordered and received the OBD-II UART adapter V2 and wanted to try it out today.
Unfortunately I haven't been able to get it to work with my wemos D1 mini pro (esp8266) board.
When trying the basic RPM example, the board just gets stuck in some kind of boot loop (soft WDT reset, rst cause: 2, boot mode: 3 6).
The reboot seems to be caused by .begin() or .init(), but I'm not too sure about that. Code compiles without errors, of course.
I've tried everything I could think of but now I'm out of ideas.
Do you have any advice for me? What could I possibly do wrong? Does the adapter (or the library) for some reason not work with an esp8266 board?
Regards
Using the V2 adapter with esp8266
Re: Using the V2 adapter with esp8266
Did you disconnect USB cable from esp8266? It has only one usable hardware serial just like UNO.
Re: Using the V2 adapter with esp8266
Yes, I've tried it with the USB cable unplugged, but that doesn't help either. It still reboots continuously.
Re: Using the V2 adapter with esp8266
Did your esp8266 board receive anything from serial?
Re: Using the V2 adapter with esp8266
Hi,
after trying around for quite some time now, I've finally got it to work and can now read the RPM values with the engine running.
In OBD2UART.h, I've commented out the following lines:
#ifndef OBDUART
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168P__)
#define OBDUART Serial
#else
#define OBDUART Serial1
#endif
#endif
and instead inserted following:
#ifndef OBDUART
#define OBDUART Serial
#endif
Although I can't be a 100% sure, I think that's what got it working finally.
I've connected an LED and an OLED display, the LED turns on when RPM is >= 1500, the display shows the RPM values. Works.
I've also discovered that the pin serial seems to be prioritized over the USB serial, so it wouldn't matter if I had the USB cable plugged in, but I haven't tested this specifically since I won't use USB to power the esp anyway. I could be wrong here.
Nevertheless, I got it working! Great stuff. Thanks for helping me out.
after trying around for quite some time now, I've finally got it to work and can now read the RPM values with the engine running.
In OBD2UART.h, I've commented out the following lines:
#ifndef OBDUART
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168P__)
#define OBDUART Serial
#else
#define OBDUART Serial1
#endif
#endif
and instead inserted following:
#ifndef OBDUART
#define OBDUART Serial
#endif
Although I can't be a 100% sure, I think that's what got it working finally.
I've connected an LED and an OLED display, the LED turns on when RPM is >= 1500, the display shows the RPM values. Works.
I've also discovered that the pin serial seems to be prioritized over the USB serial, so it wouldn't matter if I had the USB cable plugged in, but I haven't tested this specifically since I won't use USB to power the esp anyway. I could be wrong here.
Nevertheless, I got it working! Great stuff. Thanks for helping me out.