Hello, I wanted to make an access control with the RC522 and the Arduino Pro Micro. It worked fine with the code for a relay, but as there is no code for a servo, I took the one that comes in the examples of the github's libraries for the RC522: https://github.com/miguelbalboa/rfid/blob/master/examples/AccessControl/AccessControl.ino
I've modified the code to use a servo, but it gives me errors.
(Modified code attached)
Errors displayed:
Arduino:1.6.13 (Windows 7), Tarjeta:"Arduino Pro or Pro Mini, ATmega328 (3.3V, 8 MHz)"
C:UsersXXXXDocumentsArduinoAccessControlAccessControl.ino: In function 'void loop()':
AccessControl:241: error: 'isMaster' was not declared in this scope
if ( isMaster(readCard) ) { //When in program mode check First If master card scanned again to exit program mode
^
AccessControl:249: error: 'findID' was not declared in this scope
if ( findID(readCard) ) { // If scanned card is known delete it
^
AccessControl:251: error: 'deleteID' was not declared in this scope
deleteID(readCard);
^
AccessControl:257: error: 'writeID' was not declared in this scope
writeID(readCard);
^
AccessControl:264: error: 'isMaster' was not declared in this scope
if ( isMaster(readCard)) { // If scanned card's ID matches Master Card's ID - enter program mode
^
AccessControl:277: error: 'findID' was not declared in this scope
if ( findID(readCard) ) { // If not, see if the card is in the EEPROM
^
C:UsersXXXXDocumentsArduinoAccessControlAccessControl.ino: In function 'void normalModeOn()':
AccessControl:391: error: a function-definition is not allowed here before '{' token
void readID( uint8_t number ) {
^
AccessControl:554: error: expected '}' at end of input
}
^
exit status 1
'isMaster' was not declared in this scope
I'm new with arduino so I'm a little bit lost solving problems. Thanks.
AccessControl.ino (24.8 KB)