Go Down

Topic: Optical mouse ADNS 2610 + Arduino trouble compiling (Read 1 time) previous topic - next topic



I recently came along a tutorial of jacking in an optical mouse (chip A2610) with Arduino from this link : http://www.martijnthe.nl/2009/07/interfacing-an-optical-mouse-sensor-to-your-arduino/

Now when I try to compile the  code following the instructions written in the code itself as comments I get the following errors:

First What I did:

1. Downloaded the library and changed it's name to simply "OptiMouse"
2. Tried to run the "coordinate" example.
It gave me following errors:

Coordinates.cpp:16:21: error: PAN3101.h: No such file or directory
Coordinates.pde:-1: error: 'PAN3101' does not name a type
Coordinates.cpp: In function 'void setup()':
Coordinates.pde:-1: error: 'Optical1' was not declared in this scope
Coordinates.cpp: In function 'void loop()':
Coordinates.pde:-1: error: 'Optical1' was not declared in this scope

Second what I tried:

1. moved the ADNS_2610.cpp and ADNS_2610.h and ADNS_2610.o outside the driver folder where OptiMouse.cpp and OptiMouse.h are located (as mentioned in the code comment).

2. Same errors I got.

I don't know what to do now. help me .


the rule for the Arduino's libraries is that both the directory and the files which form the library should have the same name! so when you change the name of the library into OptiMouse, you have to change the names of the files in the directory you added to the Arduino libraries directory; which means for examples from PAN3101.h to OptiMouse.h

Go Up