Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sketch_mar04a:27:22: error: no matching function for call to 'HX711::HX711(int, int)' / candidate expects 0 arguments, 2 provided #130

Closed
ChrisMLian opened this issue Mar 4, 2019 · 5 comments

Comments

@ChrisMLian
Copy link

Arduino: 1.8.7 (Windows 10), Board: "Arduino/Genuino Uno"

sketch_mar04a:27:22: error: no matching function for call to 'HX711::HX711(int, int)'

HX711 scale(DOUT, CLK);

                  ^

In file included from G:\Downloads\3d print\Load cell\sketch_mar04a\sketch_mar04a.ino:22:0:

G:\documents\Arduino\libraries\HX711-master\src/HX711.h:30:3: note: candidate: HX711::HX711()

HX711();

^

G:\documents\Arduino\libraries\HX711-master\src/HX711.h:30:3: note: candidate expects 0 arguments, 2 provided

G:\documents\Arduino\libraries\HX711-master\src/HX711.h:19:7: note: candidate: constexpr HX711::HX711(const HX711&)

class HX711

   ^

G:\documents\Arduino\libraries\HX711-master\src/HX711.h:19:7: note: candidate expects 1 argument, 2 provided

exit status 1
no matching function for call to 'HX711::HX711(int, int)'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

@ChrisMLian
Copy link
Author

nvm solved it by removing the arguments HX711 scale(DOUT, CLK);

Apologies

@griffinlarry95
Copy link

Found phone around 4 months ago,how do I access it

@amotl
Copy link
Contributor

amotl commented Mar 4, 2019

Dear Chris,

nvm solved it by removing the arguments HX711 scale(DOUT, CLK);

Yeah, we changed the signature and the library API recently by #123, which hasn't been made backward compatible on purpose. Sorry that this caused some hassle for you.

The updated examples like HX711_basic_example.ino show the way it is supposed to work now.

With kind regards,
Andreas.

@SimonCL17
Copy link

nvm solved it by removing the arguments HX711 scale(DOUT, CLK);

Apologies

Any chance you can provide the code to see how you solved this?

@amotl
Copy link
Contributor

amotl commented Mar 18, 2020

Dear @sluke17,

Solved it by removing the arguments HX711 scale(DOUT, CLK);.

Any chance you can provide the code to see how you solved this?

Just have a look at HX711_basic_example.ino.

With kind regards,
Andreas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants