Arduino nie widzi biblioteki
: 28 kwie 2018, 20:10
Alo.
Syn mnie chce przebudowac nerf-a, zrobiem srodowisko testowe czyli arduino i programator, ale przy kompilacji programu kiszka wychodzi.
Program ten:
https://github.com/etnom/nerf-select-fire
Biblioteka button dodana, ale przy próbie kompilacji wyrzuca:
Arduino: 1.8.5 (Windows 10), Board: "Arduino Mini, ATmega328P"
nerf-select-fire:36: error: no matching function for call to 'Button::Button(int, bool, bool, int)'
Button trigger (TRIGGER_PIN, PULLUP, INVERT, DEBOUNCE_MS); //trigger button, using the library
I reszta bledow ponizej.
Pytanie: co zepsulem, zwykle przyklady z githuba kompiolowaly sie z reki.
Pzdr
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:36:57: note: candidates are:
In file included from C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:9:0:
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: Button::Button(uint8_t)
Button(uint8_t pin);
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(const Button&)
class Button
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(Button&&)
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
nerf-select-fire:37: error: no matching function for call to 'Button::Button(int, bool, bool, int)'
Button dartCountingSwitch (DART_COUNTER_SWITCH_PIN, PULLUP, INVERT, DEBOUNCE_MS); //dart counting button, using the library
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:37:80: note: candidates are:
In file included from C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:9:0:
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: Button::Button(uint8_t)
Button(uint8_t pin);
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(const Button&)
class Button
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(Button&&)
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
nerf-select-fire:38: error: no matching function for call to 'Button::Button(int, bool, bool, int)'
Button toggleFireModesBtn (TOGGLE_FIRE_MODES_BTN_PIN, PULLUP, INVERT, DEBOUNCE_MS); //toggle fire modes button, using the librarys
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:38:82: note: candidates are:
In file included from C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:9:0:
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: Button::Button(uint8_t)
Button(uint8_t pin);
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(const Button&)
class Button
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(Button&&)
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino: In function 'void toggleFireModes()':
nerf-select-fire:56: error: 'class Button' has no member named 'wasPressed'
if (toggleFireModesBtn.wasPressed()) { //check if it was pressed
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino: In function 'void fire()':
nerf-select-fire:67: error: 'class Button' has no member named 'wasPressed'
dartCountingSwitch.wasPressed()) )
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino: In function 'void checkForDartsFired()':
nerf-select-fire:77: error: 'class Button' has no member named 'isPressed'
} else if (dartCountingSwitch.isPressed() && //if can't fire anymore darts and pusher
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino: In function 'void selectFire()':
nerf-select-fire:87: error: 'class Button' has no member named 'isPressed'
if (trigger.isPressed()) { //check of trigger is pressed
^
nerf-select-fire:95: error: 'class Button' has no member named 'isPressed'
} else if (!trigger.isPressed()) { //if trigger isn't pressed
^
exit status 1
no matching function for call to 'Button::Button(int, bool, bool, int)'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Syn mnie chce przebudowac nerf-a, zrobiem srodowisko testowe czyli arduino i programator, ale przy kompilacji programu kiszka wychodzi.
Program ten:
https://github.com/etnom/nerf-select-fire
Biblioteka button dodana, ale przy próbie kompilacji wyrzuca:
Arduino: 1.8.5 (Windows 10), Board: "Arduino Mini, ATmega328P"
nerf-select-fire:36: error: no matching function for call to 'Button::Button(int, bool, bool, int)'
Button trigger (TRIGGER_PIN, PULLUP, INVERT, DEBOUNCE_MS); //trigger button, using the library
I reszta bledow ponizej.
Pytanie: co zepsulem, zwykle przyklady z githuba kompiolowaly sie z reki.
Pzdr
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:36:57: note: candidates are:
In file included from C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:9:0:
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: Button::Button(uint8_t)
Button(uint8_t pin);
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(const Button&)
class Button
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(Button&&)
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
nerf-select-fire:37: error: no matching function for call to 'Button::Button(int, bool, bool, int)'
Button dartCountingSwitch (DART_COUNTER_SWITCH_PIN, PULLUP, INVERT, DEBOUNCE_MS); //dart counting button, using the library
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:37:80: note: candidates are:
In file included from C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:9:0:
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: Button::Button(uint8_t)
Button(uint8_t pin);
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(const Button&)
class Button
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(Button&&)
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
nerf-select-fire:38: error: no matching function for call to 'Button::Button(int, bool, bool, int)'
Button toggleFireModesBtn (TOGGLE_FIRE_MODES_BTN_PIN, PULLUP, INVERT, DEBOUNCE_MS); //toggle fire modes button, using the librarys
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:38:82: note: candidates are:
In file included from C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino:9:0:
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: Button::Button(uint8_t)
Button(uint8_t pin);
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:14:3: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(const Button&)
class Button
^
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: constexpr Button::Button(Button&&)
C:\Users\Antoni\Documents\Arduino\libraries\Button/Button.h:11:7: note: candidate expects 1 argument, 4 provided
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino: In function 'void toggleFireModes()':
nerf-select-fire:56: error: 'class Button' has no member named 'wasPressed'
if (toggleFireModesBtn.wasPressed()) { //check if it was pressed
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino: In function 'void fire()':
nerf-select-fire:67: error: 'class Button' has no member named 'wasPressed'
dartCountingSwitch.wasPressed()) )
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino: In function 'void checkForDartsFired()':
nerf-select-fire:77: error: 'class Button' has no member named 'isPressed'
} else if (dartCountingSwitch.isPressed() && //if can't fire anymore darts and pusher
^
C:\Users\Antoni\Downloads\nerf-select-fire-master\nerf-select-fire-master\nerf-select-fire\nerf-select-fire.ino: In function 'void selectFire()':
nerf-select-fire:87: error: 'class Button' has no member named 'isPressed'
if (trigger.isPressed()) { //check of trigger is pressed
^
nerf-select-fire:95: error: 'class Button' has no member named 'isPressed'
} else if (!trigger.isPressed()) { //if trigger isn't pressed
^
exit status 1
no matching function for call to 'Button::Button(int, bool, bool, int)'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.