I installed mraa through npm. Then moved mraa/api/mraa folder (which there exists gpio.h and others) to hx711-addon/src folder. So that I got rid of gpio.h is not found error.
But now when I do node-gyp configure build, it gives me this error:
make: Entering directory '/home/pi/Desktop/hx711-addon/src/build'
CXX(target) Release/obj.target/hx711/hx711.o
In file included from ../hx711.cc:2:0:
../HX711.h:13:39: error: expected class-name before ‘{’ token
class HX711 : public node::ObjectWrap {
^
../HX711.h:25:46: error: ‘Arguments’ in namespace ‘v8’ does not name a type
static v8::Handle<v8::Value> New(const v8::Arguments& args);
^
../HX711.h:26:47: error: ‘Arguments’ in namespace ‘v8’ does not name a type
static v8::Handle<v8::Value> Read(const v8::Arguments& args);
^
../HX711.h:27:50: error: ‘Arguments’ in namespace ‘v8’ does not name a type
static v8::Handle<v8::Value> SetGain(const v8::Arguments& args);
^
../HX711.h:28:54: error: ‘Arguments’ in namespace ‘v8’ does not name a type
static v8::Handle<v8::Value> ReadAverage(const v8::Arguments& args);
^
../HX711.h:29:51: error: ‘Arguments’ in namespace ‘v8’ does not name a type
static v8::Handle<v8::Value> GetValue(const v8::Arguments& args);
^
../HX711.h:30:51: error: ‘Arguments’ in namespace ‘v8’ does not name a type
static v8::Handle<v8::Value> GetUnits(const v8::Arguments& args);
^
../HX711.h:31:47: error: ‘Arguments’ in namespace ‘v8’ does not name a type
static v8::Handle<v8::Value> Tare(const v8::Arguments& args);
^
../HX711.h:32:51: error: ‘Arguments’ in namespace ‘v8’ does not name a type
static v8::Handle<v8::Value> SetScale(const v8::Arguments& args);
^
../HX711.h:33:52: error: ‘Arguments’ in namespace ‘v8’ does not name a type
static v8::Handle<v8::Value> SetOffset(const v8::Arguments& args);
^
hx711.target.mk:90: recipe for target 'Release/obj.target/hx711/hx711.o' failed
make: *** [Release/obj.target/hx711/hx711.o] Error 1
make: Leaving directory '/home/pi/Desktop/hx711-addon/src/build'
How can I make it work? I really need to use that sensor on nodejs.
I installed mraa through npm. Then moved mraa/api/mraa folder (which there exists gpio.h and others) to hx711-addon/src folder. So that I got rid of gpio.h is not found error.
But now when I do node-gyp configure build, it gives me this error:
How can I make it work? I really need to use that sensor on nodejs.