{"id":968,"date":"2018-12-28T11:10:09","date_gmt":"2018-12-28T10:10:09","guid":{"rendered":"http:\/\/www.boichat.ch\/wpjrsp\/?p=968"},"modified":"2019-02-12T08:47:52","modified_gmt":"2019-02-12T07:47:52","slug":"controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu","status":"publish","type":"post","link":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/","title":{"rendered":"Contr\u00f4le de temp\u00e9rature avec un Raspberry Pi par un LM35 d\u00e9pos\u00e9 sur un NODEMCU esp8266"},"content":{"rendered":"<p><span style=\"background-color: #ccffff;\"><strong>Le titre suffit &#8230; presque!\u00a0<\/strong><\/span><\/p>\n<p><span style=\"background-color: #ffcc99;\">Nous allons tout d&rsquo;abord d\u00e9crire la pr\u00e9paration sur le NODEMCU et commencerons \u00e9videmment par le sch\u00e9ma Fritzing! Dans la r\u00e9alit\u00e9, j&rsquo;ai commenc\u00e9 par v\u00e9rifier l\u2019environnement IDE de l&rsquo;Arduino avant de d\u00e9poser un LM37 sur une planche \u00e0 pain. Le LM37 avait d\u00e9j\u00e0 \u00e9t\u00e9 utilis\u00e9 dans les articles Partie 1\/2 et Partie 2\/2 d&rsquo;un communication USB entre un Arduino et le Raspberry Pi. Ici nous ferons la m\u00eame d\u00e9marche pour la pr\u00e9paration des sketches, avec le c\u00e2ble USB sur un PC, avant d&rsquo;utiliser l&rsquo;interface Wifi avec un petit, vraiment petit serveur Web sur le NODEMCU et une application Java sur le Raspberry Pi.<\/span><\/p>\n<h3>Sch\u00e9ma Fritzing<\/h3>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-974\" src=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/LM35_NODEMCU_bb-283x300.png\" alt=\"\" width=\"415\" height=\"440\" srcset=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/LM35_NODEMCU_bb-283x300.png 283w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/LM35_NODEMCU_bb.png 594w\" sizes=\"(max-width: 415px) 100vw, 415px\" \/><\/p>\n<p>Le fil jaune est attach\u00e9 \u00e0 la broche analogique <strong>A0<\/strong> du NODEMCU. Le LM35 ici, qui correspond au mien, est arrondi derri\u00e8re. Si on le regarde de face, le fil rouge positif positif est \u00e0 gauche et la terre, le fil noir, est \u00e0 droite.<\/p>\n<h3>Une premier sketch<\/h3>\n<p>L&rsquo;id\u00e9e est de d\u00e9velopper un premier sketch pour v\u00e9rifier le LM35.<\/p>\n<p>Il faudra commencer par configurer l&rsquo;<a href=\"https:\/\/www.arduino.cc\/en\/main\/software\" target=\"_blank\" rel=\"noopener\">IDE de l&rsquo;Arduino<\/a> qui doit \u00eatre utilis\u00e9 pour t\u00e9l\u00e9charger ce sketch. Le premi\u00e8re chose est de d\u00e9finir l&rsquo;URL de r\u00e9f\u00e9rence pour t\u00e9l\u00e9charger le gestionnaire des cartes suppl\u00e9mentaire.<br \/><strong>https:\/\/github.com\/esp8266\/Arduino\/releases\/download\/2.3.0\/package_esp8266com_index.json<\/strong> doit \u00eatre introduit correctement sous <strong>Pr\u00e9f\u00e9rences<\/strong> (menu <strong>Fichier<\/strong> \/ <strong>Pr\u00e9f\u00e9rences<\/strong>).<\/p>\n<p>Ensuite il sera possible sous Outils, Type de cartes et Gestionnaire de carte, de sp\u00e9cifier le paquet \u00e0 installer:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-989\" src=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE2-300x98.png\" alt=\"\" width=\"300\" height=\"98\" srcset=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE2-300x98.png 300w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE2.png 698w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Nous pourrons alors s\u00e9lectionner la bonne carte.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-978\" src=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE1-300x154.png\" alt=\"\" width=\"547\" height=\"281\" srcset=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE1-300x154.png 300w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE1-768x393.png 768w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE1-1024x524.png 1024w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE1.png 1131w\" sizes=\"(max-width: 547px) 100vw, 547px\" \/><\/p>\n<p>Si nous avons un autre type d&rsquo;ESP8266, il faudra installer le bon.<\/p>\n<p>Voici \u00e0 pr\u00e9sent ce premier sketch suivi de sa description:<\/p>\n<pre><span style=\"background-color: #ccffcc;\">\/\/Pin A0 pour let capteur LM35<\/span>\n<span style=\"background-color: #ccffcc;\">int outputpin = A0;<\/span>\n<span style=\"background-color: #ccffcc;\">float calibre = .9;<\/span>\n\n<span style=\"background-color: #ccffcc;\">int nbmes = 4; \/\/Nb de mesures<\/span>\n<span style=\"background-color: #ccffcc;\">int myTemps[4];<\/span>\n<span style=\"background-color: #ccffcc;\">int myTempsSort[4];<\/span>\n\n<span style=\"background-color: #ccffcc;\">void setup() {<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.println(\"Sketch started\");<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.begin(9600);<\/span>\n<span style=\"background-color: #ccffcc;\">  delay(2000);<\/span>\n\n<span style=\"background-color: #ccffcc;\">  for (int i=0; i &lt; nbmes; i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">    int analogValue = analogRead(outputpin);\n<\/span><span style=\"background-color: #ccffcc;\">    float millivolts = (analogValue\/1024.0) * 3300 * calibre;<\/span>\n<span style=\"background-color: #ccffcc;\">    myTemps[i] = millivolts;<\/span>\n\n<span style=\"background-color: #ccffcc;\">    delay(1000);<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n<span style=\"background-color: #ccffcc;\">  show(myTemps, nbmes);<\/span>\n<span style=\"background-color: #ccffcc;\">  sort(myTemps, nbmes);<\/span>\n<span style=\"background-color: #ccffcc;\">  show(myTemps, nbmes);<\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span>\n\n<span style=\"background-color: #ccffcc;\">void loop() { \/\/boucle principale et unique<\/span>\n<span style=\"background-color: #ccffcc;\">  for (int i = 0; i &lt; (nbmes-1); i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">    myTemps[i] = myTemps[i + 1];<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n\n<span style=\"background-color: #ccffcc;\">  int analogValue = analogRead(outputpin);<\/span>\n<span style=\"background-color: #ccffcc;\">  float millivolts = (analogValue\/1024.0) * 3300 * calibre;<\/span>\n<span style=\"background-color: #ccffcc;\">  myTemps[nbmes - 1] = millivolts;<\/span>\n\n<span style=\"background-color: #ccffcc;\">  show(myTemps, nbmes);<\/span>\n\n<span style=\"background-color: #ccffcc;\">  for (int i = 0; i &lt; nbmes; i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">    myTempsSort[i] = myTemps[i + 1];<\/span>\n<span style=\"background-color: #ccffcc;\">  } <\/span>\n<span style=\"background-color: #ccffcc;\">  sort(myTempsSort, nbmes);<\/span>\n<span style=\"background-color: #ccffcc;\">  show(myTempsSort, nbmes);<\/span>\n\n<span style=\"background-color: #ccffcc;\">  float average = avg(myTempsSort, nbmes)\/10;<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.print(\"T Celsius: \");<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.println(average);<\/span>\n<span style=\"background-color: #ccffcc;\">  delay(3000);<\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span>\n\n<span style=\"background-color: #ccffcc;\">void sort(int v[], int size) {<\/span>\n<span style=\"background-color: #ccffcc;\">  for (int i=0; i &lt; (size-1); i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">    for (int j = 0; j &lt; (size-(i+1)); j++) {<\/span>\n<span style=\"background-color: #ccffcc;\">      if (v[j] &gt; v[j+1]) {<\/span>\n<span style=\"background-color: #ccffcc;\">        int t = v[j];<\/span>\n<span style=\"background-color: #ccffcc;\">        v[j] = v[j+1];<\/span>\n<span style=\"background-color: #ccffcc;\">        v[j+1] = t;<\/span>\n<span style=\"background-color: #ccffcc;\">      }<\/span>\n<span style=\"background-color: #ccffcc;\">    }<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span>\n\n<span style=\"background-color: #ccffcc;\">float avg(int v[], int size) {<\/span>\n<span style=\"background-color: #ccffcc;\">  int nbval = 0;<\/span>\n<span style=\"background-color: #ccffcc;\">  int calc = 0;<\/span>\n<span style=\"background-color: #ccffcc;\">  for (int i=1; i &lt; (size-1); i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">    calc += v[i];<\/span>\n<span style=\"background-color: #ccffcc;\">    nbval += 1;<\/span>\n<span style=\"background-color: #ccffcc;\">  } <\/span>\n<span style=\"background-color: #ccffcc;\">  return calc \/ nbval;<\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span>\n\n<span style=\"background-color: #ccffcc;\">void show(int v[], int size) {<\/span>\n<span style=\"background-color: #ccffcc;\">  for (int i=0; i &lt; size; i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">    Serial.print(myTemps[i]);<\/span>\n<span style=\"background-color: #ccffcc;\">    Serial.print(\" \");<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n<span style=\"background-color: #ccffcc;\"> Serial.println(\"\");<\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span>\n<\/pre>\n<p><a href=\"http:\/\/www.boichat.ch\/codesource\/lm35modemcu.ino\" target=\"_blank\" rel=\"noopener\">Le fichier lm35modemcu.ino est t\u00e9l\u00e9chargeable ici<\/a>. Il doit \u00eatre install\u00e9 dans un sous-r\u00e9pertoire <strong>lm35modemcu<\/strong>\u00a0que nous pourrons alors charger dans l&rsquo;IDE de l&rsquo;Arduino.<\/p>\n<p>Le <strong>A0<\/strong> est clair, c&rsquo;est celui indiqu\u00e9 dans le sch\u00e9ma Fritzing. Le <strong>calibre<\/strong> est particulier \u00e0 cause de la tension de 3.3V qui pourrait varier. Il faudrait donc faire une calibration avec un thermom\u00e8tre pr\u00e9cis. Le <strong>9600<\/strong> devra correspondre \u00e0 la vitesse d\u00e9finie dans la fen\u00eatre du moniteur s\u00e9rie de l&rsquo;IDE lors de l&rsquo;ex\u00e9cution pour voir les textes des <strong>print<\/strong> s&rsquo;afficher correctement.<\/p>\n<p>Au d\u00e9part nous lisons 4 fois la temp\u00e9rature pour remplir notre tableau\u00a0<strong>myTemps[]<\/strong>. Dans tout le sketch nous utilisons des entiers pour simplifier les calculs en <strong>float<\/strong>. Ce n&rsquo;est que lors du calcul de moyenne, que nous passons en <strong>float<\/strong>. Tous les <strong>myTemps[]\u00a0<\/strong>sont des dixi\u00e8mes de degr\u00e9s, 243 pour 24.3 degr\u00e9s.\u00a0 Le\u00a0<strong><span style=\"background-color: #ccffcc;\">myTempsSort[]<\/span><\/strong> est essentiel: nous trions les 4 derni\u00e8re valeur en gardant les anciennes dans le tableau <strong>myTemps[] :\u00a0<\/strong>les valeurs de gauche restant les anciennes.<\/p>\n<p>L&rsquo;id\u00e9e sera dans la boucle <strong>loop<\/strong>, de ne lire qu&rsquo;une seule valeur et de la d\u00e9poser, apr\u00e8s d\u00e9calage, dans la derni\u00e8re position. Apr\u00e8s un <strong>sort()<\/strong> qui va nous trier les valeurs,\u00a0 nous retirerons les deux extr\u00eames et faire la moyenne du reste avec <strong>avg()<\/strong>. C&rsquo;est un bon compromis!<\/p>\n<p>Les <strong>show()<\/strong>\u00a0pour v\u00e9rifier notre code et les\u00a0<strong>print()<\/strong> seront \u00e9videmment retir\u00e9s dans la version finale Web.<\/p>\n<p>Le moniteur s\u00e9rie de l&rsquo;IDE pourrait appara\u00eetre ainsi:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-1010\" src=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE3-300x154.png\" alt=\"\" width=\"454\" height=\"233\" srcset=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE3-300x154.png 300w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE3-768x395.png 768w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/IDE3.png 907w\" sizes=\"(max-width: 454px) 100vw, 454px\" \/><\/p>\n<p>En appuyant avec deux doigts le <strong>LM35<\/strong> nous pouvons faire varier rapidement la temp\u00e9rature et v\u00e9rifier ce qui vient dans les deux listes avant et apr\u00e8s le tri.<\/p>\n<p>Le code de ce premier sketch sera utilis\u00e9 pour le suivant.<\/p>\n<h3>Le second sketch Web<\/h3>\n<p>C&rsquo;est la version de notre sketch pr\u00e9c\u00e9dent pour recevoir la temp\u00e9rature par le Web avec notre NODEMCU connect\u00e9 en WiFi:<\/p>\n<p>Voici \u00e0 pr\u00e9sent ce premier sketch suivi de sa description:<span style=\"background-color: #ccffcc;\"><br \/><\/span><\/p>\n<pre><span style=\"background-color: #ccffcc;\">#include &lt;ESP8266WiFi.h&gt;<\/span>\n<span style=\"background-color: #ccffcc;\">#include &lt;WiFiClient.h&gt;<\/span>\n<span style=\"background-color: #ccffcc;\">#include &lt;ESP8266WebServer.h&gt;<\/span>\n<span style=\"background-color: #ccffcc;\">#include &lt;ESP8266mDNS.h&gt;<\/span>\n\n<span style=\"background-color: #ccffcc;\">const char* ssid = \".....\";<\/span>\n<span style=\"background-color: #ccffcc;\">const char* password = \".....\";<\/span>\n\n<span style=\"background-color: #ccffcc;\">\/\/Pin A0 pour let capteur LM35<\/span>\n<span style=\"background-color: #ccffcc;\">int outputpin = A0;<\/span>\n<span style=\"background-color: #ccffcc;\">float calibre = 0.9;<\/span>\n\n<span style=\"background-color: #ccffcc;\">int loopVal = 0;<\/span>\n<span style=\"background-color: #ccffcc;\">int nbmes = 4; \/\/Nb de mesures<\/span>\n<span style=\"background-color: #ccffcc;\">int myTemps[4];<\/span>\n<span style=\"background-color: #ccffcc;\">float myTemp = 0.0;<\/span>\n\n<span style=\"background-color: #ccffcc;\">ESP8266WebServer server(80);<\/span>\n\n<span style=\"background-color: #ccffcc;\">void handleRoot() {<\/span>\n<span style=\"background-color: #ccffcc;\">  String temps = String(loopVal) + \": \";<\/span>\n<span style=\"background-color: #ccffcc;\">  for (int i=0; i &lt; nbmes; i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">    temps += String(myTemps[i]) + \" \";<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n<span style=\"background-color: #ccffcc;\">  server.send(200, \"text\/plain\", temps);<\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span>\n\n<span style=\"background-color: #ccffcc;\">void handleNotFound(){<\/span>\n<span style=\"background-color: #ccffcc;\">  String message = \"File Not Found\\n\\n\";<\/span>\n<span style=\"background-color: #ccffcc;\">  message += \"URI: \";<\/span>\n<span style=\"background-color: #ccffcc;\">  message += server.uri();<\/span>\n<span style=\"background-color: #ccffcc;\">  message += \"\\nMethod: \";<\/span>\n<span style=\"background-color: #ccffcc;\">  message += (server.method() == HTTP_GET)?\"GET\":\"POST\";<\/span>\n<span style=\"background-color: #ccffcc;\">  message += \"\\nArguments: \";<\/span>\n<span style=\"background-color: #ccffcc;\">  message += server.args();<\/span>\n<span style=\"background-color: #ccffcc;\">  message += \"\\n\";<\/span>\n<span style=\"background-color: #ccffcc;\">  for (uint8_t i=0; i&lt;server.args(); i++){<\/span>\n<span style=\"background-color: #ccffcc;\">    message += \" \" + server.argName(i) + \": \" + server.arg(i) + \"\\n\";<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n<span style=\"background-color: #ccffcc;\">  server.send(404, \"text\/plain\", message);<\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span>\n\n<span style=\"background-color: #ccffcc;\">void setup(void){<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.begin(115200);<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.println(\"Setup started\");<\/span>\n\n<span style=\"background-color: #ccffcc;\">  WiFi.begin(ssid, password);<\/span>\n\n<span style=\"background-color: #ccffcc;\">  \/\/Config static IP<\/span>\n<span style=\"background-color: #ccffcc;\">  IPAddress ip(192, 168, 1, 70);<\/span>\n<span style=\"background-color: #ccffcc;\">  IPAddress gateway(192, 168, 1, 1);<\/span>\n<span style=\"background-color: #ccffcc;\">  IPAddress subnet(255, 255, 255, 0); <\/span>\n<span style=\"background-color: #ccffcc;\">  WiFi.config(ip, gateway, subnet);<\/span>\n\n<span style=\"background-color: #ccffcc;\">  Serial.println(\"\");<\/span>\n\n<span style=\"background-color: #ccffcc;\">  \/\/ Wait for connection<\/span>\n<span style=\"background-color: #ccffcc;\">  while (WiFi.status() != WL_CONNECTED) {<\/span>\n<span style=\"background-color: #ccffcc;\">    delay(500);<\/span>\n<span style=\"background-color: #ccffcc;\">    Serial.print(\".\");<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.println(\"\");<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.print(\"Connected to \");<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.println(ssid);<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.print(\"IP address: \");<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.println(WiFi.localIP());<\/span>\n\n<span style=\"background-color: #ccffcc;\">  if (MDNS.begin(\"esp8266\")) {<\/span>\n<span style=\"background-color: #ccffcc;\">    Serial.println(\"MDNS responder started\");<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n\n<span style=\"background-color: #ccffcc;\">  server.on(\"\/\", handleRoot);<\/span>\n\n<span style=\"background-color: #ccffcc;\">  server.on(\"\/temperature\", []() {<\/span>\n<span style=\"background-color: #ccffcc;\">    server.send(200, \"text\/plain\", String(myTemp));<\/span>\n<span style=\"background-color: #ccffcc;\">  });<\/span>\n\n<span style=\"background-color: #ccffcc;\">  server.onNotFound(handleNotFound);<\/span>\n\n<span style=\"background-color: #ccffcc;\">  server.begin();<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.println(\"HTTP server started\");<\/span>\n\n<span style=\"background-color: #ccffcc;\">  delay(2000);<\/span>\n\n<span style=\"background-color: #ccffcc;\">  for (int i=0; i &lt; nbmes; i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">    int analogValue = analogRead(outputpin);<\/span>\n<span style=\"background-color: #ccffcc;\">    float millivolts = (analogValue\/1024.0) * 3300 * calibre;<\/span>\n<span style=\"background-color: #ccffcc;\">    myTemps[i] = millivolts;<\/span>\n\n<span style=\"background-color: #ccffcc;\">    delay(1000);<\/span>\n<span style=\"background-color: #ccffcc;\">  } <\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span>\n\n<span style=\"background-color: #ccffcc;\">void sort(int v[], int size) {<\/span>\n<span style=\"background-color: #ccffcc;\">  for (int i=0; i &lt; (size-1); i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">    for (int j = 0; j &lt; (size-(i+1)); j++) {<\/span>\n<span style=\"background-color: #ccffcc;\">      if (v[j] &gt; v[j+1]) {<\/span>\n<span style=\"background-color: #ccffcc;\">        int t = v[j]; <\/span>\n<span style=\"background-color: #ccffcc;\">        v[j] = v[j+1];<\/span>\n<span style=\"background-color: #ccffcc;\">        v[j+1] = t;<\/span>\n<span style=\"background-color: #ccffcc;\">      }<\/span>\n<span style=\"background-color: #ccffcc;\">    }<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span>\n\n<span style=\"background-color: #ccffcc;\">float avg(int v[], int size) {<\/span>\n<span style=\"background-color: #ccffcc;\">  int nbval = 0;<\/span>\n<span style=\"background-color: #ccffcc;\">  float calc = 0.0;<\/span>\n<span style=\"background-color: #ccffcc;\">  for (int i=1; i &lt; (size-1); i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">    calc += v[i];<\/span>\n<span style=\"background-color: #ccffcc;\">    nbval += 1;<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n\n<span style=\"background-color: #ccffcc;\">  return calc \/ nbval;<\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span>\n\n<span style=\"background-color: #ccffcc;\">void show(int v[], int size) {<\/span>\n<span style=\"background-color: #ccffcc;\">  for (int i=0; i &lt; size; i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">    Serial.print(myTemps[i]);<\/span>\n<span style=\"background-color: #ccffcc;\">    Serial.print(\" \");<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n<span style=\"background-color: #ccffcc;\">  Serial.println(\"\");<\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span>\n\n<span style=\"background-color: #ccffcc;\">void loop(void){<\/span>\n<span style=\"background-color: #ccffcc;\">  server.handleClient();<\/span>\n<span style=\"background-color: #ccffcc;\">  delay(50);<\/span>\n\n<span style=\"background-color: #ccffcc;\">  loopVal++;<\/span>\n<span style=\"background-color: #ccffcc;\">  if (loopVal == 40) {<\/span>\n<span style=\"background-color: #ccffcc;\">    loopVal = 0;<\/span>\n\n<span style=\"background-color: #ccffcc;\">    for (int i = 0; i &lt; (nbmes-1); i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">      myTemps[i] = myTemps[i + 1];<\/span>\n<span style=\"background-color: #ccffcc;\">    }<\/span>\n\n<span style=\"background-color: #ccffcc;\">    int analogValue = analogRead(outputpin);<\/span>\n<span style=\"background-color: #ccffcc;\">    float millivolts = (analogValue\/1024.0) * 3300 * calibre;<\/span>\n<span style=\"background-color: #ccffcc;\">    myTemps[nbmes - 1] = millivolts;<\/span>\n\n<span style=\"background-color: #ccffcc;\">    show(myTemps, nbmes);<\/span>\n  \n<span style=\"background-color: #ccffcc;\">    int myTempsCopy[4];<\/span>\n<span style=\"background-color: #ccffcc;\">    for (int i = 0; i &lt; nbmes; i++) {<\/span>\n<span style=\"background-color: #ccffcc;\">      myTempsCopy[i] = myTemps[i + 1];<\/span>\n<span style=\"background-color: #ccffcc;\">    }<\/span>\n\n<span style=\"background-color: #ccffcc;\">    sort(myTempsCopy, nbmes);<\/span>\n<span style=\"background-color: #ccffcc;\">    show(myTempsCopy, nbmes);<\/span>\n<span style=\"background-color: #ccffcc;\">    myTemp = avg(myTempsCopy, nbmes)\/10;<\/span>\n<span style=\"background-color: #ccffcc;\">    Serial.println(myTemp);<\/span>\n<span style=\"background-color: #ccffcc;\">  }<\/span>\n<span style=\"background-color: #ccffcc;\">}<\/span><\/pre>\n<p><a href=\"http:\/\/www.boichat.ch\/codesource\/webmodemcu.ino\" target=\"_blank\" rel=\"noopener\">Le fichier webmodemcu.ino est t\u00e9l\u00e9chargeable ici<\/a>. Il doit \u00eatre install\u00e9 dans un sous-r\u00e9pertoire <strong>webmodemcu<\/strong> que nous pourrons alors charger dans l&rsquo;IDE de l&rsquo;Arduino.<\/p>\n<p>J&rsquo;avais d\u00e9j\u00e0 \u00e9crit un article, en janvier 2017,\u00a0<a href=\"http:\/\/www.boichat.ch\/joomla\/index.php?option=com_content&amp;view=article&amp;id=108:esp8266-projet&amp;catid=92&amp;Itemid=503\" target=\"_blank\" rel=\"noopener\">ESP8266 NodeMCU: Un projet plateforme<\/a>, qui pourrait aussi \u00eatre consult\u00e9.<\/p>\n<p>Les premiers <strong>include<\/strong> correspondent \u00e0 des biblioth\u00e8ques disponible dans l&rsquo;IDE apr\u00e8s l&rsquo;installation du gestionnaire de la carte ESP8266.<\/p>\n<p>Il faudra commencer par adapter le ssid\u00a0 et le password pour qu&rsquo;ils correspondent \u00e0 notre routeur WiFi. Les proc\u00e9dures pour attribuer une adresse IP fixe sont les m\u00eames que pour un Raspberry Pi et expliquer dans le livre. Ici nous avons choisi l&rsquo;adresse\u00a0<strong>192.168.1.70<\/strong>.<\/p>\n<p>Le code pour la mesure de la temp\u00e9rature est pratiquement un copier\/coller du sketch\u00a0<strong>lm35modemcu<\/strong>\u00a0pr\u00e9c\u00e9dent int\u00e9gr\u00e9 au code du serveur Web\u00a0 sur le port 80 (<span style=\"background-color: #ccffcc;\">ESP8266WebServer server(80);<\/span>) . C&rsquo;est tr\u00e8s similaire \u00e0 un serveur \u00e9crit en Java (chapitre 22 du livre).<\/p>\n<p>Il est clair que la premi\u00e8re v\u00e9rification se fera \u00e0 partir de l&rsquo;IDE et en utilisant les URL d\u00e9crits ci-dessous.<\/p>\n<p><span style=\"background-color: #ff99cc;\"><strong>Ensuite nous connecterons notre\u00a0NODEMCU esp8266 avec une alimentation traditionnelle USB et d\u00e9placerons notre \u00ab\u00a0bijou\u00a0\u00bb dans une pi\u00e8ce dont nous d\u00e9sirons conna\u00eetre la temp\u00e9rature!\u00a0<\/strong><\/span><\/p>\n<h5>V\u00e9rification depuis un navigateur Web<\/h5>\n<p>Nous avons programm\u00e9 deux gestionnaires, un pour la racine, <strong>handleRoot()<\/strong>, et un pour la temp\u00e9rature, <strong>server.on(\u00ab\u00a0\/temperature\u00a0\u00bb, []()<\/strong>:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-1017\" src=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/firefox1-300x110.png\" alt=\"\" width=\"390\" height=\"143\" srcset=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/firefox1-300x110.png 300w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/firefox1-768x280.png 768w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/firefox1.png 797w\" sizes=\"(max-width: 390px) 100vw, 390px\" \/><\/p>\n<p>Le gestionnaire de la racine (<strong>http:\/\/192.168.1.70<\/strong>) va nous v\u00e9rifier que la boucle fonctionne (variable\u00a0<strong>loopVal<\/strong>, ici <strong>11<\/strong>) et nous montrer les 4 derni\u00e8res valeurs retourn\u00e9es au dixi\u00e8me de degr\u00e9s et \u00e0 un intervalle de 2 secondes.<\/p>\n<p>Le gestionnaire <strong>temperature<\/strong>\u00a0(<strong>http:\/\/192.168.1.70\/temperature<\/strong>) nous retournera la valeur moyenne, ici 22.6 degr\u00e9s:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-1018\" src=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/firefox2-300x109.png\" alt=\"\" width=\"394\" height=\"143\" srcset=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/firefox2-300x109.png 300w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/firefox2-768x280.png 768w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/firefox2.png 796w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/p>\n<h3>R\u00e9ception de la temp\u00e9rature depuis une classe Java<\/h3>\n<p>Nous nous r\u00e9f\u00e9rerons \u00e0 la classe <strong>LectureUrl<\/strong> du chapitre 22 pour la pr\u00e9paration du projet. Voici un premier exemple de classe Java, <strong>ReadNodeMcuTemperature<\/strong> , qu&rsquo;il faudra \u00e9videmment adapter (pas mal de travail):<\/p>\n<pre><span style=\"background-color: #99ccff;\"><strong>import java.net.*;<\/strong><\/span>\n<span style=\"background-color: #99ccff;\"><strong>import java.io.*;<\/strong><\/span>\n\n<span style=\"background-color: #99ccff;\"><strong>public class ReadNodeMcuTemperature {<\/strong><\/span>\n<span style=\"background-color: #99ccff;\"><strong>  public static void main(String[] args) throws Exception {<\/strong><\/span>\n<span style=\"background-color: #99ccff;\"><strong>    URL notreUrl = new URL(\"http:\/\/192.168.1.70\/temperature\");<\/strong><\/span>\n<span style=\"background-color: #99ccff;\"><strong>    BufferedReader in = \n<\/strong><strong>        new BufferedReader(\n<\/strong><strong>            new InputStreamReader(notreUrl.openStream()));\n\n<\/strong><strong>    String inputLine = in.readLine(); \n    System.out.println(inputLine);\n    in.close();<\/strong><\/span>\n<span style=\"background-color: #99ccff;\"><strong>  }<\/strong><\/span>\n<span style=\"background-color: #99ccff;\"><strong>}<\/strong><\/span><\/pre>\n<p>Mais \u00e7a marche. La temp\u00e9rature sera retourn\u00e9e dans notre console d&rsquo;Eclipse, par exemple 22.35. Nous pourrons ensuite transf\u00e9rer le fichier\u00a0\u00a0<strong>ReadNodeMcuTemperature.class <\/strong>pour ex\u00e9cution sur le Raspberry Pi.<\/p>\n<p><strong>L&rsquo;article\u00a0<a href=\"https:\/\/www.boichat.ch\/wpjrsp\/2019\/01\/05\/communication-socket-esp8266-raspberry-pi-phython-java\/\" target=\"_blank\" rel=\"noopener\">Communication socket \u2013 ESP8266 \u2013 Raspberry Pi \u2013 Python \u2013 Java<\/a> pourrait aussi int\u00e9resser les lecteurs.<\/strong><\/p>\n<h3>Exercices<\/h3>\n<p>C&rsquo;est le m\u00eame principe que le livre: nous pr\u00e9sentons et d\u00e9veloppons un composant ou une application, et nous passons \u00e0 des extensions ou des am\u00e9liorations. La meilleure des mani\u00e8res d&rsquo;apprentissage et de se familiariser avec le logiciel.<\/p>\n<h5>Exercice 1<\/h5>\n<p>Modifions <strong>lm35modemcu.ino<\/strong> et\u00a0<strong>webmodemcu.ino<\/strong> pour int\u00e9grer dans la fonction <strong>avg()<\/strong>\u00a0\u00e0 la fois la fonction <strong>sort()<\/strong> et l&rsquo;utilisation d&rsquo;une copie identique \u00e0\u00a0<strong>myTempsSort[]<\/strong>.<\/p>\n<h5>Exercice 2<\/h5>\n<p>Ecrire une \u00ab\u00a0<strong>vraie\u00a0\u00bb\u00a0<\/strong>classe<strong> Java ReadNodeMcuTemperature\u00a0<\/strong>pour lire la temp\u00e9rature \u00e0 intervalle r\u00e9gulier, la stocker dans une base de donn\u00e9es <strong>SQLite<\/strong> (chapitre 23) avec la date et l&rsquo;heure et envoyer\u00a0 chaque jour un <strong>Email<\/strong> (chapitre 24) de statistique de temp\u00e9rature.<\/p>\n<h5>Exercice 3<\/h5>\n<p>En utilisant l&rsquo;article<a href=\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/24\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb-2\/\" target=\"_blank\" rel=\"noopener\">\u00a0Communiquer entre un Arduino et un Raspberry Pi via USB (Python, Java) (2\/2)<\/a>\u00a0imaginer des cas de figures pour faire varier certains param\u00e8tres sur le NODEMCU, par exemple le nombre de mesures, comme 6 au lieu de 4, ou les intervalles de mesures (comme 10 au lieu de 3 secondes). Il faudra donc envoyer du Raspberry Pi ces nouvelles valeurs \u00e0 r\u00e9ceptionner dans le(s) sketch(s) \u00e0 adapter.<\/p>\nDate de la derni\u00e8re modification: 12 f\u00e9vrier 2019\n","protected":false},"excerpt":{"rendered":"<p>Le titre suffit &#8230; presque!\u00a0 Nous allons tout d&rsquo;abord d\u00e9crire la pr\u00e9paration sur le NODEMCU et commencerons \u00e9videmment par le sch\u00e9ma Fritzing! Dans la r\u00e9alit\u00e9,&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Contr\u00f4le de temp\u00e9rature avec un Raspberry Pi par un LM35 d\u00e9pos\u00e9 sur un NODEMCU esp8266 - Un livre sur Java, Python, Eclipse et le Raspberry Pi 3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Contr\u00f4le de temp\u00e9rature avec un Raspberry Pi par un LM35 d\u00e9pos\u00e9 sur un NODEMCU esp8266 - Un livre sur Java, Python, Eclipse et le Raspberry Pi 3\" \/>\n<meta property=\"og:description\" content=\"Le titre suffit &#8230; presque!\u00a0 Nous allons tout d&rsquo;abord d\u00e9crire la pr\u00e9paration sur le NODEMCU et commencerons \u00e9videmment par le sch\u00e9ma Fritzing! Dans la r\u00e9alit\u00e9,&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/\" \/>\n<meta property=\"og:site_name\" content=\"Un livre sur Java, Python, Eclipse et le Raspberry Pi 3\" \/>\n<meta property=\"article:published_time\" content=\"2018-12-28T10:10:09+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-02-12T07:47:52+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/LM35_NODEMCU_bb-283x300.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jean-Bernard Boichat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/#website\",\"url\":\"https:\/\/www.boichat.ch\/wpjrsp\/\",\"name\":\"Un livre sur Java, Python, Eclipse et le Raspberry Pi 3\",\"description\":\"Jean-Bernard Boichat - Auteur chez Eyrolles\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.boichat.ch\/wpjrsp\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/#primaryimage\",\"inLanguage\":\"fr-FR\",\"url\":\"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/LM35_NODEMCU_bb-283x300.png\",\"contentUrl\":\"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/LM35_NODEMCU_bb-283x300.png\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/#webpage\",\"url\":\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/\",\"name\":\"Contr\\u00f4le de temp\\u00e9rature avec un Raspberry Pi par un LM35 d\\u00e9pos\\u00e9 sur un NODEMCU esp8266 - Un livre sur Java, Python, Eclipse et le Raspberry Pi 3\",\"isPartOf\":{\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/#primaryimage\"},\"datePublished\":\"2018-12-28T10:10:09+00:00\",\"dateModified\":\"2019-02-12T07:47:52+00:00\",\"author\":{\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/#\/schema\/person\/fe6328cc5b74b8a6e8d841285a928751\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.boichat.ch\/wpjrsp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Contr\\u00f4le de temp\\u00e9rature avec un Raspberry Pi par un LM35 d\\u00e9pos\\u00e9 sur un NODEMCU esp8266\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/#\/schema\/person\/fe6328cc5b74b8a6e8d841285a928751\",\"name\":\"Jean-Bernard Boichat\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/#personlogo\",\"inLanguage\":\"fr-FR\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/862886ce35a52b9d13595e18ac3c3ea5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/862886ce35a52b9d13595e18ac3c3ea5?s=96&d=mm&r=g\",\"caption\":\"Jean-Bernard Boichat\"},\"sameAs\":[\"http:\/\/www.boichat.ch\"],\"url\":\"https:\/\/www.boichat.ch\/wpjrsp\/author\/bjb\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Contr\u00f4le de temp\u00e9rature avec un Raspberry Pi par un LM35 d\u00e9pos\u00e9 sur un NODEMCU esp8266 - Un livre sur Java, Python, Eclipse et le Raspberry Pi 3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/","og_locale":"fr_FR","og_type":"article","og_title":"Contr\u00f4le de temp\u00e9rature avec un Raspberry Pi par un LM35 d\u00e9pos\u00e9 sur un NODEMCU esp8266 - Un livre sur Java, Python, Eclipse et le Raspberry Pi 3","og_description":"Le titre suffit &#8230; presque!\u00a0 Nous allons tout d&rsquo;abord d\u00e9crire la pr\u00e9paration sur le NODEMCU et commencerons \u00e9videmment par le sch\u00e9ma Fritzing! Dans la r\u00e9alit\u00e9,&hellip;","og_url":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/","og_site_name":"Un livre sur Java, Python, Eclipse et le Raspberry Pi 3","article_published_time":"2018-12-28T10:10:09+00:00","article_modified_time":"2019-02-12T07:47:52+00:00","og_image":[{"url":"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/LM35_NODEMCU_bb-283x300.png"}],"twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"Jean-Bernard Boichat","Dur\u00e9e de lecture estim\u00e9e":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.boichat.ch\/wpjrsp\/#website","url":"https:\/\/www.boichat.ch\/wpjrsp\/","name":"Un livre sur Java, Python, Eclipse et le Raspberry Pi 3","description":"Jean-Bernard Boichat - Auteur chez Eyrolles","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.boichat.ch\/wpjrsp\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"fr-FR"},{"@type":"ImageObject","@id":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/#primaryimage","inLanguage":"fr-FR","url":"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/LM35_NODEMCU_bb-283x300.png","contentUrl":"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/12\/LM35_NODEMCU_bb-283x300.png"},{"@type":"WebPage","@id":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/#webpage","url":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/","name":"Contr\u00f4le de temp\u00e9rature avec un Raspberry Pi par un LM35 d\u00e9pos\u00e9 sur un NODEMCU esp8266 - Un livre sur Java, Python, Eclipse et le Raspberry Pi 3","isPartOf":{"@id":"https:\/\/www.boichat.ch\/wpjrsp\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/#primaryimage"},"datePublished":"2018-12-28T10:10:09+00:00","dateModified":"2019-02-12T07:47:52+00:00","author":{"@id":"https:\/\/www.boichat.ch\/wpjrsp\/#\/schema\/person\/fe6328cc5b74b8a6e8d841285a928751"},"breadcrumb":{"@id":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/12\/28\/controle-de-temperature-sur-un-raspberry-pi-depuis-un-tm37-depose-sur-un-esp8266-nodemcu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.boichat.ch\/wpjrsp\/"},{"@type":"ListItem","position":2,"name":"Contr\u00f4le de temp\u00e9rature avec un Raspberry Pi par un LM35 d\u00e9pos\u00e9 sur un NODEMCU esp8266"}]},{"@type":"Person","@id":"https:\/\/www.boichat.ch\/wpjrsp\/#\/schema\/person\/fe6328cc5b74b8a6e8d841285a928751","name":"Jean-Bernard Boichat","image":{"@type":"ImageObject","@id":"https:\/\/www.boichat.ch\/wpjrsp\/#personlogo","inLanguage":"fr-FR","url":"https:\/\/secure.gravatar.com\/avatar\/862886ce35a52b9d13595e18ac3c3ea5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/862886ce35a52b9d13595e18ac3c3ea5?s=96&d=mm&r=g","caption":"Jean-Bernard Boichat"},"sameAs":["http:\/\/www.boichat.ch"],"url":"https:\/\/www.boichat.ch\/wpjrsp\/author\/bjb\/"}]}},"_links":{"self":[{"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/posts\/968"}],"collection":[{"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/comments?post=968"}],"version-history":[{"count":0,"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/posts\/968\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/media?parent=968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/categories?post=968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/tags?post=968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}