IR emit raw codes

dev board Arduino UNO
sensor infrared
features infrared IR emit raw

Before starting

Dependancies

Ensure the following requirements are available:

Pre-requisites

Try these simpler examples:

Buy the components

Description

This code takes in a raw dump of IR and emits it. This is useful when IR protocols are not defined for example, Mitsubishi Air conditioner model MSY-GE10VA. The file data.h has the list of raw dumps.

Code

Download code
#include <IRLibSendBase.h>
#include <IRLib_HashRaw.h>
#include "./data.h"

IRsendRaw mySender;

void setup() {
  Serial.begin(9600);
}

void loop() {
  delay(5000);
  Serial.println("Sending ON");
  mySender.send(rawDataON, RAW_DATA_LEN, 38);
  Serial.println("Sent Turn ON Aircon");

  delay(5000);
  Serial.println("Sending OFF");
  mySender.send(rawDataOFF, RAW_DATA_LEN, 38);
  Serial.println("Sent Turn OFF Aircon");
}

Makefile

BOARD?=arduino:avr:uno
PORT?=/dev/cu.usbmodem14*

.PHONY: default lint all flash clean

default: lint all flash clean

lint:
	cpplint --extensions=ino --filter=-legal/copyright *.ino

all:
	arduino-cli compile --fqbn $(BOARD) ./

flash:
	arduino-cli upload -p $(PORT) --fqbn $(BOARD)

clean:
	rm -r build

Schematic

Wire up the hardware accordingly

IR emit raw codes schematic

Prototype

A photo of the actual setup.

IR emit raw codes prototype

References