Arduino Uno not including two header files at the same time I have an Arduino Uno and I am trying to control a stepper motor with it. I also have an RF transmitter and receiver (433MHZ). I need to transmit data about motor status.

For RF I am following this page. Individually both are working great. I am able to send data from one Arduino (TX) to another (RX). And also I am able to control the motor. But when I am merging these projects, their header files are giving an error.

For RF, I need to include #include &lt;RH_ASK.h&gt; and for the motor I need include #include &lt;Servo.h&gt;. When I am including these headers files, they are giving me this error:

Arduino: 1.8.1 (Windows 10), Board: "Arduino/Genuino Uno"

libraries\RadioHead\RH_ASK.cpp.o (symbol from plugin): In function `RH_ASK::maxMessageLength()':

(.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/Genuino Uno.


I do not know what's wrong here. Can anyone please help me?
First of all, that page has a link to an old version of the RadioHead library.
This is a link to RadioHead: www.airspayce.com/mikem/arduino/RadioHead. You will find the newest library on that page.

The Servo library uses TIMER1.
The RadioHead in RH_ASK mode uses TIMER1.
Both use the same interrupt of TIMER1. That is what the compiler is trying to tell you with: "multiple definition of _vector_11".

You could move one of them to TIMER2.
There are alternative Servo libraries that use TIMER2.
The RadioHead can set a define for TIMER2. The explanation is in the library files in RH_ASK.h, you have to set "#define RH_ASK_ARDUINO_USE_TIMER2" in RH_ASK.cpp.

Why are you using the Servo library for a stepper motor ?