Envoie code IR (non répertorié) sur ESP8266

Bonjour à tous, je me tourne vers la communauté pour résoudre mon problème ( qui dure déjà 3 jours )

voilà, je voudrai commandé mes clim avec un 8266, mais se sont des airton donc code non répertorié, de plus le nombre d'informations pour les climatiseurs est très grand ( pour moi, j'ai 455 infos transmis par commande ).
comme vous pouvez le voir, j'ai bien décodé les infos à envoyer, d’ailleurs : j'ai envoyé ce code IR à l'aide d'un arduino pro nano => cela fonctionne ! mais j'aimerai utiliser un esp8266 ( pour une commande wiffi )

j'ai bien trouvé un programme pour esp8266, pour envoyer des infos IR ( voici le code )

/* IRremoteESP8266: IRsendDemo - demonstrates sending IR codes with IRsend.
 *
 * Version 1.0 April, 2017
 * Based on Ken Shirriff's IrsendDemo Version 0.1 July, 2009,
 * Copyright 2009 Ken Shirriff, http://arcfn.com
 *
 * An IR LED circuit *MUST* be connected to the ESP8266 on a pin
 * as specified by IR_LED below.
 *
 * TL;DR: The IR LED needs to be driven by a transistor for a good result.
 *
 * Suggested circuit:
 *     https://github.com/markszabo/IRremoteESP8266/wiki#ir-sending
 *
 * Common mistakes & tips:
 *   * Don't just connect the IR LED directly to the pin, it won't
 *     have enough current to drive the IR LED effectively.
 *   * Make sure you have the IR LED polarity correct.
 *     See: https://learn.sparkfun.com/tutorials/polarity/diode-and-led-polarity
 *   * Typical digital camera/phones can be used to see if the IR LED is flashed.
 *     Replace the IR LED with a normal LED if you don't have a digital camera
 *     when debugging.
 *   * Avoid using the following pins unless you really know what you are doing:
 *     * Pin 0/D3: Can interfere with the boot/program mode & support circuits.
 *     * Pin 1/TX/TXD0: Any serial transmissions from the ESP8266 will interfere.
 *     * Pin 3/RX/RXD0: Any serial transmissions to the ESP8266 will interfere.
 *   * ESP-01 modules are tricky. We suggest you use a module with more GPIOs
 *     for your first time. e.g. ESP-12 etc.
 */

#ifndef UNIT_TEST
#include <Arduino.h>
#endif
#include <IRremoteESP8266.h>
#include <IRsend.h>

#define IR_LED D3  

IRsend irsend(IR_LED);  // Set the GPIO to be used to sending the message.

// Example of data captured by IRrecvDumpV2.ino
uint16_t rawData[] = {200,200,200,200}; // 16°C chauffage

//uint16_t data2[]={1564, 785, 261, 537, 261, 537, 261, 148, 261, 148, 261, 148, 261, 537, 261, 148, 261, 148, 261, 537, 261, 537, 261, 148, 261, 537, 261, 148, 261, 148, 261, 537, 261, 537, 261, 148, 261, 537, 261, 537, 261, 148, 261, 148, 261, 537, 261, 148, 261, 148, 261, 148, 261, 537, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 537, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 537, 261, 148, 261, 537, 261, 148, 261, 148, 261, 537, 261, 537, 261, 148, 261, 35000, 1564, 785, 261, 537, 261, 537, 261, 148, 261, 148, 261, 148, 261, 537, 261, 148, 261, 148, 261, 537, 261, 537, 261, 148, 261, 537, 261, 148, 261, 148, 261, 537, 261, 537, 261, 148, 261, 537, 261, 537, 261, 148, 261, 148, 261, 537, 261, 148, 261, 148, 261, 537, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 537, 261, 148, 261, 148, 261, 537, 261, 148, 261, 148, 261, 537, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 537, 261, 537, 261, 537, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 148, 261, 537, 261, 148, 261, 148, 261, 537, 261, 148, 261}; // 17°c chauffage


void setup() {
  irsend.begin();
  Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY);
}

void loop() {

  irsend.sendRaw(rawData, 4, 38);  // Send a raw data capture at 38kHz.
  delay(8000);

}

Dans le programme ci-dessus, je voudrais envoyer 4 informations IR qui sont rawData soit 200,200,200,200
( data2 est en fait mon véritable code pour ma clim soit 455 informations, mais que ne n'utilise pas ici )

et voici ce que je récolte sur mon récepteur IR :

Raw: (3) 232, -120, 312,

Raw: (3) 256, -144, 288,

Raw: (3) 224, -160, 280,

Raw: (3) 200, -208, 264,

Raw: (3) 232, -112, 312,

Raw: (3) 256, -144, 296,

==> des valeurs très hétérogènes 112 à 312 pour 200, et je demande 4 infos et j'en ai 3 ? donc non reconnue par mes clims, mais c'est normale avec ces valeurs !

pouvez m'aider ? erreur dans le programme ? faut-il un autre programme ? si oui lequel ?
là je fais du surplace, je ne comprends aucune logique dans ce code envoyé.

merci

Il suffit de poster un message pour trouver la solution ! ( il faut croire ? )

enfin j'ai trouvé !

le "problème" vient que j'utilisais un programme récepteur arduino pro mini pour décoder les infos reçus par ma télécommande soit : {1564, 785, 261, 537, 261, 537 . . . et je pensais que ces chiffres correspondaient en micros secondes le signal à envoyer.
mais lorsque j'utilise esp => c'est "autre chose" tjs une suite de chiffres mais codé différemment.
comment je le sais ?
et bien, j'ai fini par utiliser les recepteur IR de ESP8266 : IRrecvDumpV2
et le code j'ai reçus pour ma clim est : uint16_t rawData[227] = {3076, 1608, 480, 1108, 480, 1106, 478, 342, 478, 342, 478, 342, 478, 1108, 454, 366, 454, 366, 452, 1134, 452, 1134, 452, 368, 452, 1134, 452, 368, 456, 364, 452, 1134, 452, 1136, 452, 366, 452, 1136, 452, 1134, 452, 366, 468, 352, 464, 1122, 452, 368, 452, 368, 452, 1134, 478, 340, 452, 368, 476, 344, 452, 370, 448, 370, 452, 366, 452, 366, 456, 364, 452, 366, 452, 366, 454, 366, 476, 344, 472, 346, 452, 368, 452, 366, 452, 368, 452, 366, 476, 1112, 454, 366, 454, 364, 452, 1136, 450, 368, 456, 362, 454, 1134, 452, 368, 474, 344, 474, 344, 452, 368, 452, 366, 452, 368, 456, 364, 454, 366, 454, 1134, 450, 1136, 464, 1122, 470, 350, 452, 366, 452, 366, 460, 360, 454, 364, 452, 368, 474, 344, 474, 344, 462, 358, 466, 354, 452, 368, 452, 368, 476, 344, 476, 344, 452, 366, 452, 368, 452, 368, 452, 368, 476, 344, 452, 368, 476, 344, 452, 368, 452, 366, 454, 366, 476, 344, 454, 366, 452, 368, 458, 362, 452, 368, 456, 362, 456, 364, 456, 362, 454, 366, 474, 344, 458, 362, 454, 366, 476, 344, 474, 344, 452, 366, 468, 352, 468, 352, 464, 354, 452, 368, 456, 364, 458, 362, 452, 366, 454, 366, 476, 1112, 474, 346, 454, 366, 474, 1112, 474, 344, 476}; // TCL112AC
soit non plus 455 infos à envoyer, mais 227 ? ? ?
enfin j'ai essayé avec ces 227 infos, et cela fonctionne ! ! !

l'erreur que j'ai donc commis, c'est utilisé un récepteur sur arduino mini et de l'envoyer sur esp8266 !

donc utiliser un récepteur 8266, pour après l'envoyer sur un émetteur 8266

cela parait ÉVIDENT, au premier abords, mais pas dans la vraie vie . . .

j'espère que mon post, pourra servir à quelqu'un.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.