Pages: [1]   Go Down
Author Topic: Optical mouse ADNS 2610 + Arduino trouble compiling  (Read 516 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 82
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello;

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 .


Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: