This is the error message that i am getting while using the simple IRrecv code of the IRremote library....
I just don't know what is wrong with it!!!
Any help will be apreciated............Thanks
Arduino: 1.6.0 (Windows 8), Board: "Arduino Due (Programming Port)"
In file included from C:\Users\Admin\Documents\Arduino\libraries\Arduino-IRremote-master\IRremote.h:24:0,
from C:\Users\Admin\Documents\Arduino\libraries\Arduino-IRremote-master\irISR.cpp:3:
C:\Users\Admin\Documents\Arduino\libraries\Arduino-IRremote-master\irISR.cpp: In function 'void TIMER2_COMPA_vect()':
C:\Users\Admin\Documents\Arduino\libraries\Arduino-IRremote-master\IRremoteInt.h:90:26: error: 'PORTB' was not declared in this scope
#define BLINKLED_ON() (PORTB |= B00100000)
^
C:\Users\Admin\Documents\Arduino\libraries\Arduino-IRremote-master\irISR.cpp:82:24: note: in expansion of macro 'BLINKLED_ON'
if (irdata == MARK) BLINKLED_ON() ; // turn pin 13 LED on
^
C:\Users\Admin\Documents\Arduino\libraries\Arduino-IRremote-master\IRremoteInt.h:91:27: error: 'PORTB' was not declared in this scope
# define BLINKLED_OFF() (PORTB &= B11011111)
^
C:\Users\Admin\Documents\Arduino\libraries\Arduino-IRremote-master\irISR.cpp:83:24: note: in expansion of macro 'BLINKLED_OFF'
else BLINKLED_OFF() ; // turn pin 13 LED off
^
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
What a silly title. You have no idea whether your IR remote works, or not. The code you have won't even compile, so you can not possibly have tested the IR remote.
What code are you compiling? What makes you think that code is compatible with the Due?
Hey PaulS,
How could i test the remote when it won't even compile........Please be patient while taunting at the errors! I am not a professional like you.
And what do you mean by DUE, is it confines to only mega or the uno......can i use DUE?????
That's the code that i want to compile.............
/*
* IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
int RECV_PIN = 9;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value
}
delay(100);
}
Shady27:
Hey PaulS,
How could i test the remote when it won't even compile........Please be patient while taunting at the errors! I am not a professional like you.
And what do you mean by DUE, is it confines to only mega or the uno......can i use DUE?????
Look at your error dump... it says your board selection is DUE.
You have my permission to. All you need to do is fix the problems that are preventing the code from compiling for the Due.
One of the reasons that direct port manipulation is avoided is that it is not portable. In some cases, though, there is no way to achieve the speeds needed without using direct port manipulation.
When that is the case, a lot of work needs to be done to make the code compile on all existing platforms. Then, more work needs to be done to support new platforms like the Due, the Yun, the Zero, etc.
The 2009 date in the code precedes the Due by quite a while.
My bad.......the code is working fine now!
All i had to do is to change the board from due to uno or mega.......thanks a lot to both PaulS and aarg............It's going good now!
And PaulS you mentioned a few new words there, like direct port manipulation!
If i just get to know it also please!!!