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