Hi everybodies,
I'm actually doing a special project : Motorbycle signals full controlled by Arduino...
I've made my own code (using some codes already axisting....) and my system is nearly ready...
However, to save energy, I would like to separate the RFID reader by using an Attiny84 to drive it...
(So summarize, at stand-still, only the Attiny and RFID reader is powered, and when I've the Good TAG, then I energize my Arduino Pro-Mini to have all ready...)
My problem : Unable to have a functionning sketch for my Attiny... When I try to check the code I've SO many errors ![]()
Here my code for my Attiny program :
#include <RFID.h>
#include <SPI.h>
#define buzzerPin 3
// Configuration RFID
RFID monModuleRFID(6,11);
//Crée un tableau avec 5 blocs dans lequel on va stocker notre ID
int UID[5]={};
//Ceci est notre clé de comparaison pour valider l'accès.
int MASTERKEY[5]={145,157,135,112,251};
void setup() {
SPI.begin();
monModuleRFID.init(); // Initialiser Module RFID
tone(3, 2500, 100);
}
void loop() {
LectureRFID();
}
void LectureRFID(){
if (monModuleRFID.isCard()) {
if (monModuleRFID.readCardSerial())
{
for(int i=0;i<=4;i++)
{
UID[i]=monModuleRFID.serNum[i];
}
if (
UID[0] == MASTERKEY[0]
&& UID[1] == MASTERKEY[1]
&& UID[2] == MASTERKEY[2]
&& UID[3] == MASTERKEY[3]
&& UID[4] == MASTERKEY[4])
//correspond au tag 1
{
digitalWrite (buzzerPin,HIGH);
}
else
{
digitalWrite (buzzerPin,LOW);
}
monModuleRFID.halt();
}
delay(50);
}
}
Do you have some information or solution for me ?
For me, the problem comes from the RFID.h file... but I don't know why !!!
(errors in the txt file enclosed)
Kind regards
Aurélien
errors.txt (16.3 KB)