Hi,
I needed some time to investigate the pattern for an "Homeeasy" remote wich I wasn't not able to read by a existing library (rc-switch, HomeEasyCtrl, 433MHzForArduino).
Now I identified the pattern and was able the isolate. As the result I have a list of duration per level change like the rc-switch ReceiveDemo_Advance also shows as raw-data.
9980,332,1180,336,1192,332,184,336,188,332,196,328,1192,328,1192,336,1200,332,1192,324,196,336,184,336,1196,324,192,332,1196,320,1220,328,1188,332,196,328,1192,328,196,328,196,324,1196,328,1204,332,1196,324,1192,328,200,324,196,328,1200,320,196,324,1224,324,1192,328,196,332,1184,332,196,328,1192,328,208,316,1208,328,1200,316,1200,324,204,316,208,316,1200,320,1208,316,228,320,1200,320,200,324,1200,320,1200,320,1196,324,200,328,216,324,1196,320,204,324,204,316,200,320,1204,320,1204,316,1212,320,9976,
Via rc-switch raw data viewer the data it is visualizable nicely.
Now I would like to send them with following sketch. But it seam that the timing doesn't fit. The total summ base on the raw-data is about 7.000us and by sketch about 9.000us.
Can anybody help me out with that sketch. Or held me to understand how to understand and transform the raw-data?
Thank you in advance.
// raw data
int one_off[] = {9980,340,1184,328,1192,320,204,320,204,316,216,308,1204,320,1204,316,1220,320,1196,344,180,336,196,324,1192,328,200,324,1196,328,1216,328,1200,324,196,324,1192,340,192,324,196,324,1200,324,1208,328,1196,324,1200,328,200,320,204,320,1216,312,192,328,1220,324,1204,316,196,328,1204,312,204,320,1200,328,200,324,1216,324,1196,324,1204,320,196,324,204,316,1200,320,1204,324,224,320,1200,324,208,316,1200,320,1196,328,200,324,1200,324,212,320,1204,320,204,316,208,316,212,316,1204,320,1204,316,1208,324,9984,};
int one_on[] = {9984,332,1188,332,1196,328,188,328,188,336,196,328,1196,324,1204,320,1208,324,1200,324,200,324,196,336,1184,336,184,344,1192,328,1208,336,1192,328,188,336,1192,332,188,336,184,340,1188,332,1208,328,1200,320,1204,320,196,324,200,328,1188,332,192,336,1224,320,1196,324,192,332,1200,316,196,332,1200,320,196,328,1220,320,1196,328,1200,316,192,340,196,324,1192,328,1200,320,220,328,1208,316,192,328,1204,320,1200,324,1196,324,192,332,208,332,1200,316,204,324,200,320,204,324,1204,316,1200,324,1220,312,9988,};
#define pin_tx 11
#define pin_led 13
#define pin_button1 7
#define delay_correction 0
void setup() {
// Serial
Serial.begin(115200);
Serial.println(F("\nHomeEasy Transmitter ready!\n"));
// i/o
pinMode(pin_tx, OUTPUT);
pinMode(pin_led, OUTPUT);
pinMode(pin_button1, INPUT);
digitalWrite(pin_button1, HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(pin_button1) == LOW) {
digitalWrite(pin_led, HIGH);
unsigned long start = micros();
for (int i = 0; i < 93; i = i+2) {
digitalWrite(pin_tx, HIGH);
delayMicroseconds(one_off[i] - delay_correction);
digitalWrite(pin_tx, LOW);
delayMicroseconds(one_off[i] - delay_correction);
}
unsigned long ende = micros();
Serial.println(ende-start);
digitalWrite(pin_led, LOW);
delay(1000);
}
}