NorthStar AC / Air Conditioner sample sketch

Everything related to protocols and IR codes
Post Reply
User avatar
AnalysIR
Site Admin
Posts: 776
Joined: Sat Aug 31, 2013 3:51 pm
Location: Dublin, Ireland
Contact:

NorthStar AC / Air Conditioner sample sketch

Post by AnalysIR »

A recent user from Brunei, had a new AC unit from NorthStar which seems to be very rare indeed.

He managed to record his signals and we quickly added support for this new protocol to AnalysIR. Then we were able to automatically generate the C code from AnalysIR and the sketch worked first time...Great!

The protocol worked out to be 112 bits long and the sample sketch which uses IRLib is below.

Do let us know if you found this useful.

Code: Select all

#include <IRLib.h>

IRsend My_Sender;

/*
Automatically Generated by AnalysIR - Batch Export Utility
Registered to: acppfa@gmail.com
Session History
Type : Key : Value : Bits
0 : NORTHSTAR112AC :  : 0C4D364800024C0E00400000000C6 : 112
*/

// NB: Not all protocols are supported by IRremote or IRLib. You may need to edit the code below manually
// Automatically Generated by AnalysIR for acppfa@gmail.com, visit http://www.AnalysIR.com or email info@....... for further details
int khz = 38; //NB Change this default value as neccessary to the correct modulation frequency
unsigned int Signal_0_0[] = {3696, 1504, 568, 1112, 572, 1112, 564, 456, 548, 448, 488, 516, 560, 1116, 532, 472, 564, 456, 544, 1136, 544, 1140, 544, 452, 544, 1116, 568, 448, 544, 460, 564, 1112, 568, 1112, 596, 456, 544, 1112, 568, 1116, 564, 452, 552, 448, 488, 1192, 548, 452, 532, 496, 540, 1112, 572, 452, 544, 452, 488, 512, 568, 456, 572, 428, 544, 452, 568, 456, 544, 456, 544, 452, 568, 456, 544, 456, 568, 428, 560, 464, 544, 456, 568, 428, 564, 460, 544, 452, 548, 1116, 564, 452, 548, 452, 568, 1108, 568, 460, 548, 452, 544, 1116, 564, 1112, 568, 452, 548, 452, 568, 460, 540, 452, 548, 452, 532, 496, 540, 1112, 572, 1104, 568, 1116, 532, 468, 568, 452, 548, 452, 488, 512, 568, 452, 548, 452, 488, 512, 568, 436, 568, 448, 548, 452, 568, 1112, 560, 468, 540, 452, 548, 452, 532, 496, 540, 452, 544, 456, 488, 512, 568, 452, 544, 456, 532, 496, 540, 452, 548, 452, 488, 512, 568, 456, 548, 452, 544, 452, 568, 456, 544, 456, 484, 512, 564, 460, 544, 456, 544, 452, 568, 456, 544, 452, 548, 452, 564, 460, 544, 452, 548, 452, 488, 512, 568, 452, 548, 452, 536, 492, 540, 452, 544, 460, 484, 1192, 548, 1136, 544, 452, 560, 464, 544, 456, 544, 1136, 544, 1112, 568, 452, 572}; //AnalysIR Batch Export - RAW

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

void loop() {
  if (Serial.read() != -1) {
    //send a code  every time a character is received from the serial port

    My_Sender.IRsendRaw::send(Signal_0_0, sizeof(Signal_0_0) / sizeof(int), khz); //AnalysIR Batch Export - RAW
    // AnalysIR IR Protocol: NORTHSTAR112AC, Key:

  }
}
Post Reply