• Witaj na Forum Arduino Polska! Zapraszamy do rejestracji!
  • Znajdziesz tutaj wiele informacji na temat hardware / software.
Witaj! Logowanie Rejestracja


Ocena wątku:
  • 0 głosów - średnia: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Błąd programu wgrywania Arduino
#1
Kod:
Arduino:1.8.13 (Windows Store 1.8.42.0) (Windows 10), Płyty rozwojowe:"Arduino Uno"

sketch_mar16b:8:6: error: no matching function for call to 'RFID::RFID()'
RFID rfid;                        //Tworzenie zmiennej typu RFID
      ^~~~
In file included from D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_mar16b.ino:1:0:
C:\Users\dell\Documents\Arduino\libraries\RFID/RFID.h:123:2: note: candidate: RFID::RFID(int, int)
  RFID(int chipSelectPin, int NRSTPD);
  ^~~~
C:\Users\dell\Documents\Arduino\libraries\RFID/RFID.h:123:2: note:   candidate expects 2 arguments, 0 provided
C:\Users\dell\Documents\Arduino\libraries\RFID/RFID.h:120:7: note: candidate: constexpr RFID::RFID(const RFID&)
class RFID
       ^~~~
C:\Users\dell\Documents\Arduino\libraries\RFID/RFID.h:120:7: note:   candidate expects 1 argument, 0 provided
C:\Users\dell\Documents\Arduino\libraries\RFID/RFID.h:120:7: note: candidate: constexpr RFID::RFID(RFID&&)
C:\Users\dell\Documents\Arduino\libraries\RFID/RFID.h:120:7: note:   candidate expects 1 argument, 0 provided
sketch_mar16b:10:1: error: 'uchar' does not name a type; did you mean 'char'?
uchar serNum[5];                  //Utwórz tablicę do przechowywania identyfikatorów
^~~~~
char
D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_mar16b.ino: In function 'void setup()':
sketch_mar16b:17:8: error: 'class RFID' has no member named 'begin'
   rfid.begin(7, 5, 4, 3, 6, 2);   //rfid.begin(IRQ_PIN,SCK_PIN,MOSI_PIN,MISO_PIN,NSS_PIN,RST_PIN)
        ^~~~~
D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_mar16b.ino: In function 'void loop()':
sketch_mar16b:29:3: error: 'uchar' was not declared in this scope
   uchar status;
   ^~~~~
D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_mar16b.ino:29:3: note: suggested alternative: 'char'
   uchar status;
   ^~~~~
   char
sketch_mar16b:30:9: error: expected ';' before 'str'
   uchar str[MAX_LEN];
         ^~~
sketch_mar16b:32:3: error: 'status' was not declared in this scope
   status = rfid.request(PICC_REQIDL, str);
   ^~~~~~
D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_mar16b.ino:32:3: note: suggested alternative: 'static'
   status = rfid.request(PICC_REQIDL, str);
   ^~~~~~
   static
sketch_mar16b:32:17: error: 'class RFID' has no member named 'request'; did you mean 'reset'?
   status = rfid.request(PICC_REQIDL, str);
                 ^~~~~~~
                 reset
sketch_mar16b:32:38: error: 'str' was not declared in this scope
   status = rfid.request(PICC_REQIDL, str);
                                      ^~~
D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_mar16b.ino:32:38: note: suggested alternative: 'sqrt'
   status = rfid.request(PICC_REQIDL, str);
                                      ^~~
                                      sqrt
sketch_mar16b:38:8: error: 'class RFID' has no member named 'showCardType'
   rfid.showCardType(str);
        ^~~~~~~~~~~~
sketch_mar16b:47:12: error: 'serNum' was not declared in this scope
     memcpy(serNum, str, 5);
            ^~~~~~
D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_mar16b.ino:47:12: note: suggested alternative: 'setbuf'
     memcpy(serNum, str, 5);
            ^~~~~~
            setbuf
sketch_mar16b:48:10: error: 'class RFID' has no member named 'showCardID'
     rfid.showCardID(serNum);      //show the card ID
          ^~~~~~~~~~
sketch_mar16b:51:12: error: 'id' was not declared in this scope
     uchar* id = serNum;
            ^~
D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_mar16b.ino:51:12: note: suggested alternative: 'rfid'
     uchar* id = serNum;
            ^~
            rfid
D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_feb24a.ino: In function 'void setup()':
sketch_feb24a:39:10: error: redefinition of 'void setup()'
     void setup (void) {
          ^~~~~
D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_mar16b.ino:12:6: note: 'void setup()' previously defined here
void setup()
      ^~~~~
D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_feb24a.ino: In function 'void loop()':
sketch_feb24a:66:10: error: redefinition of 'void loop()'
     void loop (void) {
          ^~~~
D:\WeGameApps\sketch_feb24a\sketch_mar16b\sketch_mar16b.ino:27:6: note: 'void loop()' previously defined here
void loop()
      ^~~~
"Servo.h" Odpowiadanie wielu bibliotekom
Używane: C:\Users\dell\Documents\Arduino\libraries\Servo
Nieużywany:C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\libraries\Servo
exit status 1
no matching function for call to 'RFID::RFID()'
W Plik -> Preferencje włącz opcję
"Pokaż szczegółowe dane wyjściowe podczas kompilacji".
Raport ten będzie zawierał więcej informacji.
 
Odpowiedź
#2
Nie jest to błąd wgrywania tylko kompilacji, jest jakiś błąd w programie lub w bibliotekach lub biblioteki są inne niż wymagane w tym projekcie. Arduino to tysiące osób korzystających z pracy tysięcy programistów, często się zdarza biblioteka o tej samej nazwie, ale nieco innej zawartości.
Do prawidłowego przebiegu kompilacji najlepiej mieć tą samą wersję Arduino IDE i bibliotek co autor programu (szczególnie dla starych projektów).
Miło być decenianym https://buycoffee.to/kaczakat
 
Odpowiedź
  


Skocz do:


Przeglądający: 1 gości