WiiChuck-Error No such file or directory

Hi!
I’m trying to make a wii nunchuck controlled robot using the WiiChuck library.
When I’m writing #include and compiling it I get this error message:

Arduino:1.6.9 (Windows 7), Board:“Arduino/Genuino Uno”

WARNING: Spurious .github folder in ‘Adafruit Motor Shield library’ library
C:\Users\Isac\Desktop\programmering\arduino\Skräp Arduino\sketch_feb22a\sketch_feb22a\sketch_feb22a\sketch_feb22a\sketch_feb22a.ino:1:20: fatal error: WiiChuck: No such file or directory

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

And after a couple of seconds, this pops up:

Invalid library found in C:\Users\Isac\Documents\Arduino\libraries\Fritzing-master: C:\Users\Isac\Documents\Arduino\libraries\Fritzing-master
Invalid library found in C:\Users\Isac\Documents\Arduino\libraries\wiichuck_adapter-master: C:\Users\Isac\Documents\Arduino\libraries\wiichuck_adapter-master

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

When I’m going to Sketch->include library->Handle library and searching on WiiChuck it says installed.

I’m writing #include

Do you have a file named WiiChuck on your system ?

Do you perhaps have a library folder named WiiChuck with files named WiiChuck.h and WiiChuck.cpp in it ?

If so you should almost certainly be #including WiiChuck.h in your program.

Are there any examples with the WiiChuck library, assuming that you have the library in the first place.

Please post your complete program.

I have a library folder named WiiChuck and some of the files in it are named WiiChuck and not WiiChuck.h.
My library has two examples, WiiServoMap and WiiChuck_Serial_Demo.
They have write #include <WiiChuck.h> in my library examples, and when I’m compiling it this error comes:

Arduino:1.6.9 (Windows 7), Kort:“Arduino/Genuino Uno”

WARNING: Spurious .github folder in ‘Adafruit Motor Shield library’ library
C:\Users\Isac\Documents\Arduino\libraries\WiiChuck\examples\Arduino\WiiServoMap\WiiServoMap.ino: In function ‘void setup()’:

WiiServoMap:20: error: ‘D3’ was not declared in this scope

myChuck.addControlMap(D3, // Servo IO pin

^

WiiServoMap:28: error: ‘D4’ was not declared in this scope

myChuck.addControlMap(D4, // Servo IO pin

^

WiiServoMap:40: error: ‘D6’ was not declared in this scope

myChuck.addButtonMap(D6, // Servo IO pin

^

exit status 1
‘D3’ was not declared in this scope

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

It does not say No such file or directory.

I have a library folder named WiiChuck and some of the files in it are named WiiChuck and not WiiChuck.h.

That sounds like the Windows trick of hiding file extensions as you cannot have 2 files with the same name in the same folder.

Anyway, it seems that the problem has moved on, albeit to a different error. Can you please post the complete program that gave the errors quoted in your previous message.

Here is the example code:

#include <WiiChuck.h>

#if defined(ARDUINO_ARCH_ESP8266)
#define SDA D2
#define SCL D1
#endif
WiiChuck myChuck(SDA, SCL);

void setup() {

Serial.begin(115200);
Serial.println("\n\nStarting WiiChuck Demo");
myChuck.printServos=true;
myChuck.usePullUpClock = false;

// optional functions
//JOY_X,JOY_Y,ROLL,PITCH,ACCELX,ACCELY ,ACCELZ,
//classic controller
//RSPRESSURE,LSPRESSURE,LEFTSTICKX,LEFTSTICKY,RIGHTSTICKX,RIGHTSTICKY
myChuck.addControlMap(D3, // Servo IO pin
20, // Servo low value
50, // servo middle
130, // servo upper bound
-100, // ontroller lower bound
0, // controller middle
100, //controller upper bound
JOY_X); // Enum for the data source
myChuck.addControlMap(D4, // Servo IO pin
170, // mapping cna be reversed by swapping upper and lower
92, // swapping upper and lower pivots around center
20, // upper value need not be larger than the lower
-100, //lower bound cna be non symetric with upper bound
0, // controller middle
100, // upper controller bound
JOY_Y);// different enum for another function
// button mapping
//CBUTTON,ZBUTTON
//classic controller
//LZ,RZ,LD,RD,UD,DD,SL,H,START,X,Y,A,B
myChuck.addButtonMap(D6, // Servo IO pin
60,// released value
130, //pressed falue
ZBUTTON);// select a button funtion
myChuck.begin();

}
void loop() {

myChuck.readData();
delay(60);

And the error:

Arduino:1.6.9 (Windows 7), Kort:“Arduino/Genuino Uno”

WARNING: Spurious .github folder in ‘Adafruit Motor Shield library’ library
C:\Users\Isac\Documents\Arduino\libraries\WiiChuck\examples\Arduino\WiiServoMap\WiiServoMap.ino: In function ‘void setup()’:

WiiServoMap:20: error: ‘D3’ was not declared in this scope

myChuck.addControlMap(D3, // Servo IO pin

^

WiiServoMap:28: error: ‘D4’ was not declared in this scope

myChuck.addControlMap(D4, // Servo IO pin

^

WiiServoMap:40: error: ‘D6’ was not declared in this scope

myChuck.addButtonMap(D6, // Servo IO pin

^

exit status 1
‘D3’ was not declared in this scope

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

Where did you get the WiiChuck library from ?

I found a Wiichuck library at Wiichuck library but the examples are nothing like the one you posted.

Note the subtle difference in the names of the libraries.

Hi!
I downloaded the Wiichuck library from GitHub and when I’m writing #include <Wiichuck.h> and compiling it, it says no error!!! Thank you for helping me. Now can I finish my project!