Hi,
Im getting this error when i try and compile a library i've written. Can anyone shed any light on it?
error:
In function 'void loop()':
error: request for member 'getButton' in 'Nunchuck', which is of non-class type 'Nunchuck ()()'
.h:
// ensure this library description is only included once
#ifndef Nunchuck_h
#define Nunchuck_h
// include types & constants of Wiring core API
#include <WProgram.h>
// include types & constants of Wire ic2 lib
#include <../Wire/Wire.h>
class Nunchuck
{
public:
void nunchuck();
int getButton(char button);
private:
void Send(byte Value);
void initialize();
byte nunchuckDecodeByte(byte x);
int outBuffer[6];
int cnt;
int z_button;
int c_button;
};
extern Nunchuck Wii;
#endif
sketch:
#include <Wire.h>
#include <Nunchuck.h>
Nunchuck Nunchuck();
void setup() {
Serial.begin(9600);
}
void loop() {
int button_value = Nunchuck.getButton("c");
Serial.print("ButtonC: ");
Serial.println(button_value);
delay(100);
}
Thanks!