Printer Hex-kode for IR kontroll i tera term
Dependencies: mbed
Fork of Trinket_remote by
Revision 1:2e21f49ed269, committed 2018-02-26
- Comitter:
- andreasbirkeland97
- Date:
- Mon Feb 26 11:06:49 2018 +0000
- Parent:
- 0:0124991faa9d
- Commit message:
- wrwet
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue May 19 09:43:35 2015 +0000 +++ b/main.cpp Mon Feb 26 11:06:49 2018 +0000 @@ -27,7 +27,7 @@ uint16_t currentpulse = 0; // index for pulses we're storing uint32_t irCode = 0; Serial pc(USBTX, USBRX); // tx, rx -DigitalIn IRpin (D2); // Listen to IR receiver on Trinket/Gemma pin D2 +DigitalIn IRpin (p8); // Listen to IR receiver on Trinket/Gemma pin D2 int listenForIR(void); // IR receive code void printcode(void); // Print IR code in HEX @@ -88,7 +88,7 @@ { uint16_t half; half=irCode>>16; // Get first 16 bits of code - pc.printf("0x%x",half); // Print upper 16 bits in hex - pc.printf("%x\n",(irCode & 0xFFFF)); // print lower 16 bits in hex + // Print upper 16 bits in hex + pc.printf("%x\n", irCode); // print lower 16 bits in hex }