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.
Arduino nie widzi biblioteki
Arduino nie widzi biblioteki
Jeżeli przypadkiem podam ceny w GBP to sobie kolego, koleżanko, pomnóż razy pięć.
- dziobu
- Zasłużony
- Postów w temacie: 2
- Posty: 8943
- Rejestracja: 28 gru 2016, 16:38
- Drukarka: ZMorph 2.0(S)
- x 5873
- Kontakt:
Re: Arduino nie widzi biblioteki
Bibliotekę dodałeś pewnie z Arduina, a program korzysta z tej: https://github.com/etnom/Button
Ot "cechy" tego zacnego środowiska
Zmieniłem nazwę biblioteki i klasy z "Button" na "etnom-Button" żeby nie żarło się z biblioteki z Arduina.
Ot "cechy" tego zacnego środowiska
Zmieniłem nazwę biblioteki i klasy z "Button" na "etnom-Button" żeby nie żarło się z biblioteki z Arduina.
- Załączniki
-
- nerf-select-fire.rar
- (4.21 KiB) Pobrany 192 razy
Pozdrawiam
Paweł
Projekty: ELF | AVAT 01 | HotPlate-1
Drukarki: Flsun i3 Plus | Flsun G | Kossel | FF Dreamer | Monoprice MP Mini | Copymaster3D Pro 500 | AIO Robotics ZEUS | Zmorph 2.0 | Climber 7
Też fajne: Wydruki | Moje twory w 3D | Inne
Paweł
Drukarki: Flsun i3 Plus | Flsun G | Kossel | FF Dreamer | Monoprice MP Mini | Copymaster3D Pro 500 | AIO Robotics ZEUS | Zmorph 2.0 | Climber 7
Też fajne: Wydruki | Moje twory w 3D | Inne
Re: Arduino nie widzi biblioteki
Panie, działa.
Znaczy się kompiluje, teraz beda kabelki
Znaczy skopiowałem ta bibliotekę i zmieniłem nazwe i się kompiluje.
Jak znaleźć info, że to inna biblioteka niż ta z Arduino?
Znaczy się kompiluje, teraz beda kabelki
Znaczy skopiowałem ta bibliotekę i zmieniłem nazwe i się kompiluje.
Jak znaleźć info, że to inna biblioteka niż ta z Arduino?
Jeżeli przypadkiem podam ceny w GBP to sobie kolego, koleżanko, pomnóż razy pięć.
- dziobu
- Zasłużony
- Postów w temacie: 2
- Posty: 8943
- Rejestracja: 28 gru 2016, 16:38
- Drukarka: ZMorph 2.0(S)
- x 5873
- Kontakt:
Re: Arduino nie widzi biblioteki
No ja Ci tu przygotowałem komplet, bo nazwa biblioteki to raz, nazwa klasy to dwa, a użycie jej w głónym programie to trzymcxmcx pisze:Znaczy skopiowałem ta bibliotekę i zmieniłem nazwe i się kompiluje.
Pewnie da się to zrobić inaczej, ale to by musiał powiedzieć ktoś kto zna to środowisko.
Cóż.mcxmcx pisze:Jak znaleźć info, że to inna biblioteka niż ta z Arduino?
Trochę magii, trochę szklanej kuli...
A tak to normalne jest ze to tego typu rozwiązań (jak biblioteki standardowe do róznych środowisk) ludzie robię swoje zamienniki. Tu pewnie chodziło o to żeby oryginalnego Buttona wywalić i zastąpić tym, ale nie znam Arduina i nie wiem jak tam się usuwa biblioteki więc łatwiej było zmienić nazwę.
Pozdrawiam
Paweł
Projekty: ELF | AVAT 01 | HotPlate-1
Drukarki: Flsun i3 Plus | Flsun G | Kossel | FF Dreamer | Monoprice MP Mini | Copymaster3D Pro 500 | AIO Robotics ZEUS | Zmorph 2.0 | Climber 7
Też fajne: Wydruki | Moje twory w 3D | Inne
Paweł
Drukarki: Flsun i3 Plus | Flsun G | Kossel | FF Dreamer | Monoprice MP Mini | Copymaster3D Pro 500 | AIO Robotics ZEUS | Zmorph 2.0 | Climber 7
Też fajne: Wydruki | Moje twory w 3D | Inne
Re: Arduino nie widzi biblioteki
E, pewnie kolega coś ściemnia z tą magia
Dzięki wielkie za pomoc, jeszcze czeka nas zamiana wyjścia na przekaźnik na PWM do ESC (bo będzie bezszczotkowy napędzał całość).
Dzięki wielkie za pomoc, jeszcze czeka nas zamiana wyjścia na przekaźnik na PWM do ESC (bo będzie bezszczotkowy napędzał całość).
Jeżeli przypadkiem podam ceny w GBP to sobie kolego, koleżanko, pomnóż razy pięć.
Re: RE: Re: Arduino nie widzi biblioteki
Jak do komputera siądę. Taptalk nie daje.samezrp pisze:OT: a gdzie browar dla @dziobu?
Jeżeli przypadkiem podam ceny w GBP to sobie kolego, koleżanko, pomnóż razy pięć.