ServoDecode Library in Arduino 1.0

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.

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

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 Arduino Forum . 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

Adding

#include <Arduino.h>

to the ServoDecode.H file right after

#include <inttypes.h>

fixes that problem.

There is always this -

and

Duane B

rcarduino.blogspot.com

Hi,

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

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

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