regis
with the ir library using the 47j and 26j i cannot compile but with the 4550 ansd 2550 they work fine i just have to add an extra curly brace at the end of the PDE
/*
DecodeRemote: demonstrates decoding IR codes from a remote control
An IR detector/demodulator must be connected to the input IRSENSOR.
Version 0.1 March, 2014
Author : Regis Blanchot
*/
define IRSENSOR 24 // pin 0, can be any digital pin
regis with the ir library using the 47j and 26j i cannot compile but with the 4550 ansd 2550 they work fine i just have to add an extra curly brace at the end of the PDE /*
define IRSENSOR 24 // pin 0, can be any digital pin
char brand[][10] = {"UNKNOWN", "NEC", "SONY", "RC5", "RC6", "DISH", "SHARP", "PANASONIC", "JVC", "SANYO", "MITSUBISHI"};
decode_results results; // Results returned from the decoder
void setup() { IRremote.enableIRIn(IRSENSOR); // Start the receiver IRremote.blink(true); // Built-in led will blink at reception }
void loop() { if (IRremote.decode(&results)==DECODED) { if (results.decode_type>10) results.decode_type = 0;
CDC.println("Decoded ");
CDC.printNumber(results.value, HEX); CDC.println(" (type "); CDC.println(brand[results.decode_type]); CDC.println(")\r\n");
/// or
//CDC.printf("Decoded %ld (type %s)\r\n", results.value, brand[results.decode_type]);
IRremote.resume(); // Ready to receive the next value } }
[/php] /dvpt/pinguino/git-copy/pinguino-compilers/sources/sdcc/src/pic16/main.c:701 setting interrupt vector addresses 0xc00 /usr/share/pinguino-11/p8/include/pinguino/core/oscillator.c:200: error 20: Undefined identifier 'CONFIG1H' /usr/share/pinguino-11/p8/include/pinguino/core/oscillator.c:200: error 20: Undefined identifier 'CONFIG1H' /usr/share/pinguino-11/p8/include/pinguino/libraries/IRremote.c:1021: warning 116: right shifting more than size of object changed to zero Processor: 18f26j50 sdcc: Calling preprocessor... sdcc: Generating code... /home/fred/.pinguino/source/main.c:95: syntax error: token -> 'void' ; column 8 /home/fred/.pinguino/source/main.c:160: error 20: Undefined identifier 'pll_startup_counter'