Stap 2: upload code aan arduino
char inData [20];char-inChar =-1;
byte index = 0;
VOID Setup {}
Serial.begin(9600);
pinMode (12, OUTPUT);
}
char Comp(char* This) {}
while(Serial.available() > 0)
{
if(index < 19)
{
inChar = Serial.read();
inData [index] = inChar;
index ++;
inData [index] = '\0';
}
}
if(strcmp(inData,this) == 0) {}
for (int i = 0; ik < 19; i ++) {}
inData [i] = 0;
}
index = 0;
Return(0);
}
else {}
Return(1);
}
}
void loop
{
if(comp("6729")==0) {}
Serial.write("GRANTED");
digitalWrite(12,HIGH);
delay(50000);
digitalWrite (12, laag);
}
}