First off thank you all for your patience, I have never posted and I am an extreme novice with Arduino. I have copied the code from the tutorial and checked the build a dozen times, you can see the code yourself here.
https://learn.adafruit.com/trinket-gemma-ir-remote-control/using-ir-codes
I realize this is an adafruit build but I was under the impression that should not matter.
I have tried removed some of the serial communication code in an attempt to narrow down the problem and that seemed to prevent the gemma from power off and on, but I need the serial communication to move on. This is the section of code I have removed.
printcode(); // Print IR code to softwareserial
}
void printcode(void) {
uint16_t half;
half=irCode>>16; // Get first 16 bits of code
Serial.print("0x");
Serial.print(half, HEX); // Print upper 16 bits in hex
Serial.println(irCode & 0xFFFF, HEX); // print lower 16 bits in hex
}
Any ideas would be much appreciated, and remember talk slow, I am very new. And please let me know if my posting technique is wrong, thanks.