Go Down

Topic: ServoDecode Library in Arduino 1.0 (Read 2569 times) previous topic - next topic

Will the ServoDecode library work with Arduino 1.0 on a Uno R3 (on a Windows 7 PC)?  Each time I try to compile I get an error message:

C:\Users\Owner\Desktop\Projects\Solair\arduino-1.0\libraries\ServoDecode\ServoDecode.cpp:3:18: error: wiring.h: No such file or directory
C:\Users\Owner\Desktop\Projects\Solair\arduino-1.0\libraries\ServoDecode\ServoDecode.cpp: In member function 'void ServoDecodeClass::begin()':
ServoDecode.pde:-1: error: 'INPUT' was not declared in this scope
ServoDecode.pde:-1: error: 'pinMode' was not declared in this scope

I'm not sure what modifications to the .cpp or .h file I might need to fix this.  Any help would be appreciated.

johnwasser

#1
Feb 26, 2012, 03:54 am Last Edit: Oct 21, 2012, 04:36 pm by johnwasser Reason: 1
In Arduino 1.0 the "wiring.h" file has been replaced by "Arduino.h".  Often that is the only change needed to get a pre-1.0 library working with 1.0.  Try making that change in ServoDecode.cpp
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

JanNow

Hi all,
as I would like to read in a PPM-Signal by using Interrupts I am also trying to work with the ServoDecode class in Arduino 1.0.1, as copied from http://arduino.cc/forum/index.php/topic,22140.0.html . But I (also) get the errors

ServoDecode.cpp: In member function 'void ServoDecodeClass::begin()':
ServoDecode.cpp:76: error: 'INPUT' was not declared in this scope
ServoDecode.cpp:76: error: 'pinMode' was not declared in this scope
ServoDecode.cpp:81: error: 'TIMSK1' was not declared in this scope
ServoDecode.cpp:81: error: 'ICIE1' was not declared in this scope

Does anyone can help?

Greetings

Jan

johnwasser

Adding
Code: [Select]
#include <Arduino.h>
to the ServoDecode.H file right after
Code: [Select]
#include <inttypes.h>
fixes that problem.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

DuaneB

Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

micros

Hi,

I getting the same problem. Did you manage to find the solution?

DuaneB

What do you want to read, individual channels or a pulse stream containing all of the channels, I have code for both options which is used by many people and is also compatible with the standard servo library for generating your outputs.

Duane B

rcarduino.blogspot.com
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

JanNow

Hi,
thanks a lot. It worked with adding #include <Arduino.h>. The other problems came because i am using a myavr board with an Atmega8.

I want to read the PPM-Stream from a RC-Reciever.

Greetings

Jan

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy