iwanders / OBD9141

A class to read an ISO 9141-2 port found in OBD-II ports.
MIT License
227 stars 70 forks source link

None of the examples is working #52

Open fly2jerry opened 7 months ago

fly2jerry commented 7 months ago

Hi, I tried to get any of the examples working, but no success at all. I want to create a simulator on K-Line. I tried this with Arduino Uno and Mega. I assume that with all the different libraries, I am not sure if I use the correct ones. Do you have a zipped library with all needed files?

Regards fly2jerry

iwanders commented 7 months ago

The simulator is a bit flaky and more a development tool really. I recommend testing on an actual ECU / car. Start with the reader example. Use the circuit from the readme. Consider reading #3 for some tips on troubleshooting.

fly2jerry commented 7 months ago

Thank you for your response, but I do not even reach the status to follow any of #3 suggestions. My issus is that I do not get it compiled. Even the simple one "reader". Thats why I asked for a set of libraries.

Here my error messages using Arduino UNO

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\flugl\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10819 -build-path C:\Users\flugl\AppData\Local\Temp\arduino_build_595793 -warnings=none -build-cache C:\Users\flugl\AppData\Local\Temp\arduino_cache_89086 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -verbose C:\Users\flugl\Documents\Arduino\OBD9141-master\examples\reader\reader.ino
C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\arduino-builder -compile -logger=machine -hardware C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\tools-builder -tools C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -built-in-libraries C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\libraries -libraries C:\Users\flugl\Documents\Arduino\libraries -fqbn=arduino:avr:uno -vid-pid=2341_0043 -ide-version=10819 -build-path C:\Users\flugl\AppData\Local\Temp\arduino_build_595793 -warnings=none -build-cache C:\Users\flugl\AppData\Local\Temp\arduino_cache_89086 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avr-gcc.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\tools\avr -verbose C:\Users\flugl\Documents\Arduino\OBD9141-master\examples\reader\reader.ino
Using board 'uno' from platform in folder: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\arduino\avr
Using core 'arduino' from platform in folder: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\hardware\arduino\avr
Detecting libraries used...
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\flugl\\AppData\\Local\\Temp\\arduino_build_595793\\sketch\\reader.ino.cpp" -o nul
Alternatives for WProgram.h: [OBD9141-master]
ResolveLibrary(WProgram.h)
  -> candidates: [OBD9141-master]
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\flugl\\Documents\\Arduino\\libraries\\OBD9141-master" "C:\\Users\\flugl\\AppData\\Local\\Temp\\arduino_build_595793\\sketch\\reader.ino.cpp" -o nul
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\flugl\\Documents\\Arduino\\libraries\\OBD9141-master" "C:\\Users\\flugl\\AppData\\Local\\Temp\\arduino_build_595793\\sketch\\AltSoftSerial.cpp" -o nul
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\flugl\\Documents\\Arduino\\libraries\\OBD9141-master" "C:\\Users\\flugl\\Documents\\Arduino\\libraries\\OBD9141-master\\OBD9141.cpp" -o nul
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\flugl\\Documents\\Arduino\\libraries\\OBD9141-master" "C:\\Users\\flugl\\Documents\\Arduino\\libraries\\OBD9141-master\\OBD9141sim.cpp" -o nul
Generating function prototypes...
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\flugl\\Documents\\Arduino\\libraries\\OBD9141-master" "C:\\Users\\flugl\\AppData\\Local\\Temp\\arduino_build_595793\\sketch\\reader.ino.cpp" -o "C:\\Users\\flugl\\AppData\\Local\\Temp\\arduino_build_595793\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\flugl\\AppData\\Local\\Temp\\arduino_build_595793\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Sketch wird kompiliert...
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\flugl\\Documents\\Arduino\\libraries\\OBD9141-master" "C:\\Users\\flugl\\AppData\\Local\\Temp\\arduino_build_595793\\sketch\\reader.ino.cpp" -o "C:\\Users\\flugl\\AppData\\Local\\Temp\\arduino_build_595793\\sketch\\reader.ino.cpp.o"
"C:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10819 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files\\WindowsApps\\ArduinoLLC.ArduinoIDE_1.8.57.0_x86__mdqgnx93n4wtt\\hardware\\arduino\\avr\\variants\\standard" "-IC:\\Users\\flugl\\Documents\\Arduino\\libraries\\OBD9141-master" "C:\\Users\\flugl\\AppData\\Local\\Temp\\arduino_build_595793\\sketch\\AltSoftSerial.cpp" -o "C:\\Users\\flugl\\AppData\\Local\\Temp\\arduino_build_595793\\sketch\\AltSoftSerial.cpp.o"
In file included from C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/WProgram.h:18:0,
                 from C:\Users\flugl\Documents\Arduino\OBD9141-master\examples\reader\Arduino.h:4,
                 from C:\Users\flugl\Documents\Arduino\OBD9141-master\examples\reader\reader.ino:1:
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:41: error: 'TINY_DEBUG_SERIAL_REGISTER' was not declared in this scope
   typedef TinyDebugSerialWriter_16_9600<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_9600;
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:41: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_9600<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_9600;
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                         TINY_DEBUG_SERIAL_SUPPORTED
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:68: error: 'TINY_DEBUG_SERIAL_BIT' was not declared in this scope
   typedef TinyDebugSerialWriter_16_9600<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_9600;
                                                                    ^~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:68: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_9600<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_9600;
                                                                    ^~~~~~~~~~~~~~~~~~~~~
                                                                    TINY_DEBUG_SERIAL_SUPPORTED
In file included from C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/WProgram.h:18:0,
                 from C:\Users\flugl\Documents\Arduino\OBD9141-master\examples\reader\Arduino.h:4,
                 from C:\Users\flugl\Documents\Arduino\OBD9141-master\examples\reader\AltSoftSerial.h:30,
                 from C:\Users\flugl\Documents\Arduino\OBD9141-master\examples\reader\AltSoftSerial.cpp:34:
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:41: error: 'TINY_DEBUG_SERIAL_REGISTER' was not declared in this scope
   typedef TinyDebugSerialWriter_16_9600<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_9600;
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:89: error: template argument 1 is invalid
   typedef TinyDebugSerialWriter_16_9600<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_9600;
                                                                                         ^
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:89: error: template argument 2 is invalid
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:42: error: 'TINY_DEBUG_SERIAL_REGISTER' was not declared in this scope
   typedef TinyDebugSerialWriter_16_38400<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_38400;
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:41: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_9600<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_9600;
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                         TINY_DEBUG_SERIAL_SUPPORTED
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:68: error: 'TINY_DEBUG_SERIAL_BIT' was not declared in this scope
   typedef TinyDebugSerialWriter_16_9600<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_9600;
                                                                    ^~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:42: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_38400<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_38400;
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                          TINY_DEBUG_SERIAL_SUPPORTED
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:69: error: 'TINY_DEBUG_SERIAL_BIT' was not declared in this scope
   typedef TinyDebugSerialWriter_16_38400<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_38400;
                                                                     ^~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:68: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_9600<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_9600;
                                                                    ^~~~~~~~~~~~~~~~~~~~~
                                                                    TINY_DEBUG_SERIAL_SUPPORTED
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:89: error: template argument 1 is invalid
   typedef TinyDebugSerialWriter_16_9600<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_9600;
                                                                                         ^
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:634:89: error: template argument 2 is invalid
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:42: error: 'TINY_DEBUG_SERIAL_REGISTER' was not declared in this scope
   typedef TinyDebugSerialWriter_16_38400<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_38400;
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:69: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_38400<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_38400;
                                                                     ^~~~~~~~~~~~~~~~~~~~~
                                                                     TINY_DEBUG_SERIAL_SUPPORTED
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:90: error: template argument 1 is invalid
   typedef TinyDebugSerialWriter_16_38400<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_38400;
                                                                                          ^
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:90: error: template argument 2 is invalid
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:43: error: 'TINY_DEBUG_SERIAL_REGISTER' was not declared in this scope
   typedef TinyDebugSerialWriter_16_115200<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_115200;
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:43: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_115200<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_115200;
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                           TINY_DEBUG_SERIAL_SUPPORTED
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:70: error: 'TINY_DEBUG_SERIAL_BIT' was not declared in this scope
   typedef TinyDebugSerialWriter_16_115200<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_115200;
                                                                      ^~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:42: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_38400<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_38400;
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                          TINY_DEBUG_SERIAL_SUPPORTED
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:69: error: 'TINY_DEBUG_SERIAL_BIT' was not declared in this scope
   typedef TinyDebugSerialWriter_16_38400<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_38400;
                                                                     ^~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:70: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_115200<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_115200;
                                                                      ^~~~~~~~~~~~~~~~~~~~~
                                                                      TINY_DEBUG_SERIAL_SUPPORTED
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:91: error: template argument 1 is invalid
   typedef TinyDebugSerialWriter_16_115200<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_115200;
                                                                                           ^
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:91: error: template argument 2 is invalid
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h: In member function 'void TinyDebugSerial::begin(long int)':
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:682:22: error: cannot convert 'TinyDebugSerialWriter_9600* {aka int*}' to 'TinyDebugSerialWriter*' in assignment
           _writer = &tdsw9600;
                      ^~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:686:22: error: cannot convert 'TinyDebugSerialWriter_38400* {aka int*}' to 'TinyDebugSerialWriter*' in assignment
           _writer = &tdsw38400;
                      ^~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:690:22: error: cannot convert 'TinyDebugSerialWriter_115200* {aka int*}' to 'TinyDebugSerialWriter*' in assignment
           _writer = &tdsw115200;
                      ^~~~~~~~~~
C:\Users\flugl\Documents\Arduino\OBD9141-master\examples\reader\reader.ino: In function 'void setup()':
reader:19:15: error: 'Serial1' was not declared in this scope
     obd.begin(Serial1, RX_PIN, TX_PIN);
               ^~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:69: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_38400<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_38400;
                                                                     ^~~~~~~~~~~~~~~~~~~~~
                                                                     TINY_DEBUG_SERIAL_SUPPORTED
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:90: error: template argument 1 is invalid
   typedef TinyDebugSerialWriter_16_38400<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_38400;
                                                                                          ^
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:635:90: error: template argument 2 is invalid
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:43: error: 'TINY_DEBUG_SERIAL_REGISTER' was not declared in this scope
   typedef TinyDebugSerialWriter_16_115200<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_115200;
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\OBD9141-master\examples\reader\reader.ino:19:15: note: suggested alternative: 'Serial'
     obd.begin(Serial1, RX_PIN, TX_PIN);
               ^~~~~~~
               Serial
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:43: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_115200<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_115200;
                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~
                                           TINY_DEBUG_SERIAL_SUPPORTED
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:70: error: 'TINY_DEBUG_SERIAL_BIT' was not declared in this scope
   typedef TinyDebugSerialWriter_16_115200<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_115200;
                                                                      ^~~~~~~~~~~~~~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:70: note: suggested alternative: 'TINY_DEBUG_SERIAL_SUPPORTED'
   typedef TinyDebugSerialWriter_16_115200<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_115200;
                                                                      ^~~~~~~~~~~~~~~~~~~~~
                                                                      TINY_DEBUG_SERIAL_SUPPORTED
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:91: error: template argument 1 is invalid
   typedef TinyDebugSerialWriter_16_115200<TINY_DEBUG_SERIAL_REGISTER,TINY_DEBUG_SERIAL_BIT> TinyDebugSerialWriter_115200;
                                                                                           ^
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:636:91: error: template argument 2 is invalid
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h: In member function 'void TinyDebugSerial::begin(long int)':
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:682:22: error: cannot convert 'TinyDebugSerialWriter_9600* {aka int*}' to 'TinyDebugSerialWriter*' in assignment
           _writer = &tdsw9600;
                      ^~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:686:22: error: cannot convert 'TinyDebugSerialWriter_38400* {aka int*}' to 'TinyDebugSerialWriter*' in assignment
           _writer = &tdsw38400;
                      ^~~~~~~~~
C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master/TinyDebugSerial.h:690:22: error: cannot convert 'TinyDebugSerialWriter_115200* {aka int*}' to 'TinyDebugSerialWriter*' in assignment
           _writer = &tdsw115200;
                      ^~~~~~~~~~
Bibliothek OBD9141-master im Ordner: C:\Users\flugl\Documents\Arduino\libraries\OBD9141-master (legacy) wird verwendet
exit status 1
'Serial1' was not declared in this scope

Edit; put the errors in backticks for formatting.

iwanders commented 7 months ago

Ah, well, ehm, I haven't touched an Arduino in years.

But I recall because the UNO only has one serial port you need a library to provide a software serial port. The reader_softserial example is applicable, it relies on the AltSoftSerial library. In your errors I see TinyDebugSerial, but I have no idea what that is. During the build it should automatically detect that it's an atmega 328p and go into this if statement to set the alt soft serial define and try to include it, if that doesn't happen, comment out line 13, such that later the correct serial type is used.