I'm trying to include HX711 library into inline C code, but I get this error, any suggestions?, Main and HX711 module:
Thanks
B4R version: 1.80 BETA #2
Parsing code. (0.00s)
Compiling code. (0.01s)
Building project (0.01s)
Compiling & deploying Ino project (Arduino/Genuino Mega or Mega 2560 - COM35) Error
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
sketch\b4r_hx711.cpp: In function 'void begin(B4R::Object*)':
b4r_hx711.cpp:9: error: expected unqualified-id before '.' token
void begin(B4R::Object* o) {HX711.begin(b4r_hx711::_datapin,b4r_hx711::_clkpin);}
^
sketch\b4r_hx711.cpp: In function 'void tare(B4R::Object*)':
b4r_hx711.cpp:10: error: expected unqualified-id before '.' token
void tare(B4R::Object* o) {HX711.tare();}
^
exit status 1
Thanks
B4X:
#Region Project Attributes
#AutoFlushLogs: True
#CheckArrayBounds: True
#StackBufferSize: 300
#End Region
Sub Process_Globals
Public Serial1 As Serial
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
HX711.Begin(16,17)
End Sub
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'Public variables can be accessed from all modules.
Private DataPin,CLKpin As Byte
End Sub
Public Sub Begin(sData As Byte , sCLK As Byte)
DataPin = sData
CLKpin = sCLK
RunNative("begin", Null)
End Sub
Public Sub Tare()
RunNative("tare", Null)
End Sub
#If C
#include <HX711.h>
void begin(B4R::Object* o) {HX711.begin(b4r_hx711::_datapin,b4r_hx711::_clkpin);}
void tare(B4R::Object* o) {HX711.tare();}
#End If
B4R version: 1.80 BETA #2
Parsing code. (0.00s)
Compiling code. (0.01s)
Building project (0.01s)
Compiling & deploying Ino project (Arduino/Genuino Mega or Mega 2560 - COM35) Error
Loading configuration...
Initializing packages...
Preparing boards...
Verifying...
sketch\b4r_hx711.cpp: In function 'void begin(B4R::Object*)':
b4r_hx711.cpp:9: error: expected unqualified-id before '.' token
void begin(B4R::Object* o) {HX711.begin(b4r_hx711::_datapin,b4r_hx711::_clkpin);}
^
sketch\b4r_hx711.cpp: In function 'void tare(B4R::Object*)':
b4r_hx711.cpp:10: error: expected unqualified-id before '.' token
void tare(B4R::Object* o) {HX711.tare();}
^
exit status 1