Timer conflict problem

Hi,
I am testing a CAR which used DC/SERVO motor, HC-SR, Bluetooth got error: redefinition of 'void __vector_10()' , how to solve please?
Thanks
Adam

Arduino: 1.8.16 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\HUA.DELLV-PC\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5\cores\arduino/Arduino.h:30:0,

                 from sketch\RC_IR_Docking_M7_delay45_multiSTN_u.ino.cpp:1:

E:\ENGINEERING\DIY\Electronic\ARDUINO\000_USEFUL\RC_IR_Docking_M7_delay45_multiSTN_u\RC_IR_Docking_M7_delay45_multiSTN_u.ino: In function 'void __vector_10()':

RC_IR_Docking_M7_delay45_multiSTN_u:132:6: error: redefinition of 'void __vector_10()'

 ISR (PCINT1_vect) // handle pin change interrupt for A8 to A15 here // redefinition of 'void __vector_10()'

      ^

C:\Users\HUA.DELLV-PC\Documents\Arduino\libraries\PinChangeInt-master/PinChangeInt.h:625:5: note: 'void __vector_10()' previously defined here

 ISR(PCINT1_vect) {

     ^

RC_IR_Docking_M7_delay45_multiSTN_u:134:119: error: expected ')' before 'digitalRead'

   digitalWrite(13, digitalRead(A8) and digitalRead(A9) and digitalRead(A10) and digitalRead(A11) and digitalRead(A12) digitalRead(A13) and digitalRead(A14) and digitalRead(A15));

                                                                                                                       ^~~~~~~~~~~

exit status 1

redefinition of 'void __vector_10()'



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

It’s hard to say exactly what is causing your timer conflict problem.

It looks like Line 132 of your sketch and line 625 of the "PinChangeInt-master" library are both trying to define an ISR for Pin Change Interrupt 1. You should use the PinChangeInt-master library in your sketch rather than defining a conflicting ISR. Follow the PinChangeInt examples.

2 Likes

Thank you johnwasser.
Great!
it works.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.