An Easy Password Base Lock System for Arduino using IR Remote

I got it. Just had to add an extra switch case (i think thats what its called) so the begining of the loop looks like this:

void loop() {
if (irrecv.decode(&results)) {
unsigned long hash = decodeHash(&results);
switch (hash){
case 0x50C5D1F:
delay(1);
break;
case 0x92DF9279: // 1 (10)
password.append('1');
break;

I will try to add the servo function tomorrow and post it in case anyone comes across this in the future. The smiley are both 8 ) in case anyone else gets confused on that.

// Compare two tick values, returning 0 if newval is shorter,
// 1 if newval is equal, and 2 if newval is longer
// Use a tolerance of 20%
int compare(unsigned int oldval, unsigned int newval) {
if (newval < oldval * .8 ) {
return 0;
}
else if (oldval < newval * .8 ) {
return 2;
}