Rename Directory
This commit is contained in:
parent
4fd8a0a761
commit
74c37e3747
63 changed files with 2 additions and 4 deletions
32
ESPMegaPRO-IRKit-SDK/src/main.cpp
Normal file
32
ESPMegaPRO-IRKit-SDK/src/main.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include <ESPMegaPRO.h>
|
||||
// Infrared Transciever
|
||||
#define IR_RECIEVE_PIN 35
|
||||
#define IR_SEND_PIN 17
|
||||
//#define MARK_EXCESS_MICROS 20
|
||||
#define RAW_BUFFER_LENGTH 1024
|
||||
uint16_t rawTicks[] = {2404, 597, 1204, 596, 603, 597, 1203, 598, 603, 597, 1203, 597, 603, 597, 603, 597, 1203, 596, 604, 597, 604, 596, 603, 597, 603, 25810, 2402, 597, 1204, 596, 604, 597, 1203, 597, 603, 597, 1203, 597, 603, 597, 603, 597, 1203, 597, 603, 597, 603, 597, 603, 598, 602, 25804, 2404, 596, 1204, 597, 603, 597, 1203, 597, 603, 597, 1203, 597, 603, 597, 603, 597, 1204, 596, 603, 597, 603, 597, 603, 597, 604, 25803, 2404, 597, 1203, 597, 603, 597, 1203, 597, 603, 597, 1203, 597, 603, 597, 603, 598, 1202, 598, 602, 597, 603, 598, 602, 598, 602, 25805, 2403, 597, 1203, 597, 603, 597, 1203, 597, 603, 598, 1202, 597, 603, 597, 603, 597, 1203, 597, 603, 598, 602, 598, 602, 598, 602, 25804, 2404, 597, 1202, 598, 602, 598, 1202, 598, 602, 598, 1202, 599, 602, 598, 601, 598, 1203, 597, 602, 599, 602, 598, 602, 598, 602, 25804, 2403, 598, 1202, 599, 601, 599, 1202, 598, 601, 598, 1202, 599, 601, 599, 602, 598, 1202, 598, 602, 598, 602, 597, 603, 598, 602, 25805, 2403, 598, 1201, 599, 601, 599, 1202, 598, 602, 598, 1202, 598, 602, 599, 601, 598, 1203, 597, 602, 599, 602, 598, 602, 597, 603};
|
||||
#include <IRremote.hpp>
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
// IrReceiver.begin(IR_RECIEVE_PIN);
|
||||
IrSender.begin(IR_SEND_PIN);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
// if (IrReceiver.decode())
|
||||
// {
|
||||
// Serial.println();
|
||||
// IrReceiver.printIRSendUsage(&Serial);
|
||||
// IrReceiver.compensateAndPrintIRResultAsCArray(&Serial, false);
|
||||
// Serial.println();
|
||||
// Serial.println();
|
||||
// IrReceiver.resume();
|
||||
// }
|
||||
//IrSender.sendRaw(ir_code_a,sizeof(ir_code_a)/sizeof(ir_code_a[0]),NEC_KHZ);
|
||||
// IrSender.sendRaw(ir_code_b,sizeof(ir_code_b)/sizeof(ir_code_b[0]),NEC_KHZ);
|
||||
IrSender.sendRaw(rawTicks,sizeof(rawTicks)/sizeof(rawTicks[0]),NEC_KHZ);
|
||||
//IrSender.sendSony(0x1, 0x15, 2, 12);
|
||||
delay(500);
|
||||
}
|
73
ESPMegaPRO-IRKit-SDK/src/main.cpp.d
Normal file
73
ESPMegaPRO-IRKit-SDK/src/main.cpp.d
Normal file
|
@ -0,0 +1,73 @@
|
|||
#include <ESPMegaPRO.h>
|
||||
/*
|
||||
Author: AnalysIR
|
||||
Revision: 1.0
|
||||
|
||||
This code is provided to overcome an issue with Arduino IR libraries
|
||||
It allows you to capture raw timings for signals longer than 255 marks & spaces.
|
||||
Typical use case is for long Air conditioner signals.
|
||||
|
||||
You can use the output to plug back into IRremote, to resend the signal.
|
||||
|
||||
This Software was written by AnalysIR.
|
||||
|
||||
Usage: Free to use, subject to conditions posted on blog below.
|
||||
Please credit AnalysIR and provide a link to our website/blog, where possible.
|
||||
|
||||
Copyright AnalysIR 2014
|
||||
|
||||
Please refer to the blog posting for conditions associated with use.
|
||||
http://www.analysir.com/blog/2014/03/19/air-conditioners-problems-recording-long-infrared-remote-control-signals-arduino/
|
||||
|
||||
Connections:
|
||||
IR Receiver Arduino
|
||||
V+ -> +5v
|
||||
GND -> GND
|
||||
Signal Out -> Digital Pin 2
|
||||
(If using a 3V Arduino, you may connect V+ to +3V)
|
||||
*/
|
||||
void rxIR_Interrupt_Handler();
|
||||
|
||||
#define LEDPIN 17
|
||||
//you may increase this value on Arduinos with greater than 2k SRAM
|
||||
#define maxLen 800
|
||||
|
||||
volatile unsigned int irBuffer[maxLen]; //stores timings - volatile because changed by ISR
|
||||
volatile unsigned int x = 0; //Pointer thru irBuffer - volatile because changed by ISR
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200); //change BAUD rate as required
|
||||
attachInterrupt(digitalPinToInterrupt(35), rxIR_Interrupt_Handler, CHANGE);//set up ISR for receiving IR signal
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
Serial.println(F("Press the button on the remote now - once only"));
|
||||
delay(5000); // pause 5 secs
|
||||
if (x) { //if a signal is captured
|
||||
digitalWrite(LEDPIN, HIGH);//visual indicator that signal received
|
||||
Serial.println();
|
||||
Serial.print(F("Raw: (")); //dump raw header format - for library
|
||||
Serial.print((x - 1));
|
||||
Serial.print(F(") "));
|
||||
detachInterrupt(0);//stop interrupts & capture until finshed here
|
||||
for (int i = 1; i < x; i++) { //now dump the times
|
||||
if (!(i & 0x1)) Serial.print(F("-"));
|
||||
Serial.print(irBuffer[i] - irBuffer[i - 1]);
|
||||
Serial.print(F(", "));
|
||||
}
|
||||
x = 0;
|
||||
Serial.println();
|
||||
Serial.println();
|
||||
digitalWrite(LEDPIN, LOW);//end of visual indicator, for this time
|
||||
attachInterrupt(0, rxIR_Interrupt_Handler, CHANGE);//re-enable ISR for receiving IR signal
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void rxIR_Interrupt_Handler() {
|
||||
if (x > maxLen) return; //ignore if irBuffer is already full
|
||||
irBuffer[x++] = micros(); //just continually record the time-stamp of signal transitions
|
||||
|
||||
}
|
1
ESPMegaPRO-IRKit-SDK/src/test.txt
Normal file
1
ESPMegaPRO-IRKit-SDK/src/test.txt
Normal file
|
@ -0,0 +1 @@
|
|||
{438, 430, 435, 430, 436, 430, 435, 430, 436, 430, 435, 25095, 3467, 1727, 436, 1295, 436, 430, 435, 430, 436, 430, 435, 1295, 436, 430, 436, 430, 436, 429, 435, 431, 436, 1294, 436, 429, 436, 1295, 437, 1294, 437, 429, 436, 1295, 437, 1294, 436, 1295, 436, 1296, 435, 1295, 436, 430, 436, 429, 436, 1295, 436, 432, 434, 429, 436, 429, 436, 430, 436, 429, 436, 431, 434, 431, 435, 430, 436, 430, 436, 429, 436, 1295, 436, 429, 436, 1296, 435, 430, 436, 430, 436, 429, 436, 1295, 436, 1295, 435, 430, 436, 430, 436, 429, 436, 430, 436, 1295, 436, 429, 436, 430, 435, 430, 436, 430, 435, 430, 436, 429, 436, 430, 436, 430, 435, 429, 437, 429, 436, 430, 436, 1295, 436, 1295, 435, 1296, 436, 430, 435, 430, 435, 1296, 436, 1295, 436, 1296, 435, 35481, 3466, 1728, 436, 1296, 435, 429, 436, 430, 436, 429, 436, 1295, 436, 429, 436, 430, 436, 430, 435, 430, 436, 1295, 436, 429, 436, 1295, 436, 1295, 436, 430, 436, 1295, 436, 1295, 436, 1295, 436, 1295, 436, 1295, 436, 429, 436, 430, 436, 1295, 436, 429, 436, 429, 436, 430, 436, 430, 436, 429, 436, 430, 435, 430, 436, 430, 435, 430, 436, 430, 435, 430, 436, 1294, 437, 430, 436, 429, 436, 429, 436, 430, 436, 1295, 436, 429, 437, 429, 436, 430, 435, 431, 435, 429, 436, 430, 436, 430, 436, 429, 436, 430, 435, 430, 436, 430, 436, 429, 435, 430, 437, 1295, 435, 430, 436, 430, 435, 431, 435, 429, 437, 429, 436, 1295, 436, 429, 436, 429, 437, 1295, 436, 1295, 436, 429, 436, 35481, 3466, 1728, 436, 1295, 436, 429, 436, 430, 436, 430, 435, 1296, 436, 429, 436, 429, 436, 430, 436, 429, 436, 1295, 436, 430, 436, 1294, 437, 1296, 435, 429, 436, 1294, 437, 1295, 436, 1295, 436, 1296, 435, 1295, 436, 430, 436, 429, 436, 1295, 435, 431, 435, 430, 436, 430, 435, 430, 436, 430, 435, 430, 436, 430, 435, 430, 436, 430, 435, 430, 436, 429, 437, 429, 436, 429, 437, 429, 436, 429, 436, 430, 435, 430, 436, 429, 436, 1296, 435, 430, 436, 430, 436, 1295, 436, 1295, 436, 1294, 437, 429, 436, 431, 434, 430, 436, 430, 436, 1295, 436, 429, 436, 1295, 436, 1295, 436, 430, 435, 430, 436, 430, 435, 430, 436, 430, 435, 430, 436, 429, 436, 429, 437, 430, 436, 429, 436, 1295, 435, 1296, 436, 1295, 436, 1295, 436, 1295, 436, 1295, 436, 1295, 436, 430, 435, 430, 436, 430, 435, 429, 437, 429, 436, 430, 436, 429, 436, 430, 436, 429, 436, 430, 435, 431, 435, 429, 436, 430, 436, 429, 436, 430, 436, 430, 435, 430, 436, 429, 436, 1295, 436, 1296, 435, 430, 436, 430, 436, 430, 435, 430, 435, 430, 436, 430, 436, 429, 436, 429, 436, 430, 436, 429, 436, 1296, 435, 1295, 437, 429, 436, 429, 437, 429, 436, 429, 437, 429, 436, 430, 435, 430, 436, 429, 436, 430, 436, 429, 436, 430, 436, 429, 436, 429, 436, 430, 436, 430, 437, 427, 437, 430, 435, 1296, 436, 429, 436, 1295, 436, 430, 435, 430, 436, 430, 436, 1295, 435, 1296, 435, 430, 436, 430, 435, 430, 436, 430, 436, 429, 436, 430, 435, 430, 436, 430, 435, 430, 436, 429, 436, 430, 436, 1295, 436, 430, 436, 430, 435, 430, 435, 430, 436, 1295, 436, 430, 436, 430, 435, 430, 435, 1295, 436, 1295, 436, 430, 436, 429, 436}
|
1
ESPMegaPRO-IRKit-SDK/src/test2.txt
Normal file
1
ESPMegaPRO-IRKit-SDK/src/test2.txt
Normal file
|
@ -0,0 +1 @@
|
|||
2404, 597, 1204, 596, 603, 597, 1203, 598, 603, 597, 1203, 597, 603, 597, 603, 597, 1203, 596, 604, 597, 604, 596, 603, 597, 603, 25810, 2402, 597, 1204, 596, 604, 597, 1203, 597, 603, 597, 1203, 597, 603, 597, 603, 597, 1203, 597, 603, 597, 603, 597, 603, 598, 602, 25804, 2404, 596, 1204, 597, 603, 597, 1203, 597, 603, 597, 1203, 597, 603, 597, 603, 597, 1204, 596, 603, 597, 603, 597, 603, 597, 604, 25803, 2404, 597, 1203, 597, 603, 597, 1203, 597, 603, 597, 1203, 597, 603, 597, 603, 598, 1202, 598, 602, 597, 603, 598, 602, 598, 602, 25805, 2403, 597, 1203, 597, 603, 597, 1203, 597, 603, 598, 1202, 597, 603, 597, 603, 597, 1203, 597, 603, 598, 602, 598, 602, 598, 602, 25804, 2404, 597, 1202, 598, 602, 598, 1202, 598, 602, 598, 1202, 599, 602, 598, 601, 598, 1203, 597, 602, 599, 602, 598, 602, 598, 602, 25804, 2403, 598, 1202, 599, 601, 599, 1202, 598, 601, 598, 1202, 599, 601, 599, 602, 598, 1202, 598, 602, 598, 602, 597, 603, 598, 602, 25805, 2403, 598, 1201, 599, 601, 599, 1202, 598, 602, 598, 1202, 598, 602, 599, 601, 598, 1203, 597, 602, 599, 602, 598, 602, 597, 603,
|
Loading…
Add table
Add a link
Reference in a new issue