IR Code With ATtiny85

Im new on arduino world. I've been trying to send a IR code to my BENQ projector (0xC40BF // ON command 32 bits), but the send code its different after to up the sketch on my Attiny85. Using Arduino Uno is just neccesari "irsend.sendNEC(0xC40BF , 32) " with old IRremote library, and works ok. the parametters are so diferent on the versions.

CODE FROM: groundFungus

#include <IRremote.h>

const byte butonPin = 2; 
const byte IRPin = 1;

void setup()
{
   pinMode(butonPin, INPUT_PULLUP);

   IrSender.begin(IRPin);
}

void loop()
{
   static bool lastButtonState = HIGH;
   bool buttonState = digitalRead(butonPin);
   if (buttonState != lastButtonState)
   {
      if (buttonState == LOW)
      {
         IrSender.sendNEC(0x00,0xC40BF , 1);
      }
      lastButtonState = buttonState;
   }
}

Parameters:

  • uint16_t aAddress
  • uint8_t aCommand
  • uint_fast8_t aNumberOfRepeats
  • bool aIsRepeat = false
    How am I supposed to send the 32 bit code?

Just asking ...

  1. does this library support the tiny85
  2. does it use the mpu speed for sending
  3. is this the button debounce

How do you know you're not repetitively sending the code?

You would have to look at the library to see how to send multiple bytes.

:smiley_cat:

1 Like

Dear, Mr.

Thank for your time and consideration.

Answering your questions

Yes, It does, I'm using 8Mhz internal clock
Using IRremote on arduino, on the serial monitor I receive aleatorias 32 bits codes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.