Hello
I want to ask your help with problem that occur in the code for the first time,
“libraries\PCM\PCM.c.o (symbol from plugin): In function
startPlayback': (.text+0x0): multiple definition of
__vector_11’
libraries\Servo\avr\Servo.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board Arduino Uno.”
This the code
#include <Servo.h>
#include
#include <PCM.h>
#include
Servo Myservo;
const int trigPin = 8;
const int echoPin = 7;
int pos=0;
const unsigned char sample[] PROGMEM = {
126, 126, 126, 126, 127, 127, 127, 127, };
**strong text**
void setup()
{
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
Myservo.attach(4);
startPlayback(sample, sizeof(sample));
}
void loop()
{
int duration, distance;
digitalWrite(trigPin, HIGH);
delay(1);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;
if (distance <= 5 && distance >= 0) {
startPlayback(sample, sizeof(sample));
}
Myservo.write(180);
}
I will be very happy if someone show me where are the problem but I read a lot but I could not understand.