Conflict between 'servo.h' and 'Loconet.h'

Hi all, I decided to use an Arduino Mini to drive point operating servos directly from loconet.
After getting the board to drive 4 servos with commands via the RS232 port I started to add the loconet, which doesn’t use the serial port but uses digital input 8 that I had prior debugged on another mini. However, when the two came together, disaster, both libraries used the same vector. This simple do nothing program:
#include <LocoNet.h>

#include <Servo.h>

void setup() {

void loop() {

produced these error messages
Arduino: 1.6.3 (Windows 7), Board: “Arduino Mini, ATmega328”

Servo\avr\Servo.cpp.o: In function `__vector_11’:

C:\Program Files (x86)\Arduino\libraries\Servo\src\avr/Servo.cpp:81: multiple definition of `__vector_11’

LocoNet\utility\ln_sw_uart.cpp.o:D:\My Documents\Arduino\libraries\LocoNet\utility/ln_sw_uart.cpp:116: first defined here

collect2.exe: error: ld returned 1 exit status

Error compiling.

This report would have more information with
“Show verbose output during compilation”
enabled in File > Preferences.

The Loconet library is the latest
downloaded from
and I’m using Windows arduino 1.6.3.
At 70 years old this is my first use of C; (I’m a Pascal/assembler type!) and I don’t know if this conflict is solvable or even how I would set about doing it. Any hints?

I don’t know if this conflict is solvable

Both libraries are trying to use the same timer. There is a ServoTimer2 library that uses a different timer that you might be able to find and use.

This is where I got ServoTimer2


Thanks both of you, I downloaded the Servotimer2 library but the only example given fails to compile with these errors Arduino: 1.6.3 (Windows 7), Board: "Arduino Mini, ATmega328"

In file included from ServoTimer2.pde:10:0:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:117:14: error: conflicting declaration 'typedef bool boolean'

typedef bool boolean;


In file included from ServoTimer2.pde:3:0:

D:\My Documents\Arduino\libraries\ServoTimer2/ServoTimer2.h:41:17: error: 'boolean' has a previous declaration as 'typedef uint8_t boolean'

typedef uint8_t boolean;


Error compiling.

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences. I've decide to go via another route Regards Dave

This is one of the "improvements" with version 1.6.x of the Arduino IDE

The simplest solution would be to use version 1.5.6

Alternatively the code may work with 1.6.3 if you comment-out line 117