Skip to content

Instantly share code, notes, and snippets.

/gist:3263996

Created Aug 5, 2012
Embed
What would you like to do?
working
#include "TimerOne.h"
#include "Arduino.h"
extern "C" {
#include "irmpconfig.h"
#include "irmp.h"
#include "irsndconfig.h"
#include "irsnd.h"
}
void setup()
{
Serial.begin(115200);
pinMode(IRSND_BIT, OUTPUT);
irsnd_init();
Timer1.initialize(1000000 / F_INTERRUPTS);
Timer1.attachInterrupt(timerinterrupt);
}
void loop()
{
// 15:0:11:0 = Blaupunkt Grundig code
IRMP_DATA irmp_data;
irmp_data.protocol = IRMP_GRUNDIG_PROTOCOL;
irmp_data.address = 0x00;
irmp_data.command = 0x11;
irmp_data.flags = 0x00;
int result;
result = irsnd_send_data(&irmp_data, TRUE);
if (result != 1) Serial.println("ERROR");
if (result == 1) Serial.println("Sent");
delay(1500);
}
void timerinterrupt()
{
uint8_t irsnd_is_on;
irsnd_ISR(&irsnd_is_on);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.