Das zwölfte Türchen

Aujourd'hui, il y a de nouveau un microcontrôleur derrière la porte, avec lequel vous pouvez non seulement lire différents capteurs et actionneurs de commande, mais aussi vous connecter à un réseau local sans fil (WLAN). Il s'agit d'un autre tableau d'affichage avec la ESP8266.

Ce tableau de répartition possède, outre le processeur avec une mémoire flash de 4 Mo, un convertisseur USB-série CP2102, ce qui permet de programmer facilement le module. La plupart des broches d'E/S sont sorties. Il existe également un régulateur de tension, qui fournit la tension d'alimentation de 3,3 V pour le ESP8266 à partir de la tension d'alimentation USB ou de la tension au niveau du connecteur Vin. Voici une note importante. Comme le ESP8266 fonctionne avec 3,3 V, aucune tension supérieure à 3,3 V ne peut être appliquée à ses entrées ! Un autre avantage de cette planche est qu'elle est plus petite d'une dimension de grille et qu'elle tient donc sur une simple breadboard.


Un flux RSS est un aperçu des actualités au format XML proposé par différents serveurs d'information sur Internet. Dans l'exemple de programme, le serveur de l'ARD est utilisé. Comme les nouvelles sont reçues au format XML, il est facile de n'afficher que certaines parties de l'ensemble des informations. Avec 16 caractères par ligne, l'espace est très réduit, nous ne montrons donc que le titre de chaque message. Voici, par exemple, le début d'un tel flux :

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/resources/xsl/rdf_xsl.jsp" type="text/xsl"?>
<rss version="2.0">
<!--
* XML-format for teasering tagesschau.de-headlines. Version: 2.0
* Release-Date:2002/02/04, last updated 2006/06/28
*
* Die Nutzung dieser Inhalte ist ausschliesslich nic⸮ht-kommerziellen Internet-
* Angeboten erlaubt, die Nutzung kann jederzeit von tagesschau.de untersagt
* werden. tagesschau.de übernimmt keinen Support, zudem wird keine Verfügbarkeit
* dieser XML-Datei gewährleistet. Die Inhalte dürfen nicht archiviert werden.
//-->
<channel>
<title>tagesschau.de - Die Nachrichten der ARD</title>
<link>https://www.tagesschau.de</link>
<description>tagesschau.de</description>
<language>de</language>
<copyright>tagesschau.de, Norddeutscher Rundfunk</copyright>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<ttl>30</ttl>
<item>
<title>Corona-Katastrophenfall: Bayern will Maßnahmen verschärfen</title>
<link>https://www.tagesschau.de/inland/corona-bayern-119.html</link>
<description>Die Neuinfektionen mit dem Corona-Virus bleiben............</description>
<guid>https://www.tagesschau.de/inland/corona-bayern-119.html</guid>
<category>Inland</category>
</item>
<item>
<title>……………………………..


Comme le montre la photo de couverture, nous voulons utiliser l'un des contrôleurs avec un écran LCD, comme présenté dans le calendrier de l'avent le 4. 12., pour construire un lecteur de flux RSS qui affiche également la date et l'heure. Avec le lecteur, il est possible d'afficher les actualités d'un flux d'informations sous forme de symbole. La date et l'heure sont récupérées à partir d'un serveur de temps NTP.

La variable principale (prononcée "tegg" =label, tag, label) <rss> dans cette variable est la variable <channel>, qui contient les messages individuels avec la variable <item>. Nous sommes intéressés par la marque de titre des articles, le chemin XML doit donc être /rss/channel/item/title.

Tout d'abord, il faut un peu de soudure. En premier lieu, la carte du microcontrôleur doit être munie d'en-têtes de broches. Ensuite, l'adaptateur I2C doit être soudé à l'écran. Je recommande de monter l'adaptateur I2C sur la partie inférieure, car il ne gênera pas le montage dans un boîtier.

Le câblage est assez simple : GND et Vcc de l'écran que nous connectons à GND et Vin du contrôleur. La ligne d'horloge SCL se trouve à D1 et la ligne de données SDA à D2.


Il est maintenant temps de commencer à programmer avec l'IDE Arduino. Si le support des cartes avec ESP8266 MCU n'est pas encore installé, nous devons le faire maintenant. Dans l’IDE Arduino, nous allons via le menu Fichier dans les Préférences ou simplement avec "Ctrl+ ;".

Dans le formulaire, nous cliquons sur le symbole à droite du champ de saisie sous "URLs supplémentaires de l'administrateur du forum". Ici, nous pouvons maintenant entrer l'URL de l'administrateur du forum ESP8266 :

http://arduino.esp8266.com/stable/package_esp8266com_index.json


Après avoir sauvegardé les paramètres par défaut, nous appelons le gestionnaire du forum via le menu Outils->Conseil:->Gestionnaire du forum. En termes de recherche, nous tapons "esp8266". Nous obtenons l'entrée suivante, que nous installons.


Nous pouvons maintenant sélectionner un tableau dans le menu Outils->Bureau:->ESP8266 Tableaux. Nous utilisons NodeMCU 1.0....


Tout est maintenant prêt afin d'installer le plan pour le Newsreader.


#include <ESP8266WiFi.h> //WLAN Unterstützung
#include <TZ.h> //Zeitzonen Konstanten

#include <LiquidCrystal_I2C.h> //Bibliothek für das LCD Display
#include <TinyXML.h> //XML-Interpreter zum Lesen des RSS-Feed

//SSID und PSK vom lokalen WLAN
#define STASSID "*********************"
#define STAPSK "*********************"

//Zeitzone mit Sommer/Winterzeit Information
#define MYTZ TZ_Europe_Berlin

// Timeout zum Lesen des RSS-Feed in Sekunden
#define READ_TIMEOUT 10

//Verarbeitungsschritte
#define ST_CLEAR 0 //neue Daten vom Server holen
#define ST_START 1 //Meldung anzeigen
#define ST_MOVE 2 //Meldung durchschieben
#define ST_END 3 //Meldungsende anzeigen

#define MAXNEWS 10 //Maximale Anzahl der Meldungen
#define RSS_SERVER "www.tagesschau.de" //Nachrichtenserver
#define RSS_FEED "newsticker.rdf" //Name des Feeds


// LCD Adresse = 0x27, Anzahl Zeichen 16 Anzahl Zeilen 2
LiquidCrystal_I2C lcd(0x27,16,2);

//WLAN Client Instanz
WiFiClient client;

//XML Interpreter Instanz
TinyXML xml;

//Deutsche Sonderzeichen
uint8_t font [8][9] {
    {0x0c,0x12,0x12,0x0c,0x00,0x00,0x00,0x00}, // 0 °
    {0x11,0x04,0x0a,0x11,0x1f,0x11,0x11,0x00}, // 1 Ä
    {0x11,0x0e,0x11,0x11,0x11,0x11,0x0e,0x00}, // 2 Ö
    {0x11,0x00,0x11,0x11,0x11,0x11,0x0e,0x00}, // 3 Ü
    {0x0a,0x00,0x1e,0x01,0x0f,0x13,0x0d,0x00}, // 4 ä
    {0x0a,0x00,0x0e,0x11,0x11,0x11,0x0e,0x00}, // 5 ö
    {0x0a,0x00,0x12,0x12,0x12,0x12,0x0f,0x00}, // 6 ü
    {0x0c,0x12,0x12,0x14,0x12,0x12,0x14,0x00} // 7 ß
};


uint8_t buffer[4000]; //Buffer für XML-Interpreter
uint16_t msglen = 0; //Länge der aktuellen Nachricht
String msg; //aktuelle Nachricht
String news[MAXNEWS]; //Speicher für Nachrichten
uint8_t newsCnt = 0; //Anzahl der aktuellen Nachrichten im Speicher
uint8_t curNews = 0; //Index der gerade angezeigten Nachricht
uint8_t step = 0; //Aktueller Verarbeitungsschritt
uint16_t pos = 0; //Startposition zum Durchschieben

//Deutsche Umlaute (UTF8) fürs Display codieren
String extraChar(String text){
  String res = "";
  uint8_t i = 0;
  char c;
  while (i<text.length()) {
    c=text[i];
    if (c==195) { //UTF8 Deutsche Umlaute
      i++;
      switch (text[i]) {
        case 164: c=4; break; //ä
        case 182: c=5; break; //ö
        case 188: c=6; break; //ü
        case 159: c=7; break; //ß
        case 132: c=1; break; //Ä
        case 150: c=2; break; //Ö
        case 156: c=3; break; //Ü
        default: c=0;
      }
    } else if (c == 194) { //UTF8 Sonderzeichen
      i++;
      if (text[i] == 176) c=0xdf; else c=0;
    } else if (c > 128) { //normal characters unchanged
      c=255;
    }
    if (c>0) res.concat(c);
    i++;
    }
  return res;
}


//Diese Funktion wird vom XML-Interpreter aufgerufen, wenn ein XML-Tag gelesen wurde
//tagName enthält den vollständigen XML-Pfad des Tags, data den Inhalt des Tags
void XML_callback(uint8_t statusflags, char* tagName, uint16_t tagNameLen, char* data, uint16_t dataLen) {
  if (statusflags & STATUS_TAG_TEXT) {
    //Serial.println(tagName);
    //wenn wir einen Titel-Tag finden, und die maximale Anzahl der Meldungen noch
    //nicht erreicht ist, wird die Meldung gespeichert und der Zähler erhöht
    if (strcasecmp(tagName,"/rss/channel/item/title")==0) {
data[dataLen] = '\0';
      Serial.printf("%i %s\n",newsCnt,data);
      if (newsCnt < MAXNEWS) {
        news[newsCnt] = data;
        newsCnt++;
      }
    }
  }
}

//Neue Nachrichten vom RSS-Feed lesen
boolean getNews() {
  boolean res = false;
  boolean timedOut = false;
  char c;
  newsCnt = 0;
  //nur wenn wir eine Internetverbindung haben
  if(WiFi.status()== WL_CONNECTED){
    //zuerst mit dem HTTP-Server verbinden
    Serial.println("Mit Server verbinden");
    if(client.connect(RSS_SERVER, 80)) {
    Serial.println("OK\r\nRequesting data...");
    //Nun können wir die XML-Seite mit dem Feed holen
    client.print("GET /");
    client.print(RSS_FEED);
    client.print(" HTTP/1.1\r\nHost: ");
    client.print(RSS_SERVER);
    client.print("\r\nConnection: Close\r\n\r\n");
    client.flush();
    //den XML-Interpreter vorbereiten
    xml.reset();
    newsCnt = 0;
    uint32_t t = millis(); // Startzeit
    while(client.connected()) {
      if((c = client.read()) >= 0) {
        //Solange wir Zeichen vom Webserver erhalten, werden diese
        //zur Interpretation an den XML Interpreter weitergegeben
        xml.processChar(c);
        delay(1); //Verzögerung 1ms sonst kommt der XML Interpreter nicht nach
        t = millis(); // Reset timeout clock
      } else if((millis() - t) >= (READ_TIMEOUT * 1000)) {
        //Im Falle eines Timeouts wird die Interpretation abgebrochen
        Serial.println("---Timeout---");
        timedOut = true;
        break;
      }
    }
    if (timedOut) Serial.println("Timeout");
    if(!timedOut && (newsCnt > 0)) {
      //Falls Nachrichten empfangen wurden, wird die erste Nachricht angezeigt
      curNews = 0;
    }
  }
  client.stop();
} else {
  //war keine Internet Verbindung vorhanden
  //wird ein neuer Verbindungsversuch gestartet
  //und eine Fehlermeldung angezeigt
  news[0] = "Keine Internetverbindung!";
  newsCnt = 1;
  curNews = 0;
  }
}

//Anzeige aktualisieren
void updateDisplay() {
  //erste Zeile Zeit und Datum
  time_t now; //aktuelle Zeit
  struct tm * s_time; //Zeitstruktur aufgesplittet in Jahr, Monat, Tag, Stunden, Minuten und Sekunden
  char line_buffer[20]; //Buffer für Anzeigenzeile
  now = time(nullptr); //aktuelle Zeit lesen
  s_time = localtime(&now); //für die lokale Zeit in die Zeitstruktur umwandeln
  //Zeilenbuffer mit Uhrzeit und Datum füllen
  strftime(line_buffer,17,"%d.%m.%Y %H:%M",s_time);
  //Uhrzeit auf die serielle Schnittstelle ausgeben
  //Serial.println(line_buffer);
  //Uhrzeit am Display in Zeile 1 anzeigen
  lcd.setCursor(0,0);
  lcd.print(line_buffer);
  //zweite Zeile Nachrichten
  lcd.setCursor(0,1);
  switch (step) {
    case ST_CLEAR: step = ST_START; //Nächster Schritt
      if (curNews >= newsCnt) {
        lcd.print("Aktualisierung..");
        getNews(); //neue Nachrichten holen
        curNews = 0;
      } else {
        curNews++; //nächste Nachricht starten
        lcd.print(" ");
        if (curNews >= newsCnt) step = ST_END;
      }
      msg = extraChar(news[curNews]);
      msglen = msg.length();
      break;
  case ST_START:lcd.print(msg.substring(0,16));
    pos = 0; //Startposition einnehmen
    step = ST_MOVE;
    break;
  case ST_MOVE: pos++;
    lcd.print(msg.substring(pos,pos+16));
    //wenn die Nachricht fertig ist, nächste Nachricht
    if (pos > (msglen-17)) step=ST_END;
    break;
  case ST_END: step = ST_CLEAR;
    break;
  }
}

//Setup Funktion
void setup() {
  Serial.begin(115200); //Serielle Schnittstelle initialisieren
  //XML-Interpreter initialisieren
  xml.init((uint8_t *)buffer, sizeof(buffer), &XML_callback);
  //Display initialisieren und Beleuchtung ein
  lcd.init();
  lcd.backlight();
  //Deutsche Umlaute erzeugen
  for (uint8_t i = 0; i<8; i++) lcd.createChar(i, font[i]);
  //Display löschen und Startmeldung anzeigen
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("AZ-Delivery");
  lcd.setCursor(0,1);
  lcd.print("Einen Moment....");
  //Interne Uhr konfigurieren
  configTime(MYTZ, "pool.ntp.org");
  //WLAN initialisieren und mit dem WLAN verbinden
  WiFi.persistent(false);
  WiFi.mode(WIFI_STA);
  WiFi.begin(STASSID, STAPSK);
  uint8_t cnt = 0;
  //warten bis Verbindung hergestellt wurde
  while ((WiFi.status() != WL_CONNECTED) && (cnt<10)) {
    Serial.println(WiFi.status());
    cnt++;
    delay(500);
  }
  newsCnt = 0;
  step = ST_CLEAR;
}

//Hauptschleife
void loop() {
  //Zeit anzeigen
  updateDisplay();
  //Verzögerung fürs Durchschieben
  delay(500);
}


Télécharger le schéma / Download CODE


Presque tout ce dont nous avons besoin est inclus dans le paquet ESP8266. Seules les bibliothèques pour l'affichage LCD et pour l'évaluation des données XML manquent. Ils peuvent être installés via la gestion de la bibliothèque dans l'IDE Arduino.

Nous saisissons "I2C LCD" comme terme de recherche et trouvons, un peu plus loin dans la liste, la bibliothèque souhaitée.


Ensuite, nous saisissons "Tiny XML" comme terme de recherche et nous obtenons la bibliothèque que nous voulons.


Avant d'établir le croquis, nous devons saisir les références du WLAN à la place des astérisques.

Vous pouvez également choisir un autre serveur de nouvelles, un autre flux sur ce serveur et/ou un autre nombre d'articles. Ensuite, vous devez modifier les entrées #define correspondantes. Le nombre de messages ne doit pas être supérieur à 10.

Ne soyez pas surpris si vous obtenez l'avertissement suivant lors de la compilation.


ATTENTION : La bibliothèque LiquidCrystal_I2C prétend fonctionner sur une (des) architecture(s) avr et peut être incompatible avec votre carte actuelle fonctionnant sur une (des) architecture(s) esp8266.


Cet avertissement est dû à une entrée incorrecte dans les spécifications de la bibliothèque. La bibliothèque fonctionne bien avec les MCU ESP8266.

Une fois que tous les messages du serveur de nouvelles ont été affichés, les messages sont à nouveau récupérés sur le serveur. L'heure est mise à jour en permanence. Le passage de l'heure d'été à l'heure normale est automatique.


Amusez-vous bien avec la construction.





…………………………… ..</div> <p> </p> <p>La balise racine (prononcée "tegg" = étiquette, balise, identification) <rss> dans cette balise est la balise <channel>, qui contient les messages individuels avec la balise <item>. Nous sommes intéressés par la balise title de l'élément, donc le chemin XML doit être / rss / channel / item / title.</p> Un petit travail de soudure est d'abord nécessaire. Tout d'abord, la carte microcontrôleur doit être équipée d'en-têtes de broches. Ensuite, l'adaptateur I2C doit être soudé à l'écran. Je recommande d'installer l'adaptateur I2C sur la face inférieure, car il ne vous gênera pas si vous prévoyez de l'installer dans un boîtier.<br><br>Le câblage est très simple GND et Vcc de l'affichage que nous connectons à GND et Vin du contrôleur. La ligne d'horloge SCL arrive à D1 et la ligne de données SDA à D2. <table width="100%"> <tbody> <tr> <td><img src="https://cdn.shopify.com/s/files/1/1509/1638/files/Verdrahtung_7f27aa28-2076-40f7-8395-7eb8ea7c37cc_480x480_1_600x600.png?v=1607674627" alt="" style="display: block; margin-left: auto; margin-right: auto;"></td> </tr> </tbody> </table> <p><br>Il est maintenant temps de programmer avec l'IDE Arduino. Si le support des cartes avec le MCU ESP8266 n'est pas encore installé, nous devons le faire maintenant. Dans l'IDE Arduino, nous allons dans Préférences via le menu Fichier ou simplement avec "Ctrl +;".</p> <p>Dans le formulaire, nous cliquons sur le symbole à droite du champ de saisie sous l'item «URL d'administrateur de forum supplémentaires». Ici, nous pouvons maintenant entrer l'URL du gestionnaire de carte ESP8266:</p> <p><em>http://arduino.esp8266.com/stable/package_esp8266com_index.json<br></em></p> <table width="100%"> <tbody> <tr> <td><img src="https://cdn.shopify.com/s/files/1/1509/1638/files/board_verwalter_480x480_480x480_f04cc826-b064-49b7-b405-7bc44ca75626_600x600.jpg?v=1607676661" alt="" style="display: block; margin-left: auto; margin-right: auto;"></td> </tr> </tbody> </table> <p><br>Une fois les préréglages enregistrés, nous appelons le gestionnaire de carte via le menu Outils-> Carte: -> Gestionnaire de carte. Nous saisissons «esp8266» comme terme de recherche. Nous obtenons l'entrée suivante, que nous installons.</p> <table width="100%"> <tbody> <tr> <td><img src="https://cdn.shopify.com/s/files/1/1509/1638/files/boardverwalter_480x480_dde6e6de-80cd-4ccd-a1e0-8bc9fc15c853_480x480_1_600x600.jpg?v=1607676689" alt="" style="display: block; margin-left: auto; margin-right: auto;"></td> </tr> </tbody> </table> <p> <br>Maintenant, nous pouvons sélectionner une carte dans le menu Outils-> Carte: -> Cartes ESP8266. Nous utilisons NodeMCU 1.0….</p> <table width="100%"> <tbody> <tr> <td><img src="https://cdn.shopify.com/s/files/1/1509/1638/files/boardauswahl_480x480_480x480_4f372d09-6c70-4b39-b9b7-bd9e9653c473_600x600.jpg?v=1607677567" alt="" style="display: block; margin-left: auto; margin-right: auto;"></td> </tr> </tbody> </table> <p><br></p> <p>Tout est maintenant prêt pour installer le croquis pour le lecteur de nouvelles.</p> <p><span style="color: #5e6d03;" color="#5e6d03">#include</span> <span style="color: #434f54;" color="#434f54"><</span><span style="color: #d35400;" color="#d35400">ESP8266WiFi</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #000000;" color="#000000">H</span><span style="color: #434f54;" color="#434f54">></span>  <span style="color: #434f54;" color="#434f54">// Prise en charge du WLAN</span></p> <pre><span style="color: #5e6d03;" color="#5e6d03">#include</span> <span style="color: #434f54;" color="#434f54"><</span><span style="color: #000000;" color="#000000">TZ</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #000000;" color="#000000">H</span><span style="color: #434f54;" color="#434f54">></span>           <span style="color: #434f54;" color="#434f54">// constantes de fuseau horaire</span> <span style="color: #5e6d03;" color="#5e6d03">#include</span> <span style="color: #434f54;" color="#434f54"><</span><b><span style="color: #d35400;" color="#d35400">LiquidCrystal_I2C</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #000000;" color="#000000">H</span><span style="color: #434f54;" color="#434f54">></span> <span style="color: #434f54;" color="#434f54">// Bibliothèque pour l'écran LCD</span> <span style="color: #5e6d03;" color="#5e6d03">#include</span> <span style="color: #434f54;" color="#434f54"><</span><span style="color: #000000;" color="#000000">TinyXML</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #000000;" color="#000000">H</span><span style="color: #434f54;" color="#434f54">></span>         <span style="color: #434f54;" color="#434f54">// Interpréteur XML pour lire le flux RSS</span> <span style="color: #434f54;" color="#434f54">// SSID et PSK du WLAN local</span> <span style="color: #5e6d03;" color="#5e6d03">#define</span> <span style="color: #000000;" color="#000000">STASSID</span> <span style="color: #005c5f;" color="#005c5f">"*********************"</span> <span style="color: #5e6d03;" color="#5e6d03">#define</span> <span style="color: #000000;" color="#000000">STAPSK</span>  <span style="color: #005c5f;" color="#005c5f">"*********************"</span> <span style="color: #434f54;" color="#434f54">// Fuseau horaire avec informations sur l'heure d'été / d'hiver</span> <span style="color: #5e6d03;" color="#5e6d03">#define</span> <span style="color: #000000;" color="#000000">MYTZ</span> <span style="color: #000000;" color="#000000">TZ_Europe_Berlin</span> <span style="color: #434f54;" color="#434f54">// Délai de lecture du flux RSS en secondes</span> <span style="color: #5e6d03;" color="#5e6d03">#define</span> <span style="color: #000000;" color="#000000">READ_TIMEOUT</span> <span style="color: #000000;" color="#000000">10</span> <span style="color: #434f54;" color="#434f54">// étapes de traitement</span> <span style="color: #5e6d03;" color="#5e6d03">#define</span> <span style="color: #000000;" color="#000000">ST_CLEAR</span> <span style="color: #000000;" color="#000000">0</span> <span style="color: #434f54;" color="#434f54">// récupère les nouvelles données du serveur</span> <span style="color: #5e6d03;" color="#5e6d03">#define</span> <span style="color: #000000;" color="#000000">ST_START</span> <span style="color: #000000;" color="#000000">1</span> <span style="color: #434f54;" color="#434f54">//Montrer les notifications</span> <span style="color: #5e6d03;" color="#5e6d03">#define</span> <span style="color: #000000;" color="#000000">ST_MOVE</span>  <span style="color: #000000;" color="#000000">2</span> <span style="color: #434f54;" color="#434f54">// Faire passer le message</span> <span style="color: #5e6d03;" color="#5e6d03">#define</span> <span style="color: #000000;" color="#000000">ST_END</span>   <span style="color: #000000;" color="#000000">3</span> <span style="color: #434f54;" color="#434f54">// Afficher la fin du message</span> <span style="color: #5e6d03;" color="#5e6d03">#define</span> <span style="color: #000000;" color="#000000">MAXNEWS</span> <span style="color: #000000;" color="#000000">10</span> <span style="color: #434f54;" color="#434f54">// Nombre maximum de messages</span> <span style="color: #5e6d03;" color="#5e6d03">#define</span> <span style="color: #000000;" color="#000000">RSS_SERVER</span> <span style="color: #005c5f;" color="#005c5f">"www.tagesschau.de"</span> <span style="color: #434f54;" color="#434f54">// serveur de messages</span> <span style="color: #5e6d03;" color="#5e6d03">#define</span> <span style="color: #000000;" color="#000000">FLUX RSS</span> <span style="color: #005c5f;" color="#005c5f">"newsticker.rdf"</span>      <span style="color: #434f54;" color="#434f54">// nom du flux</span> <span style="color: #434f54;" color="#434f54">// Adresse LCD = 0x27, nombre de caractères 16, nombre de lignes 2</span> <b><span style="color: #d35400;" color="#d35400">LiquidCrystal_I2C</span></b> <span style="color: #000000;" color="#000000">lcd</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">0x27</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">16</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">2</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// Instance client WLAN</span> <span style="color: #d35400;" color="#d35400">WiFiClient</span> <span style="color: #d35400;" color="#d35400">client</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// Instance d'interpréteur XML</span> <span style="color: #000000;" color="#000000">TinyXML</span> <span style="color: #000000;" color="#000000">xml</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// Caractères spéciaux allemands</span> <span style="color: #00979c;" color="#00979c">uint8_t</span> <span style="color: #000000;" color="#000000">Police de caractère</span> <span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">8</span><span style="color: #000000;" color="#000000">]</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">9</span><span style="color: #000000;" color="#000000">]</span> <span style="color: #000000;" color="#000000">{</span>     <span style="color: #000000;" color="#000000">{</span><span style="color: #000000;" color="#000000">0x0c</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x12</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x12</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x0c</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #000000;" color="#000000">}</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #434f54;" color="#434f54">// 0 °</span>     <span style="color: #000000;" color="#000000">{</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x04</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x0a</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x1f</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #000000;" color="#000000">}</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #434f54;" color="#434f54">// 1 Ä</span>     <span style="color: #000000;" color="#000000">{</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x0e</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x0e</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #000000;" color="#000000">}</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #434f54;" color="#434f54">// 2 Ö</span>     <span style="color: #000000;" color="#000000">{</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x0e</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #000000;" color="#000000">}</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #434f54;" color="#434f54">// 3 nuits</span>     <span style="color: #000000;" color="#000000">{</span><span style="color: #000000;" color="#000000">0x0a</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x1e</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x01</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x0f</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x13</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x0d</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #000000;" color="#000000">}</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #434f54;" color="#434f54">// 4 a</span>     <span style="color: #000000;" color="#000000">{</span><span style="color: #000000;" color="#000000">0x0a</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x0e</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x11</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x0e</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #000000;" color="#000000">}</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #434f54;" color="#434f54">// 5 ö</span>     <span style="color: #000000;" color="#000000">{</span><span style="color: #000000;" color="#000000">0x0a</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x12</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x12</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x12</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x12</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x0f</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #000000;" color="#000000">}</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #434f54;" color="#434f54">// 6 ü</span>     <span style="color: #000000;" color="#000000">{</span><span style="color: #000000;" color="#000000">0x0c</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x12</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x12</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x14</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x12</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x12</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x14</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0x00</span><span style="color: #000000;" color="#000000">}</span>  <span style="color: #434f54;" color="#434f54">// 7 ß</span> <span style="color: #000000;" color="#000000">}</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #00979c;" color="#00979c">uint8_t</span> <span style="color: #d35400;" color="#d35400">tampon</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">4000</span><span style="color: #000000;" color="#000000">]</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #434f54;" color="#434f54">// Buffer pour l'interpréteur XML</span> <span style="color: #00979c;" color="#00979c">uint16_t</span> <span style="color: #000000;" color="#000000">msglen</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>         <span style="color: #434f54;" color="#434f54">// longueur du message courant</span> <span style="color: #00979c;" color="#00979c">Chaîne</span> <span style="color: #000000;" color="#000000">msg</span><span style="color: #000000;" color="#000000">;</span>                  <span style="color: #434f54;" color="#434f54">// message actuel</span> <span style="color: #00979c;" color="#00979c">Chaîne</span> <span style="color: #000000;" color="#000000">nouvelles</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">MAXNEWS</span><span style="color: #000000;" color="#000000">]</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #434f54;" color="#434f54">// mémoire pour les messages </span> <span style="color: #00979c;" color="#00979c">uint8_t</span> <span style="color: #000000;" color="#000000">newsCnt</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>         <span style="color: #434f54;" color="#434f54">// Nombre de messages actuels en mémoire</span> <span style="color: #00979c;" color="#00979c">uint8_t</span> <span style="color: #000000;" color="#000000">ACTUALITÉS</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>         <span style="color: #434f54;" color="#434f54">// Index du message actuellement affiché</span> <span style="color: #00979c;" color="#00979c">uint8_t</span> <span style="color: #d35400;" color="#d35400">étape</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>            <span style="color: #434f54;" color="#434f54">// Étape de traitement en cours</span> <span style="color: #00979c;" color="#00979c">uint16_t</span> <span style="color: #000000;" color="#000000">pos</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>            <span style="color: #434f54;" color="#434f54">// Position de départ pour pousser</span> <span style="color: #434f54;" color="#434f54">// Codage des trémas allemands (UTF8) pour l'affichage</span> <span style="color: #00979c;" color="#00979c">Chaîne</span> <span style="color: #000000;" color="#000000">extraChar</span><span style="color: #000000;" color="#000000">(</span><span style="color: #00979c;" color="#00979c">Chaîne</span> <span style="color: #000000;" color="#000000">texte</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">{</span>  <span style="color: #00979c;" color="#00979c">Chaîne</span> <span style="color: #000000;" color="#000000">res</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #005c5f;" color="#005c5f">""</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #00979c;" color="#00979c">uint8_t</span> <span style="color: #000000;" color="#000000">je</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #00979c;" color="#00979c">carboniser</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #5e6d03;" color="#5e6d03">tandis que</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">je</span><span style="color: #434f54;" color="#434f54"><</span><span style="color: #000000;" color="#000000">texte</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">longueur</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>    <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">texte</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">je</span><span style="color: #000000;" color="#000000">]</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">==</span><span style="color: #000000;" color="#000000">195</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span> <span style="color: #434f54;" color="#434f54">// Trémas UTF8 allemands</span>      <span style="color: #000000;" color="#000000">je</span><span style="color: #434f54;" color="#434f54">++</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #5e6d03;" color="#5e6d03">commutateur</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">texte</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">je</span><span style="color: #000000;" color="#000000">]</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>        <span style="color: #5e6d03;" color="#5e6d03">Cas</span> <span style="color: #000000;" color="#000000">164</span><span style="color: #434f54;" color="#434f54">:</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">4</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// UNE</span>        <span style="color: #5e6d03;" color="#5e6d03">Cas</span> <span style="color: #000000;" color="#000000">182</span><span style="color: #434f54;" color="#434f54">:</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">5</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// ö</span>        <span style="color: #5e6d03;" color="#5e6d03">Cas</span> <span style="color: #000000;" color="#000000">188</span><span style="color: #434f54;" color="#434f54">:</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">6</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// ü</span>        <span style="color: #5e6d03;" color="#5e6d03">Cas</span> <span style="color: #000000;" color="#000000">159</span><span style="color: #434f54;" color="#434f54">:</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">7</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// ß</span>        <span style="color: #5e6d03;" color="#5e6d03">Cas</span> <span style="color: #000000;" color="#000000">132</span><span style="color: #434f54;" color="#434f54">:</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">1</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// UNE</span>        <span style="color: #5e6d03;" color="#5e6d03">Cas</span> <span style="color: #000000;" color="#000000">150</span><span style="color: #434f54;" color="#434f54">:</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">2</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// Ö</span>        <span style="color: #5e6d03;" color="#5e6d03">Cas</span> <span style="color: #000000;" color="#000000">156</span><span style="color: #434f54;" color="#434f54">:</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">3</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// Ü</span>        <span style="color: #5e6d03;" color="#5e6d03">défaut</span><span style="color: #434f54;" color="#434f54">:</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #000000;" color="#000000">}</span>    <span style="color: #000000;" color="#000000">}</span> <span style="color: #5e6d03;" color="#5e6d03">autre</span> <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">c</span> <span style="color: #434f54;" color="#434f54">==</span> <span style="color: #000000;" color="#000000">194</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span> <span style="color: #434f54;" color="#434f54">// Caractères spéciaux UTF8</span>      <span style="color: #000000;" color="#000000">je</span><span style="color: #434f54;" color="#434f54">++</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">texte</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">je</span><span style="color: #000000;" color="#000000">]</span> <span style="color: #434f54;" color="#434f54">==</span> <span style="color: #000000;" color="#000000">176</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">0xdf</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #5e6d03;" color="#5e6d03">autre</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #000000;" color="#000000">}</span> <span style="color: #5e6d03;" color="#5e6d03">autre</span> <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">c</span> <span style="color: #434f54;" color="#434f54">></span> <span style="color: #000000;" color="#000000">128</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span> <span style="color: #434f54;" color="#434f54">// caractères normaux inchangés</span>      <span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">255</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #000000;" color="#000000">}</span>    <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">c</span><span style="color: #434f54;" color="#434f54">></span><span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">res</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">concat</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">c</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #000000;" color="#000000">je</span><span style="color: #434f54;" color="#434f54">++</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #000000;" color="#000000">}</span>  <span style="color: #5e6d03;" color="#5e6d03">revenir</span> <span style="color: #000000;" color="#000000">res</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #000000;" color="#000000">}</span> <span style="color: #434f54;" color="#434f54">// Cette fonction est appelée par l'interpréteur XML lorsqu'une balise XML a été lue</span> <span style="color: #434f54;" color="#434f54">// tagName contient le chemin XML complet de la balise, données le contenu de la balise</span> <span style="color: #00979c;" color="#00979c">néant</span> <span style="color: #000000;" color="#000000">XML_callback</span><span style="color: #000000;" color="#000000">(</span><span style="color: #00979c;" color="#00979c">uint8_t</span> <span style="color: #000000;" color="#000000">indicateurs d'état</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #00979c;" color="#00979c">carboniser</span><span style="color: #434f54;" color="#434f54">*</span> <span style="color: #000000;" color="#000000">tagName</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #00979c;" color="#00979c">uint16_t</span> <span style="color: #000000;" color="#000000">tagNameLen</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #00979c;" color="#00979c">carboniser</span><span style="color: #434f54;" color="#434f54">*</span> <span style="color: #000000;" color="#000000">Les données</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #00979c;" color="#00979c">uint16_t</span> <span style="color: #000000;" color="#000000">dataLen</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>  <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">indicateurs d'état</span> <span style="color: #434f54;" color="#434f54">&</span> <span style="color: #000000;" color="#000000">STATUS_TAG_TEXT</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>    <span style="color: #434f54;" color="#434f54">//Serial.println(tagName);</span>    <span style="color: #434f54;" color="#434f54">// si on trouve encore une balise de titre et le nombre maximum de messages</span>    <span style="color: #434f54;" color="#434f54">// n'est pas atteint, le message est enregistré et le compteur est augmenté</span>    <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">strcasecmp</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">tagName</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #005c5f;" color="#005c5f">"/ rss / channel / item / title"</span><span style="color: #000000;" color="#000000">)</span><span style="color: #434f54;" color="#434f54">==</span><span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>      <span style="color: #000000;" color="#000000">Les données</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">dataLen</span><span style="color: #000000;" color="#000000">]</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #00979c;" color="#00979c">'\0'</span><span style="color: #000000;" color="#000000">;</span>      <b><span style="color: #d35400;" color="#d35400">En série</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">printf</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">«% i% s \ n»</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">newsCnt</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">Les données</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">newsCnt</span> <span style="color: #434f54;" color="#434f54"><</span> <span style="color: #000000;" color="#000000">MAXNEWS</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>        <span style="color: #000000;" color="#000000">nouvelles</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">newsCnt</span><span style="color: #000000;" color="#000000">]</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">Les données</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #000000;" color="#000000">newsCnt</span><span style="color: #434f54;" color="#434f54">++</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #000000;" color="#000000">}</span>    <span style="color: #000000;" color="#000000">}</span>  <span style="color: #000000;" color="#000000">}</span> <span style="color: #000000;" color="#000000">}</span> <span style="color: #434f54;" color="#434f54">// Lire les nouveaux messages du flux RSS</span> <span style="color: #00979c;" color="#00979c">booléen</span> <span style="color: #000000;" color="#000000">obtenir des nouvelles</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>  <span style="color: #00979c;" color="#00979c">booléen</span> <span style="color: #000000;" color="#000000">res</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #00979c;" color="#00979c">faux</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #00979c;" color="#00979c">booléen</span> <span style="color: #000000;" color="#000000">Fin du temps</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #00979c;" color="#00979c">faux</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #00979c;" color="#00979c">carboniser</span> <span style="color: #000000;" color="#000000">c</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #000000;" color="#000000">newsCnt</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #434f54;" color="#434f54">// uniquement si nous avons une connexion Internet</span>  <span style="color: #5e6d03;" color="#5e6d03">si</span><span style="color: #000000;" color="#000000">(</span><b><span style="color: #d35400;" color="#d35400">Wifi</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">statut</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #434f54;" color="#434f54">==</span> <span style="color: #000000;" color="#000000">WL_CONNECTED</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">{</span>    <span style="color: #434f54;" color="#434f54">// connectez-vous d'abord au serveur HTTP</span>    <b><span style="color: #d35400;" color="#d35400">En série</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">println</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">"Connecter au serveur"</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #5e6d03;" color="#5e6d03">si</span><span style="color: #000000;" color="#000000">(</span><span style="color: #d35400;" color="#d35400">client</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">relier</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">RSS_SERVER</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #000000;" color="#000000">80</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>      <b><span style="color: #d35400;" color="#d35400">En série</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">println</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">"OK \ r \ nDemande de données ..."</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #434f54;" color="#434f54">// Nous pouvons maintenant obtenir la page XML avec le flux</span>      <span style="color: #d35400;" color="#d35400">client</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">impression</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">"AVOIR /"</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #d35400;" color="#d35400">client</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">impression</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">FLUX RSS</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #d35400;" color="#d35400">client</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">impression</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">"HTTP / 1.1 \ r \ nHôte:"</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #d35400;" color="#d35400">client</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">impression</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">RSS_SERVER</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #d35400;" color="#d35400">client</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">impression</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">"\ r \ nConnexion: Fermer \ r \ n \ r \ n"</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #d35400;" color="#d35400">client</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">affleurer</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #434f54;" color="#434f54">// prépare l'interpréteur XML</span>      <span style="color: #000000;" color="#000000">xml</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">réinitialiser</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #000000;" color="#000000">newsCnt</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #00979c;" color="#00979c">uint32_t</span> <span style="color: #000000;" color="#000000">t</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #d35400;" color="#d35400">millis</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// Heure de début</span>      <span style="color: #5e6d03;" color="#5e6d03">tandis que</span><span style="color: #000000;" color="#000000">(</span><span style="color: #d35400;" color="#d35400">client</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">lié</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>        <span style="color: #5e6d03;" color="#5e6d03">si</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">c</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #d35400;" color="#d35400">client</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">lis</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #434f54;" color="#434f54">>=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>          <span style="color: #434f54;" color="#434f54">// Tant que nous obtenons des caractères du serveur Web, ceux-ci seront</span>          <span style="color: #434f54;" color="#434f54">// transmis à l'interpréteur XML pour interprétation</span>          <span style="color: #000000;" color="#000000">xml</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #000000;" color="#000000">processChar</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">c</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>          <span style="color: #d35400;" color="#d35400">retard</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">1</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// Retarder 1 ms sinon l'interpréteur XML ne suivra pas</span>          <span style="color: #000000;" color="#000000">t</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #d35400;" color="#d35400">millis</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// Réinitialiser l'horloge du timeout</span>        <span style="color: #000000;" color="#000000">}</span> <span style="color: #5e6d03;" color="#5e6d03">autre</span> <span style="color: #5e6d03;" color="#5e6d03">si</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">(</span><span style="color: #d35400;" color="#d35400">millis</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #434f54;" color="#434f54">-</span> <span style="color: #000000;" color="#000000">t</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #434f54;" color="#434f54">>=</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">READ_TIMEOUT</span> <span style="color: #434f54;" color="#434f54">*</span> <span style="color: #000000;" color="#000000">1000</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>          <span style="color: #434f54;" color="#434f54">// En cas de timeout, l'interprétation est abandonnée</span>          <b><span style="color: #d35400;" color="#d35400">En série</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">println</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">"---Temps libre---"</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>          <span style="color: #000000;" color="#000000">Fin du temps</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #00979c;" color="#00979c">vrai</span><span style="color: #000000;" color="#000000">;</span>          <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #000000;" color="#000000">}</span>      <span style="color: #000000;" color="#000000">}</span>      <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">Fin du temps</span><span style="color: #000000;" color="#000000">)</span> <b><span style="color: #d35400;" color="#d35400">En série</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">println</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">"Temps libre"</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #5e6d03;" color="#5e6d03">si</span><span style="color: #000000;" color="#000000">(</span><span style="color: #434f54;" color="#434f54">!</span><span style="color: #000000;" color="#000000">Fin du temps</span> <span style="color: #434f54;" color="#434f54">&&</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">newsCnt</span> <span style="color: #434f54;" color="#434f54">></span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>        <span style="color: #434f54;" color="#434f54">// Si des messages ont été reçus, le premier message sera affiché</span>        <span style="color: #000000;" color="#000000">ACTUALITÉS</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>      <span style="color: #000000;" color="#000000">}</span>    <span style="color: #000000;" color="#000000">}</span>    <span style="color: #d35400;" color="#d35400">client</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">Arrêtez</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #000000;" color="#000000">}</span> <span style="color: #5e6d03;" color="#5e6d03">autre</span> <span style="color: #000000;" color="#000000">{</span>    <span style="color: #434f54;" color="#434f54">// il n'y avait pas de connexion Internet</span>    <span style="color: #434f54;" color="#434f54">// une nouvelle tentative de connexion est lancée</span>    <span style="color: #434f54;" color="#434f54">// et un message d'erreur s'affiche</span>    <span style="color: #000000;" color="#000000">nouvelles</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">]</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #005c5f;" color="#005c5f">"Pas de connexion Internet!"</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #000000;" color="#000000">newsCnt</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">1</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #000000;" color="#000000">ACTUALITÉS</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #000000;" color="#000000">}</span> <span style="color: #000000;" color="#000000">}</span> <span style="color: #434f54;" color="#434f54">// mettre à jour l'affichage</span> <span style="color: #00979c;" color="#00979c">néant</span> <span style="color: #d35400;" color="#d35400">mise à jour</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>  <span style="color: #434f54;" color="#434f54">// heure et date de la première ligne</span>  <b><span style="color: #d35400;" color="#d35400">time_t</span></b> <span style="color: #d35400;" color="#d35400">maintenant</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">//heure actuelle </span>  <span style="color: #00979c;" color="#00979c">struct</span> <span style="color: #000000;" color="#000000">tm</span> <span style="color: #434f54;" color="#434f54">*</span> <span style="color: #000000;" color="#000000">s_time</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// Structure temporelle divisée en année, mois, jour, heures, minutes et secondes</span>  <span style="color: #00979c;" color="#00979c">carboniser</span> <span style="color: #000000;" color="#000000">line_buffer</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">20</span><span style="color: #000000;" color="#000000">]</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// Tampon pour la ligne d'annonce</span>  <span style="color: #d35400;" color="#d35400">maintenant</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #d35400;" color="#d35400">temps</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">nullptr</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// lire l'heure actuelle</span>  <span style="color: #000000;" color="#000000">s_time</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #d35400;" color="#d35400">heure locale</span><span style="color: #000000;" color="#000000">(</span><span style="color: #434f54;" color="#434f54">&</span><span style="color: #d35400;" color="#d35400">maintenant</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// convertir en structure de temps pour l'heure locale</span>  <span style="color: #434f54;" color="#434f54">// Remplit le tampon de ligne avec l'heure et la date</span>  <span style="color: #d35400;" color="#d35400">strftime</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">line_buffer</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">17</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #005c5f;" color="#005c5f">"%d.%m.%Y %H:%M"</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">s_time</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #434f54;" color="#434f54">// Sortie de l'heure sur l'interface série</span>  <span style="color: #434f54;" color="#434f54">//Serial.println(line_buffer);</span>  <span style="color: #434f54;" color="#434f54">// Afficher l'heure sur l'écran en ligne 1</span>  <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">setCursor</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">0</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">impression</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">line_buffer</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #434f54;" color="#434f54">// deuxième ligne de messages</span>  <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">setCursor</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">0</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">1</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #5e6d03;" color="#5e6d03">commutateur</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #d35400;" color="#d35400">étape</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>    <span style="color: #5e6d03;" color="#5e6d03">Cas</span> <span style="color: #000000;" color="#000000">ST_CLEAR</span><span style="color: #434f54;" color="#434f54">:</span> <span style="color: #d35400;" color="#d35400">étape</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">ST_START</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">//L'étape suivante</span>        <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">ACTUALITÉS</span> <span style="color: #434f54;" color="#434f54">>=</span> <span style="color: #000000;" color="#000000">newsCnt</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>          <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">impression</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">"Mise à jour.."</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>          <span style="color: #000000;" color="#000000">obtenir des nouvelles</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// obtenir de nouveaux messages</span>          <span style="color: #000000;" color="#000000">ACTUALITÉS</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #000000;" color="#000000">}</span> <span style="color: #5e6d03;" color="#5e6d03">autre</span> <span style="color: #000000;" color="#000000">{</span>          <span style="color: #000000;" color="#000000">ACTUALITÉS</span><span style="color: #434f54;" color="#434f54">++</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// commence le message suivant</span>          <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">impression</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">"                "</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>          <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">ACTUALITÉS</span> <span style="color: #434f54;" color="#434f54">>=</span> <span style="color: #000000;" color="#000000">newsCnt</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #d35400;" color="#d35400">étape</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">ST_END</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #000000;" color="#000000">}</span>        <span style="color: #000000;" color="#000000">msg</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">extraChar</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">nouvelles</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">ACTUALITÉS</span><span style="color: #000000;" color="#000000">]</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #000000;" color="#000000">msglen</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">msg</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">longueur</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #5e6d03;" color="#5e6d03">Cas</span> <span style="color: #000000;" color="#000000">ST_START</span><span style="color: #434f54;" color="#434f54">:</span><span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">impression</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">msg</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">sous-chaîne</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">0</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">16</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #000000;" color="#000000">pos</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// prendre la position de départ</span>        <span style="color: #d35400;" color="#d35400">étape</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">ST_MOVE</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #5e6d03;" color="#5e6d03">Cas</span> <span style="color: #000000;" color="#000000">ST_MOVE</span><span style="color: #434f54;" color="#434f54">:</span> <span style="color: #000000;" color="#000000">pos</span><span style="color: #434f54;" color="#434f54">++</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">impression</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">msg</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">sous-chaîne</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">pos</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">pos</span><span style="color: #434f54;" color="#434f54">+</span><span style="color: #000000;" color="#000000">16</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #434f54;" color="#434f54">// lorsque le message est prêt, message suivant</span>        <span style="color: #5e6d03;" color="#5e6d03">si</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">pos</span> <span style="color: #434f54;" color="#434f54">></span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">msglen</span><span style="color: #434f54;" color="#434f54">-</span><span style="color: #000000;" color="#000000">17</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #d35400;" color="#d35400">étape</span><span style="color: #434f54;" color="#434f54">=</span><span style="color: #000000;" color="#000000">ST_END</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #5e6d03;" color="#5e6d03">Cas</span> <span style="color: #000000;" color="#000000">ST_END</span><span style="color: #434f54;" color="#434f54">:</span> <span style="color: #d35400;" color="#d35400">étape</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">ST_CLEAR</span><span style="color: #000000;" color="#000000">;</span>        <span style="color: #5e6d03;" color="#5e6d03">Pause</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #000000;" color="#000000">}</span> <span style="color: #000000;" color="#000000">}</span> <span style="color: #434f54;" color="#434f54">// fonction de configuration</span> <span style="color: #00979c;" color="#00979c">néant</span> <span style="color: #5e6d03;" color="#5e6d03">installer</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>  <b><span style="color: #d35400;" color="#d35400">En série</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">commencer</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">115200</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #434f54;" color="#434f54">// Initialise l'interface série</span>  <span style="color: #434f54;" color="#434f54">// initialise l'interpréteur XML</span>  <span style="color: #000000;" color="#000000">xml</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">init</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">(</span><span style="color: #00979c;" color="#00979c">uint8_t</span> <span style="color: #434f54;" color="#434f54">*</span><span style="color: #000000;" color="#000000">)</span><span style="color: #d35400;" color="#d35400">tampon</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #00979c;" color="#00979c">taille de</span><span style="color: #000000;" color="#000000">(</span><span style="color: #d35400;" color="#d35400">tampon</span><span style="color: #000000;" color="#000000">)</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #434f54;" color="#434f54">&</span><span style="color: #000000;" color="#000000">XML_callback</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #434f54;" color="#434f54">// Initialise l'affichage et allume l'éclairage</span>  <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">init</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">; // avec les anciennes versions de la bibliothèque, l'appel lcd.begin (); être appelé</span>  <br><span style="color: #000000;" color="#000000"> lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">rétroéclairage</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #434f54;" color="#434f54">// Générer des trémas allemands</span>  <span style="color: #5e6d03;" color="#5e6d03">pour</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #00979c;" color="#00979c">uint8_t</span> <span style="color: #000000;" color="#000000">je</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #000000;" color="#000000">je</span><span style="color: #434f54;" color="#434f54"><</span><span style="color: #000000;" color="#000000">8</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #000000;" color="#000000">je</span><span style="color: #434f54;" color="#434f54">++</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">createChar</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">je</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #000000;" color="#000000">Police de caractère</span><span style="color: #000000;" color="#000000">[</span><span style="color: #000000;" color="#000000">je</span><span style="color: #000000;" color="#000000">]</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #434f54;" color="#434f54">Supprimer l’écran et afficher le message de démarrage</span>  <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">clear</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">setCursor</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">0</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">print</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">« AZ-Delivery »</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">setCursor</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">0</span><span style="color: #434f54;" color="#434f54">,</span><span style="color: #000000;" color="#000000">1</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #000000;" color="#000000">lcd</span><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">print</span><span style="color: #000000;" color="#000000">(</span><span style="color: #005c5f;" color="#005c5f">« Un moment.... »</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #434f54;" color="#434f54">Configurer l’horloge interne</span>  <span style="color: #000000;" color="#000000">configTime</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">MYTZ</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #005c5f;" color="#005c5f">« pool.ntp.org »</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #434f54;" color="#434f54">Initialiser le Wi-Fi et se connecter au Wi-Fi</span>  <b><span style="color: #d35400;" color="#d35400">WiFi</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">persistante</span><span style="color: #000000;" color="#000000">(</span><span style="color: #00979c;" color="#00979c">false</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <b><span style="color: #d35400;" color="#d35400">WiFi</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">mode</span><span style="color: #000000;" color="#000000">(</span><span style="color: #00979c;" color="#00979c">WIFI_STA</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <b><span style="color: #d35400;" color="#d35400">WiFi</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">begin</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">STASSID</span><span style="color: #434f54;" color="#434f54">,</span> <span style="color: #000000;" color="#000000">STAPSK</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #00979c;" color="#00979c">uint8_t</span> <span style="color: #000000;" color="#000000">cnt</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #434f54;" color="#434f54">attendre que la connexion soit établie</span>  <span style="color: #5e6d03;" color="#5e6d03">while</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">(</span><b><span style="color: #d35400;" color="#d35400">WiFi</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">statut</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #434f54;" color="#434f54">!=</span> <span style="color: #000000;" color="#000000">WL_CONNECTED</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #434f54;" color="#434f54">&&</span> <span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">cnt</span><span style="color: #434f54;" color="#434f54"><</span><span style="color: #000000;" color="#000000">10</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>    <b><span style="color: #d35400;" color="#d35400">Serial</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">println</span><span style="color: #000000;" color="#000000">(</span><b><span style="color: #d35400;" color="#d35400">WiFi</span></b><span style="color: #434f54;" color="#434f54">.</span><span style="color: #d35400;" color="#d35400">statut</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #000000;" color="#000000">cnt</span><span style="color: #434f54;" color="#434f54">++</span><span style="color: #000000;" color="#000000">;</span>    <span style="color: #d35400;" color="#d35400">delay</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">500</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #000000;" color="#000000">}</span>  <span style="color: #000000;" color="#000000">newsCnt</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">0</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #d35400;" color="#d35400">step</span> <span style="color: #434f54;" color="#434f54">=</span> <span style="color: #000000;" color="#000000">ST_CLEAR</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #000000;" color="#000000">}</span> <span style="color: #434f54;" color="#434f54">Boucle principale</span> <span style="color: #00979c;" color="#00979c">void</span> <span style="color: #5e6d03;" color="#5e6d03">loop</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span> <span style="color: #000000;" color="#000000">{</span>  <span style="color: #434f54;" color="#434f54">Afficher l’heure</span>  <span style="color: #d35400;" color="#d35400">updateDisplay</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span>  <span style="color: #434f54;" color="#434f54">Retard pour la mise à l’état</span>  <span style="color: #d35400;" color="#d35400">delay</span><span style="color: #000000;" color="#000000">(</span><span style="color: #000000;" color="#000000">500</span><span style="color: #000000;" color="#000000">)</span><span style="color: #000000;" color="#000000">;</span> <span style="color: #000000;" color="#000000">}</span> </pre> <p> <a href="https://drive.google.com/file/d/1yBUrBvsCJ9nFtXCgpq9HA8tHBuQ68Fmk/view?usp=sharing" target="_blank" rel="noopener noreferrer"><strong>Download Sketch</strong></a></p> Presque tout ce dont nous avons besoin est inclus dans le paquet ESP8266. Seules les bibliothèques pour l’affichage LCD et pour l’analyse des données XML sont manquantes. Ils peuvent être installés dans l’IDE Arduino via la gestion de la bibliothèque. <p>Nous insérons « I2C LCD » comme terme de recherche et trouvons, un peu plus bas dans la liste, la bibliothèque souhaitée.</p> <table width="100%"> <tbody> <tr> <td><img src="https://cdn.shopify.com/s/files/1/1509/1638/files/bibliothek_480x480_3445d739-d3ee-4647-9a79-59da3571300c_480x480_1_600x600.jpg?v=1607677600" alt="" style="display: block; margin-left: auto; margin-right: auto;"></td> </tr> </tbody> </table> <p><br>Ensuite, nous insérons « Tiny XML » comme terme de recherche et obtenons la bibliothèque souhaitée.</p> <table width="100%"> <tbody> <tr> <td><img src="https://cdn.shopify.com/s/files/1/1509/1638/files/TinyXML_480x480_2_600x600.jpg?v=1607677696" alt="" style="display: block; margin-left: auto; margin-right: auto;"></td> </tr> </tbody> </table> <p><br>Avant de compiler le sketch, nous devons enregistrer les données d’accès au Wi-Fi à la place des astérisques.</p> <p>Vous pouvez également choisir un autre serveur de nouvelles, un autre flux sur ce serveur et/ou un autre nombre de messages. Ensuite, vous devez modifier les entrées #define correspondantes. Le nombre de messages ne doit pas être supérieur à 10.</p> <p>Ne vous étonnez pas si l’avertissement suivant est affiché lors de la compilation.</p> <p><span style="color: #bc3838;">AVERTISSEMENT : La bibliothèque LiquidCrystal_I2C prétend pouvoir être exécutée sur avr Architecture (s) et peut être incompatible avec votre carte actuelle, qui est exécutée sur l’architecture (s) d’esp8266.</span></p> <p>Cette mise en garde est due au fait qu’une erreur d’entrée a été faite dans les spécifications de la bibliothèque. La bibliothèque fonctionne parfaitement avec ESP8266 MCUs.</p> <p>Après que tous les messages du serveur de nouvelles ont été affichés, les messages sont à nouveau récupérés du serveur. L’heure est mise à jour en permanence. Entre l’heure d’été et l’heure d’hiver, vous passez automatiquement.</p> <p>Amusez-vous bien à la réplique.</p>

EtalagesEsp-8266Specials

6 commentaires

Hans-Jürgen Pollmer

Hans-Jürgen Pollmer

Hallo,
mit den Änderungen von Paul läuft der Sketch problemlos.
Ich würde aber gern das liquidcrystal_i2c-Display durch Matrixmodule max7219 ersetzen.
Wie ist der Sketch zu ändern, oder gibt es schon fertige Projekte damit?
Vielen Dank für evtl. Lösungen.

Paul

Paul

Vielen Dank für diese Idee. So, wie ihr sie vorgestellt habt, funktioniert sie leider nicht, da tagesschau.de Daten nur über einen https-Request ausgibt. Aber mit einem kleinen Umbau des Sketches läßt sich der Server überreden, doch Daten zu senden.

1. Erweiterung der Einbindung von Bibliotheken um die SlientSecure-Bibliothek:
#include

2. Die WLAN-Client Instanz ändern auf
WiFiClientSecure client;

3. in der boolean-Routine getNews() den Server-Port für die Client-Verbindung zum Server ändern von 80 auf 443

4. Im Setup vor dem Befehl WiFi.begin folgende Zeile hinzufügen:

client.setInsecure();

Mit diesem kleinen Umbau funktioniert der Sketch und damit auch der RSS-Reader problemlos und zeigt die Titel auf dem LC-Display an.

Der Befehl “client.setInsecure()” ermöglicht das Abfragen von Daten vom HTTPS-Server, ohne den FIngerprint senden zu müssen, der sonst vorhanden sein müsste, sich aber in einem bestimmten Interval immer wieder ändert.

Harry

Harry

Der Tagesschau Feed kann nicht mehr geladen werden da die Server nur noch verschlüsselte Verbindungen beantworten.
Also entweder das Programm reparieren oder auf einen unverschlüsselten Feed ausweichen. z.B.
#define RSS_SERVER “newsfeed.zeit.de” //Nachrichtenserver
#define RSS_FEED “index” //Name des Feeds

Wominator

Wominator

Sehr geehrter Herr Lechner,
ich habe dieses Projekt nachgebaut, mit einem LCD 20×4 und einem D1Mini. Display, WiFi usw. funktioniert, aber der RSS-Feed wird nicht abgerufen. Auf dem Display erscheint das aktuelle Datum, die Uhrzeit und “Aktualisierung..” Dann passiert nichts mehr.
Im Seriellen Monitor wird angezeigt:
01:13:08.880 → Mit Server verbinden
01:13:08.880 → OK
01:13:08.880 → Requesting data…
01:13:11.088 → Mit Server verbinden
01:13:11.088 → OK
01:13:11.088 → Requesting data…
01:13:13.296 → Mit Server verbinden
01:13:13.343 → OK
01:13:13.343 → Requesting data…
01:13:15.535 → Mit Server verbinden
01:13:15.582 → OK
01:13:15.582 → Requesting data…
01:13:17.758 → Mit Server verbinden
01:13:17.812 → OK
Egal, ob ich den RSS-Feed von der tagesschau oder von Heise eingebe, immer das selbe Ergebnis. Haben Sie eine Idee, warum der Feed nicht geladen und angezeigt wird?
Danke im Voraus!
Womi

Bernd-Steffen Großmann

Bernd-Steffen Großmann

Hi Anthony, I have this problem (the first two letters are not readable) too, but only with iOS (Safari). It works properly with Chrome, Firefox, and other browsers on Windows or Android. Sincerely Bernd-Steffen

Anthony Goodhew

Anthony Goodhew

Formatting of this blog not working properly.

Laisser un commentaire

Tous les commentaires sont modérés avant d'être publiés

Messages de blogs recommandés

  1. Installez maintenant ESP32 via l'administrateur de la carte
  2. Lüftersteuerung Raspberry Pi
  3. Arduino IDE - Programmieren für Einsteiger - Teil 1
  4. ESP32 - das Multitalent
  5. OTA-Over the Air-ESP Programmation par WiFi

Produits recommandés