{"id":355,"date":"2018-11-16T11:18:57","date_gmt":"2018-11-16T10:18:57","guid":{"rendered":"http:\/\/www.boichat.ch\/wpjrsp\/?p=355"},"modified":"2019-05-11T12:01:49","modified_gmt":"2019-05-11T10:01:49","slug":"communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb","status":"publish","type":"post","link":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/","title":{"rendered":"Communiquer entre un Arduino et un Raspberry Pi via USB (Python, Java)  (1\/2)"},"content":{"rendered":"<p>Un article sur ce sujet a \u00e9t\u00e9 soumis \u00e0\u00a0<a href=\"https:\/\/www.developpez.com\/\" target=\"_blank\" rel=\"noopener\">developpez.com<\/a>\u00a0et est maintenant disponible sous le titre\u00a0<a href=\"https:\/\/boichat.developpez.com\/tutoriel\/communication-arduino-raspberry-pi\/\" target=\"_blank\" rel=\"noopener\">Cr\u00e9er une communication entre Arduino et Raspberry Pi 3 via USB<\/a>.<\/p>\n<p>Au chapitre 19, j&rsquo;ai expliqu\u00e9 avoir eu quelques difficult\u00e9s avec mon capteur ultrasonique et son script Python associ\u00e9. Un test sur un Arduino m&rsquo;a permis d&rsquo;adapter le timing du script Python.<\/p>\n<h3>Pr\u00e9paration sur l&rsquo;Arduino<\/h3>\n<p>J&rsquo;ai donc mont\u00e9 sur mon tout vieux Arduino Duemilanove un capteur ultrasonique et j&rsquo;y ai ajout\u00e9 un relais pour jouer avec ce croquis (ou sketch en anglais)\u00a0<a href=\"https:\/\/www.arduino.cc\/en\/main\/software\" target=\"_blank\" rel=\"noopener\">d\u00e9velopp\u00e9 avec\u00a0 l&rsquo;IDE d&rsquo;Arduino<\/a>:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-363\" src=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/11\/scriptarduino1-141x300.png\" alt=\"\" width=\"315\" height=\"670\" srcset=\"https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/11\/scriptarduino1-141x300.png 141w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/11\/scriptarduino1-768x1631.png 768w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/11\/scriptarduino1-482x1024.png 482w, https:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/11\/scriptarduino1.png 861w\" sizes=\"(max-width: 315px) 100vw, 315px\" \/><\/p>\n<p><a href=\"https:\/\/www.boichat.ch\/codesource\/relais_distance.zip\" target=\"_blank\" rel=\"noopener\">R\u00e9f\u00e9rence et t\u00e9l\u00e9chargement du script<\/a>\u00a0(d\u00e9-zipper d&rsquo;abord dans Notepad++)<\/p>\n<p>Ce sketch n&rsquo;est pas grandiose, mais plus ou moins fonctionnel. Il demanderait quelques adaptations. Suivant les objets qui se d\u00e9placent devant le capteur, le relais sera actif pour 4 secs.<\/p>\n<p>Le num\u00e9ro des broches est indiqu\u00e9 en d\u00e9but de sketch et la connexion du capteur ultrasonique est identique \u00e0 la figure 19-2 du livre. Pour le relais c&rsquo;est la figure 15-2. Les deux composants n&rsquo;utilise que du 5V et une planche \u00e0 pain est n\u00e9cessaire.<\/p>\n<p>Lorsque nous aurons termin\u00e9 de d\u00e9poser ce sketch dans l&rsquo;IDE de l&rsquo;Arduino sur notre PC et les tests dans la fen\u00eatre console de ce m\u00eame IDE, nous retirerons le c\u00e2ble c\u00f4t\u00e9 PC pour le brancher sur une des 4 entr\u00e9es USB du Raspberry Pi B ou celle, unique, du Raspberry Pi A+.<\/p>\n<h3>Pr\u00e9paration sur le Raspberry Pi<\/h3>\n<p>Nous ferons un premier test avec Python, comme d&rsquo;habitude, avant de passer \u00e9ventuellement \u00e0 Java. Il faudra commencer par installer la librairie Python pour l&rsquo;interface s\u00e9rie:<\/p>\n<p><strong><span style=\"font-size: 14pt; font-family: 'courier new', courier, monospace;\">sudo apt-get install python-serial<\/span><\/strong><\/p>\n<p>Un message nous indiquera si cette librairie est d\u00e9j\u00e0 install\u00e9e, mon cas.<\/p>\n<p>Ensuite il faudra d\u00e9terminer avec la commande <strong>ls<\/strong> quel<span style=\"font-family: 'courier new', courier, monospace; font-size: 14pt;\">\u00a0<strong>device (\/dev)<\/strong>\u00a0<\/span>est utilis\u00e9 (nous sommes d\u00e9j\u00e0 dans le r\u00e9pertoire <strong>python<\/strong> o\u00f9 nous avons d\u00e9pos\u00e9 nos autres scripts Python du livre):<br \/>\n<strong style=\"color: #282828; font-family: 'courier new', courier, monospace; font-size: 14pt;\">pi@raspberrypi:~\/python $ ls \/dev\/tty*<\/strong><\/p>\n<p><span style=\"font-family: 'courier new', courier, monospace; font-size: 14pt;\"><span style=\"color: #282828; font-family: helvetica; font-size: small;\"><span style=\"color: #282828;\">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/span><br \/>\n<\/span><span style=\"color: #282828;\">\/dev\/tty10 \/dev\/tty19 \/dev\/tty27 \/dev\/tty35 \/dev\/tty43 \/dev\/tty51 \/dev\/tty6 \/dev\/ttyprintk<br \/>\n<\/span><span style=\"color: #282828;\">\/dev\/tty11 \/dev\/tty2 \/dev\/tty28 \/dev\/tty36 \/dev\/tty44 \/dev\/tty52 \/dev\/tty60 <strong>\/dev\/ttyUSB0<\/strong><br \/>\n<\/span><span style=\"color: #282828;\">\/dev\/tty12 \/dev\/tty20 \/dev\/tty29 \/dev\/tty37 \/dev\/tty45 \/dev\/tty53 \/dev\/tty61<br \/>\n<\/span><span style=\"color: #282828;\">&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.<\/span><\/span><\/p>\n<p>Nous essayerons la commande Linux\u00a0<strong>cat<\/strong> sur ce device <span style=\"font-family: 'courier new', courier, monospace; font-size: 14pt;\"><span style=\"color: #282828;\"><strong>\/dev\/ttyUSB0<\/strong><\/span><\/span>\u00a0qui semble \u00eatre le bon:<\/p>\n<p><span style=\"font-size: 14pt; font-family: 'courier new', courier, monospace;\"><span style=\"color: #282828;\">pi@raspberrypi:~\/python $ cat \/dev\/ttyUSB0<br \/>\n<\/span><span style=\"color: #282828;\">Start relais_distance<br \/>\n<\/span><span style=\"color: #282828;\">^C<br \/>\n<\/span><span style=\"color: #282828;\">pi@raspberrypi:~\/python $<\/span><\/span><\/p>\n<p>Le <span style=\"font-family: 'courier new', courier, monospace;\"><strong><span style=\"font-size: 14pt;\">Start relais_distance<\/span><\/strong><\/span> est bien le premier <strong>println<\/strong> de notre script Arduino ci-dessus.<\/p>\n<h3>Le script Python<\/h3>\n<p>Nous d\u00e9poserons ensuite un script <strong>arduino_usb1.py<\/strong> dans notre r\u00e9pertoire <strong>\/home\/pi\/python<\/strong>\u00a0(attention \u00e0 l&rsquo;indentation):<\/p>\n<p><span style=\"background-color: #ccffcc; font-size: 12pt;\"><strong><span style=\"font-family: 'courier new', courier, monospace; background-color: #ccffcc;\"><span style=\"color: #282828;\"># coding: utf-8<br \/>\n<\/span><span style=\"color: #282828;\">import time<br \/>\n<\/span><span style=\"color: #282828;\">import serial<\/span><\/span><\/strong><\/span><\/p>\n<p><span style=\"background-color: #ccffcc; font-size: 12pt;\"><strong><span style=\"color: #282828; font-family: 'courier new', courier, monospace; background-color: #ccffcc;\">ser = serial.Serial(&lsquo;\/dev\/ttyUSB0&rsquo;, 9600)<\/span><\/strong><\/span><\/p>\n<p><span style=\"background-color: #ccffcc; font-size: 12pt;\"><strong><span style=\"font-family: 'courier new', courier, monospace; background-color: #ccffcc;\"><span style=\"color: #282828;\">while 1 :<br \/>\n<\/span><span style=\"color: #282828;\">\u00a0 print(ser.readline())<br \/>\nt<\/span><span style=\"color: #282828;\">ime.sleep(0.1)<\/span><\/span><\/strong><\/span><\/p>\n<p>Il fonctionne:<\/p>\n<pre><strong>pi@raspberrypi:~\/python $ python arduino_usb1.py<\/strong>\n<strong>\u2592Start relais_distance<\/strong>\n\n<strong>Distance: 75<\/strong>\n\n<strong>Relais ON<\/strong>\n\n<strong>Distance: 74<\/strong>\n\n<strong>Distance: 74<\/strong>\n\n<strong>Distance: 74<\/strong><\/pre>\n<p>Il nous restera \u00e0 am\u00e9liorer notre script Arduino, faire quelque chose d&rsquo;un peu plus intelligent, comme envoyer des donn\u00e9es dans l&rsquo;autre direction et pareil en Java sur ce <span style=\"font-size: 14pt;\"><span style=\"background-color: #ccffcc;\"><strong><span style=\"color: #282828; font-family: 'courier new', courier, monospace; background-color: #ccffcc;\">\/dev\/ttyUSB0<\/span><\/strong><\/span>.<\/span><\/p>\n<h3>Une classe Java sous Windows<\/h3>\n<p>Tester un sketch Arduino dans son IDE sur le PC est la mani\u00e8re traditionnelle.<\/p>\n<p>Mais pourquoi donc ne pas \u00e9crire une jolie petite classe Java <strong>USBPort<\/strong>\u00a0(m\u00eame nom de projet) avec Eclipse sur ce m\u00eame PC Windows et qui fera un travail similaire &#8230; et pourrait \u00eatre \u00e9tendu:<\/p>\n<table>\n<tbody>\n<tr>\n<td bgcolor=\"#ffe6cc\">\n<pre><strong>import java.io.IOException;<\/strong>\n<strong>import java.io.RandomAccessFile;<\/strong>\n\n<strong>public class USBPort implements Runnable {<\/strong>\n<strong>  private Thread monThread;<\/strong>\n<strong>  private RandomAccessFile rAF;<\/strong>\n<strong>  private String portName;<\/strong>\n\n<strong>  public USBPort(String portName) {<\/strong>\n<strong>    this.portName = portName;<\/strong>\n<strong>    monThread = new Thread(this);<\/strong>\n<strong>  }<\/strong>\n\n<strong>  public void start() {<\/strong>\n<strong>    try {<\/strong>\n      <strong>rAF = new java.io.RandomAccessFile(portName, \"rwd\");<\/strong>\n<strong>      rAF.writeBytes(\"\\r\\n\");<\/strong>\n<strong>    } <\/strong>\n<strong>    catch (Exception e) {<\/strong>\n<strong>      System.out.println(\"start \" + e.toString());<\/strong>\n<strong>    }<\/strong>\n\n<strong>    monThread.start();<\/strong>\n  <strong>}<\/strong>\n\n<strong>  public void run() {<\/strong>\n<strong>    System.out.println(\"Lecture du port \" + portName);<\/strong>\n<strong>    \n    for (int i = 0; i &lt; 10; i++) {<\/strong>\n<strong>      String response = null;<\/strong>\n<strong>      try {<\/strong>\n<strong>        response = rAF.readLine();<\/strong>\n<strong>      } <\/strong>\n<strong>     catch (IOException e) {<\/strong>\n<strong>       System.out.println(e.getMessage()); <\/strong>\n<strong>     }<\/strong>\n<strong>     System.out.println(response);<\/strong>\n<strong>   }<\/strong>\n<strong> }<\/strong>\n\n<strong> public static void main(String[] args) {<\/strong>\n<strong>   String portDevice = \"COM3\";<\/strong>\n<strong>   if (args.length &gt; 0) {<\/strong>\n<strong>     portDevice = args[0];<\/strong>\n<strong>   }\n<\/strong>\n<strong>   USBPort usbPort = new USBPort(portDevice);<\/strong>\n<strong>   usbPort.start();<\/strong>\n<strong> }<\/strong>\n<strong>}<\/strong><\/pre>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Nous rebrancherons notre c\u00e2ble USB, cette fois-ci sur le PC. Le port <strong>COM3<\/strong> ici a \u00e9t\u00e9 identifi\u00e9 avec l&rsquo;IDE de l&rsquo;Arduino et d\u00e9pend du connecteur du PC utilis\u00e9. En ayant test\u00e9 l&rsquo;interface COM avec l&rsquo;IDE, la bonne configuration sera mise. Si aucun r\u00e9sultat n&rsquo;est retourn\u00e9 il faudra adapter correctement le port COM correspondant.<\/p>\n<p><strong>mode COM3<\/strong> dans une fen\u00eatre DOS CMD va nous fournir l&rsquo;information et une commande\u00a0 <strong>mode COM3 baud=9600<\/strong> devrait suffire. Nous avions indiqu\u00e9 la vitesse avec l&rsquo;instruction\u00a0<strong>Serial.begin(9600);<\/strong>\u00a0 dans le sketch.<\/p>\n<p>L&rsquo;envoi de\u00a0<strong>rAF.writeBytes(\u00ab\u00a0\\r\\n\u00a0\u00bb);<\/strong> permet de red\u00e9marrer le sketch sur l&rsquo;Arduino et le\u00a0<strong>for (int i = 0; i &lt; 10; i++) {\u00a0<\/strong>de stopper le programme apr\u00e8s 10 it\u00e9ration. Si nous ex\u00e9cutions java USBport dans le r\u00e9pertoire bin de notre Workspace d&rsquo;Eclipse, nous verrions le m\u00eame r\u00e9sultat:<\/p>\n<pre>D:\\EclipseWorkspace.......\\bin&gt;<strong>java USBPort COM3<\/strong>\nLecture du port COM3\nStart relais_distance\nDistance: 89\nRelais ON\nDistance: 87\nDistance: 87\nDistance: 88\nDistance: 88\nDistance: 87\nDistance: 88\nDistance: 89<\/pre>\n<p><strong>COM3<\/strong> peut \u00eatre pass\u00e9 par le <strong>args[]<\/strong> du main() de Java.<\/p>\n<p>88 cm: juste! J&rsquo;ai pos\u00e9 mon Arduino sur une table plus loin avec le mur derri\u00e8re (pratique mon c\u00e2ble USB de 2 m).<\/p>\n<h3><strong>Ex\u00e9cuter USBPort sur le Raspberry Pi<\/strong><\/h3>\n<p>Comme d\u00e9crit dans mon livre \u00e0 plusieurs occasions, nous transf\u00e9rerons le fichier <strong>USBPort.class<\/strong> depuis le Workspace d&rsquo;Eclipse sur le Raspberry Pi dans le r\u00e9pertoire habituel <strong>\/home\/pi\/java<\/strong>. Il faudra alors faire passer le c\u00e2ble USB du PC sur le Raspberry Pi, \u00e9videmment!<\/p>\n<p>La commande ici sera:<\/p>\n<pre><strong>java USBPort \/dev\/ttyUSB0<\/strong><\/pre>\n<p>avec le \u00ab\u00a0device\u00a0\u00bb d\u00e9termin\u00e9 ci-dessus. Le r\u00e9sultat sera le m\u00eame que ci-dessus!<\/p>\n<p>En cas de difficult\u00e9 avec la configuration du port, la commande <strong>stty<\/strong> est \u00e9quivalente \u00e0 <strong>MODE<\/strong> sous DOS. Par exemple:<\/p>\n<p><strong>sudo stty -F \/dev\/ttyUSB0 -a<\/strong><br \/>\n<strong>sudo stty -F \/dev\/ttyUSB0 9600 cs8 -cstopb -parenb<\/strong><\/p>\n<hr \/>\n<p><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\"><strong>Dans un second article, plus d\u00e9taill\u00e9 que celui-ci et avec un sch\u00e9ma Fritzing<\/strong><\/a>, nous reprendrons notre Arduino qui poss\u00e8de d\u00e9j\u00e0 un relais, pour:<\/p>\n<ul>\n<li>Y ajouter un capteur analogique LM35 (pas possible sur un Raspberry Pi sans interface analogique);<\/li>\n<li>D\u00e9velopper un sketch Arduino pour:<br \/>\n&#8211; enclencher le relais (petit chauffage) si la temp\u00e9rature est trop basse<br \/>\n&#8211; recevoir la temp\u00e9rature sur le PC<br \/>\n&#8211; d\u00e9cider si le Pi prend le contr\u00f4le pour enclencher ou d\u00e9clencher le relais;<\/li>\n<li>Envoyer une nouvelle limite de temp\u00e9rature;<\/li>\n<li>D\u00e9velopper une classe Java d\u00e9di\u00e9 au Raspberry Pi pour faire le travail!<\/li>\n<\/ul>\nDate de la derni\u00e8re modification: 11 mai 2019\n","protected":false},"excerpt":{"rendered":"<p>Un article sur ce sujet a \u00e9t\u00e9 soumis \u00e0\u00a0developpez.com\u00a0et est maintenant disponible sous le titre\u00a0Cr\u00e9er une communication entre Arduino et Raspberry Pi 3 via USB.&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>Communiquer entre un Arduino et un Raspberry Pi via USB (Python, Java) (1\/2) - 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\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Communiquer entre un Arduino et un Raspberry Pi via USB (Python, Java) (1\/2) - Un livre sur Java, Python, Eclipse et le Raspberry Pi 3\" \/>\n<meta property=\"og:description\" content=\"Un article sur ce sujet a \u00e9t\u00e9 soumis \u00e0\u00a0developpez.com\u00a0et est maintenant disponible sous le titre\u00a0Cr\u00e9er une communication entre Arduino et Raspberry Pi 3 via USB.&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/\" \/>\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-11-16T10:18:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-05-11T10:01:49+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/11\/scriptarduino1-141x300.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=\"5 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\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/#primaryimage\",\"inLanguage\":\"fr-FR\",\"url\":\"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/11\/scriptarduino1-141x300.png\",\"contentUrl\":\"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/11\/scriptarduino1-141x300.png\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/#webpage\",\"url\":\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/\",\"name\":\"Communiquer entre un Arduino et un Raspberry Pi via USB (Python, Java) (1\/2) - 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\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/#primaryimage\"},\"datePublished\":\"2018-11-16T10:18:57+00:00\",\"dateModified\":\"2019-05-11T10:01:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/#\/schema\/person\/fe6328cc5b74b8a6e8d841285a928751\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.boichat.ch\/wpjrsp\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Communiquer entre un Arduino et un Raspberry Pi via USB (Python, Java) (1\/2)\"}]},{\"@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":"Communiquer entre un Arduino et un Raspberry Pi via USB (Python, Java) (1\/2) - 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\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/","og_locale":"fr_FR","og_type":"article","og_title":"Communiquer entre un Arduino et un Raspberry Pi via USB (Python, Java) (1\/2) - Un livre sur Java, Python, Eclipse et le Raspberry Pi 3","og_description":"Un article sur ce sujet a \u00e9t\u00e9 soumis \u00e0\u00a0developpez.com\u00a0et est maintenant disponible sous le titre\u00a0Cr\u00e9er une communication entre Arduino et Raspberry Pi 3 via USB.&hellip;","og_url":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/","og_site_name":"Un livre sur Java, Python, Eclipse et le Raspberry Pi 3","article_published_time":"2018-11-16T10:18:57+00:00","article_modified_time":"2019-05-11T10:01:49+00:00","og_image":[{"url":"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/11\/scriptarduino1-141x300.png"}],"twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"Jean-Bernard Boichat","Dur\u00e9e de lecture estim\u00e9e":"5 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\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/#primaryimage","inLanguage":"fr-FR","url":"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/11\/scriptarduino1-141x300.png","contentUrl":"http:\/\/www.boichat.ch\/wpjrsp\/wp-content\/uploads\/2018\/11\/scriptarduino1-141x300.png"},{"@type":"WebPage","@id":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/#webpage","url":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/","name":"Communiquer entre un Arduino et un Raspberry Pi via USB (Python, Java) (1\/2) - 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\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/#primaryimage"},"datePublished":"2018-11-16T10:18:57+00:00","dateModified":"2019-05-11T10:01:49+00:00","author":{"@id":"https:\/\/www.boichat.ch\/wpjrsp\/#\/schema\/person\/fe6328cc5b74b8a6e8d841285a928751"},"breadcrumb":{"@id":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.boichat.ch\/wpjrsp\/2018\/11\/16\/communiquer-entre-un-arduino-et-un-raspberry-pi-via-usb\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.boichat.ch\/wpjrsp\/"},{"@type":"ListItem","position":2,"name":"Communiquer entre un Arduino et un Raspberry Pi via USB (Python, Java) (1\/2)"}]},{"@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\/355"}],"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=355"}],"version-history":[{"count":0,"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/posts\/355\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/media?parent=355"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/categories?post=355"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.boichat.ch\/wpjrsp\/wp-json\/wp\/v2\/tags?post=355"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}