Go Down

Topic: Servo library for the due... does exist? (Read 4 times) previous topic - next topic

rbid

Hello,

By having on my program the following line:
   #include <Servo.h>

I get the compiler error under the Arduino IDE (1.5.1r2)
   vex_motor.ino:1: fatal error: Servo.h: No such file or directory
   compilation terminated.


The board is an Arduino Due.

Was the Servo library ported to the Arduino Due?... from the warning above, the answer may be no :(

Any hint?

DuaneB

Was added a few days ago, search  back in this forum and you will find it, but here is the direct link -

https://github.com/arduino/Arduino/commit/db81f52c3a27784fb44ca1ad6c77f9b1f0a4ef7d

Duane B

rbid


Was added a few days ago, search  back in this forum and you will find it, but here is the direct link -

https://github.com/arduino/Arduino/commit/db81f52c3a27784fb44ca1ad6c77f9b1f0a4ef7d

Duane B


Excellent, many thanks.

I'm not used to GIT, therefore, how can I download the files? (on my own risk), I guess I need to install this animal (git) and then get the files.

... just now saw the same link in the fourm..

DuaneB

Git looks like a pain to use to me also, but you should be able to cut and paste the code from the link.

Duane B


PLorand

#4
Dec 09, 2012, 11:58 am Last Edit: Dec 09, 2012, 12:03 pm by PLorand Reason: 1
Hello,

I tried using this servo library and I get this error when I try to compile:

Code: [Select]
In file included from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                ... (same thing repeated like 100 times) ...
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from sketch_dec09b.ino:6:
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:44: error: #include nested too deeply
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45: error: #include nested too deeply
In file included from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
               ... (same thing repeated like 100 times) ...
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:45,
                from sketch_dec09b.ino:6:
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:53: error: 'servo_t' does not name a type
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:57: error: '_Nbr_16timers' was not declared in this scope
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:76: error: variable or field 'Servo_Handler' declared void
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:76: error: 'timer16_Sequence_t' was not declared in this scope
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:76: error: expected primary-expression before '*' token
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:76: error: 'pTc' was not declared in this scope
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:76: error: expected primary-expression before 'channel'
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:103: error: variable or field 'Servo_Handler' declared void
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:103: error: 'timer16_Sequence_t' was not declared in this scope
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:103: error: expected primary-expression before '*' token
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:103: error: 'tc' was not declared in this scope
C:\Users\Lori\Documents\Arduino\libraries\Servo/Servo.h:103: error: expected primary-expression before 'channel'


I used the Sweep example provided with this library, because I wanted to see if it was working properly... Compiled with IDE 1.5.1r2... Any ideas?

Go Up