I am trying to configure my attiny412 with IR receiver what it not working with IR remote library. is this possible to configure Attiny85 IR library with attiny412
Just to try to narrow this down, can you otherwise successfully use the attiny412 say with the blink sketch?
When you attempt to use the general IR library (that is not the one intended for the Attiny85) what happens? Do you, for example, get a compiler warning that it is too big ?
I only do a blink sketch to check attiny ok
Can I use Attiny85 IR Library to run.
error: #error Internal code configuration error, no timer functions implemented for this AVR CPU / board#error Internal code configuration error, no timer functions implemented for this AVR CPU / board^~~~~exit status 1Error compiling for board ATtiny412/402/212/202.This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
It doesn't look good.
Do you want to receive or send IR signals ?
Which IR protocol are you using?
NEC protocol
Just receiving or also sending ?
My main motive for Attiny412 to receive data through IR REMOTE TO CONTROL RELAY USING ATtiny412.
OK. This may work for you. It is a lightweight NEC protocol receiver which does not use a hardware timer so is more likely to be architecture independent: Lightweight Arduino IR library for NEC remote control devices
I haven't tested it with the new ATtiny series but, if you have problems, I'll try to help you get it working.
Thanks, I will try using this library, and if it works, I'll let you know.
This code is Attiny85 8bit timer running smoothly but it also works in Attiny414 16 bit timer but this provide always new code while pressing same button.
It is due to different timer?
Can anyone make changes according to 16 bit timer?
const int irPin = 4;
void setup() {
Serial.begin(115200);
pinMode(irPin, INPUT);
}
void loop() {
int key = getIrKey();
if(key != 0)
Serial.println(key);
}
int getIrKey(){
int len = pulseIn(irPin,LOW);
int key, temp;
key = 0;
//Serial.print("len=");
//Serial.println(len);
if(len > 5000) {
for(int i=1;i<=32;i++){
temp = pulseIn(irPin,HIGH);
if(temp > 1000)
key = key + (1<<(i-17));
}
}
if(key < 0 )
key = -key;
delay(250);
return key;
}