Error @ compiling

Hello Everyone!

first of all, my english is not very good, but I decided to post my problem in english due to a faster response:)

I wrote a Program, containing "Servo.h"- it works fine. I wrote another Program, containing "VirtualWire.h" - it works also fine.

Now i want do merge both programs, but there is an error, "multiple definition of `__vector_11'"

does anyone know how to solve this problem?

thanks alot,

Atvilar

http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html

Hello AWOL,

thanks for your fast response, I found this already but this is way to high for me.

cound you help me fixing the code?

Hi Atvillar, I faced a similar problem a while back while using the servo and tone library. It happens because of conflict in the arduino timers. These links might help you out:

http://forum.arduino.cc/index.php?topic=106043.msg1312639.html#msg1312639

http://forum.arduino.cc/index.php?topic=143376.0

Hello Everyone!

Thanks;

So there is a problem that both are using the same internel timer. there should be a possibility to change one of the two libarys form timer 2 (?) to timer 4.

But how i do this?

is it simplier to search a other "servo.h" ? is there another?

thanks alot again

Atvilar

Hi Atvillar, Why are you using the virtualwire library? VirtualWire uses Timer1, which means PWM pins which require Timer1 will not work and Other libraries using Timer1 will be incompatible with VirtualWire.

I am using it because i need to transfer one var [0,1,2] via a sender (http://www.simsso.de/?type=arduino/mx-05v-mx-fs-03v)

is is simplier to use another libary for the transmission?

If you are using it for RF communication, you might try out some other library or a tutorial like: http://arduinobasics.blogspot.in/2014/06/433-mhz-rf-module-with-arduino-tutorial.html P.S. : I havent personally worked with this tutorial but when i faced the issue with tone and servo, it got solved by using a new library for tone, toneAc.

i have found a workaround: they are using simply 2 Aruinos on the reciever side, one for the module and one for the Servos.

I personally don´t like this way. is there no easier way?

Oh, thanks I will test it with this one;

You will hear from me! :)

So..

i have tested it; generally it works, but there ear wa too much "noises" in my region that there would be any chance to recive a good representative signal.

And you can only transmit 2 sates. HI and LO.

so i have to recieve the signal with a 2nd Arduino...

thanks for all!

have a very nice day!

Hello everyone again!

I have had found a solution:

the easyest way was to remove “Servo.h” from my program and control the servo without any libary.

it is not really a good solution, it is also not very accurate, but is works fine for me. (The servo controls ony two flags and waves them)

I dont know the real link anymore, but theres the code:

int servo = 6;

int angle;
int pwm;

void setup()
{
 pinMode(servo, OUTPUT);
}

void loop ()
{
 for (angle = 0; angle <= 140; angle += 5)  {
   servoPulse(servo, angle);  }
 for (angle = 180; angle >= 0; angle -= 5)  {
   servoPulse(servo, angle);  }
}
 
void servoPulse (int servo, int angle)
{
 pwm = (angle*11) + 500;      // Convert angle to microseconds
 digitalWrite(servo, HIGH);
 delayMicroseconds(pwm);
 digitalWrite(servo, LOW);
 delay(50);                   // Refresh cycle of servo
}

!! THIS CODE IS NOT MINE !!

thank you very very much, and have all a pleasand day!

Atvilar