Skip to content

Instantly share code, notes, and snippets.

Created August 5, 2012 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3263996 to your computer and use it in GitHub Desktop.
Save anonymous/3263996 to your computer and use it in GitHub Desktop.
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