compiling problem - interfacing an optical mouse sensor to arduino

Good Morning.

I'm trying to use the file coordinates taken from the site

http://www.martijnthe.nl/2009/07/interfacing-an-optical-mouse-sensor-to-your-arduino/.

I am using Arduino2 and ArduinoIDE version 1.5.7.

I bought a mouse with the PAN3101 chip. I connected the mouse to the Arduino as shown on the site.

I downloaded the file and I saved it in C: \ Users \ Labs \ Documents \ Arduino \ libraries.

Following the instructions I opened the example Coordinates by File/Sketchbook/Libraries/Optimouse-20093001/Optimouse/Coordinates.

As soon as I open this I get this error message on the default file:

"Coordinates.pde" contains unrecognized characters.If this code was created with an older version of Processing, you may need to use Tools -> Fix Encoding & Reload to updatethe sketch to use UTF-8 encoding. If not, you may need todelete the bad characters to get rid of this warning.

I click on "Verify" (program coordinates) and I get this error message:

Coordinates.pde: 16:21: fatal error: PAN3101.h: No such file or directory compilation terminated.

How can I fix the problem?

Thank you for your attention.

Uberto

If anyone answers your question here please make sure you tell everyone here, and vice versa.

It uses

#include “Wprogram.h”

which needs to be changed to

#include <Arduino.h>

And for some reason my IDE throws a fit when I try to use it to make the changes… reports that something is Read-Only and except for the folders none of it is read only.

I made the changes to more than one header file in Wordpad and then it compiles.
I haven’t had this much trouble with library example before, it’s like there’s locks or hidden screws.

I managed to compile the program.
I’ll explain how I did it.

I followed the tutorial for the addition of new libraries http://arduino.cc/en/Guide/Libraries

I added the new library (Do not unzip the downloaded library, leave it as is) directly from the downloaded folder.

Sketch / import library / add library

Then directly from the folder unzipp I modified the two files optimous.h/pan3101.h removing # include “Wprogram.h” and putting # include <Arduino.h>.

I followed the demands for saving two files and replace them in the folder (created automatically by arduinoIDE after ADDlibrary) C: \ Users \ Labs \ Documents \ Arduino \ libraries \ OptiMouse.

I opened the File / sketchbook / libraries / optimouse / coordinates.

and finally goes.