{"id":304,"date":"2014-11-23T18:12:08","date_gmt":"2014-11-23T17:12:08","guid":{"rendered":"http:\/\/www.raulet.net\/WP\/?p=304"},"modified":"2021-10-18T12:01:28","modified_gmt":"2021-10-18T10:01:28","slug":"transmission-rf-entre-un-arduino-et-un-raspberry-pi-version-2","status":"publish","type":"post","link":"https:\/\/www.raulet.net\/WP\/transmission-rf-entre-un-arduino-et-un-raspberry-pi-version-2\/","title":{"rendered":"Transmission RF entre un Arduino et un Raspberry Pi &#8211; version 2"},"content":{"rendered":"<h1>Pr\u00e9sentation<\/h1>\n<p>Je reviens \u00e0 l&rsquo;attaque pour optimiser la transmission en Radio Fr\u00e9quence entre un arduino (capteurs) et un Raspberry Pi (collecteur).<br \/>\nUn article pr\u00e9c\u00e9dent (<a title=\"Arduino vers Raspberry en 433MHz\" href=\"http:\/\/www.raulet.net\/WP\/?p=174\" target=\"_blank\" rel=\"noopener\">http:\/\/www.raulet.net\/WP\/?p=174<\/a>) pr\u00e9sentait une version simple voir simpliste en utilisant le protocol RS232 directement sur ces petits modules RF en mode ACK. Cette m\u00e9thode subie beaucoup de bruit et donne des r\u00e9sultats moyens dans la dur\u00e9e.<\/p>\n<p>La librairie retenue pour ce besoin est RCSwitch, qui existe pour Arduino et Raspberry !<\/p>\n<h1>C\u00e2blages<\/h1>\n<h2>Arduino<\/h2>\n<figure id=\"attachment_320\" aria-describedby=\"caption-attachment-320\" style=\"width: 300px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2014\/11\/ARL-Arduino-RF-emetter-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-320 size-medium\" src=\"http:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2014\/11\/ARL-Arduino-RF-emetter-1-300x286.png\" alt=\"ARL-Arduino-RF-emetter-1\" width=\"300\" height=\"286\" srcset=\"https:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2014\/11\/ARL-Arduino-RF-emetter-1-300x286.png 300w, https:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2014\/11\/ARL-Arduino-RF-emetter-1-1030x983.png 1030w, https:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2014\/11\/ARL-Arduino-RF-emetter-1.png 1053w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-320\" class=\"wp-caption-text\">Sch\u00e9ma de l&#8217;emetteur (Arduino)<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>Raspberry Pi<\/h2>\n<p>Cot\u00e9 Raspberry Pi :<\/p>\n<p><a href=\"http:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2014\/11\/ARL-RPi-RF-receiver-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-323 size-medium\" src=\"http:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2014\/11\/ARL-RPi-RF-receiver-1-300x255.png\" alt=\"ARL-RPi-RF-receiver-1\" width=\"300\" height=\"255\" srcset=\"https:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2014\/11\/ARL-RPi-RF-receiver-1-300x255.png 300w, https:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2014\/11\/ARL-RPi-RF-receiver-1-1030x878.png 1030w, https:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2014\/11\/ARL-RPi-RF-receiver-1.png 1263w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Sch\u00e9ma de la partie Raspberry Pi :<br \/>\nGPIO2 \/ pin 13 \u00a0-&gt; DATA<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>GPIO du RPi :<\/p>\n<figure id=\"attachment_227\" aria-describedby=\"caption-attachment-227\" style=\"width: 300px\" class=\"wp-caption alignleft\"><a href=\"http:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2013\/09\/Raspberry-Pi-GPIO-Layout-Revision-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-227 size-medium\" src=\"http:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2013\/09\/Raspberry-Pi-GPIO-Layout-Revision-2-300x141.png\" alt=\"Raspberry-Pi-GPIO-Layout-Revision-2\" width=\"300\" height=\"141\" srcset=\"https:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2013\/09\/Raspberry-Pi-GPIO-Layout-Revision-2-300x141.png 300w, https:\/\/www.raulet.net\/WP\/wp-content\/uploads\/2013\/09\/Raspberry-Pi-GPIO-Layout-Revision-2.png 1000w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-227\" class=\"wp-caption-text\">GPIO Raspberrry Pi (Rev 2) : brochage &amp; fonctions<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: left;\">Programmation<\/h1>\n<h2>Protocole de communication<\/h2>\n<p>Structure des paquets :<\/p>\n<table style=\"border-color: #000000; background-color: #e3e3e3; height: 120px;\" width=\"476\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\">\u00a0<strong>PREFIX<\/strong><br \/>\n3 bits<\/td>\n<td style=\"text-align: center;\"><strong>MODULE<\/strong><br \/>\n4 bits<\/td>\n<td style=\"text-align: center;\"><strong>TYPE<\/strong><br \/>\n4 bits<\/td>\n<td style=\"text-align: center;\"><strong>CAPTEUR<\/strong><br \/>\n4 bits<\/td>\n<td style=\"text-align: center;\"><strong>DATA<\/strong><br \/>\n16 bits<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">\u00a0111<\/td>\n<td style=\"text-align: center;\">\u00a01111<\/td>\n<td style=\"text-align: center;\">\u00a01111<\/td>\n<td style=\"text-align: center;\">\u00a01111<\/td>\n<td style=\"text-align: center;\">\u00a01111111111111111<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Types :<\/p>\n<ol>\n<li>Temp\u00e9rature : en dizi\u00e8me de degr\u00e9s kelvin<\/li>\n<li>Hygrom\u00e9trie : en pourcent d&rsquo;humidit\u00e9.<\/li>\n<li>xxx<\/li>\n<li>xxx<\/li>\n<li>xxx<\/li>\n<li>xxx<\/li>\n<li>xxx<\/li>\n<li>xxx<\/li>\n<li>xxx<\/li>\n<\/ol>\n<h2>Arduino<\/h2>\n<pre class=\"lang:default decode:true \">Hello World<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pr\u00e9sentation Je reviens \u00e0 l&rsquo;attaque pour optimiser la transmission en Radio Fr\u00e9quence entre un arduino (capteurs) et un Raspberry Pi [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[3,4],"tags":[],"class_list":["post-304","post","type-post","status-publish","format-standard","hentry","category-arduino","category-raspberry-pi"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"arnaud","author_link":"https:\/\/www.raulet.net\/WP\/author\/arnaud\/"},"uagb_comment_info":0,"uagb_excerpt":"Pr\u00e9sentation Je reviens \u00e0 l&rsquo;attaque pour optimiser la transmission en Radio Fr\u00e9quence entre un arduino (capteurs) et un Raspberry Pi [&hellip;]","_links":{"self":[{"href":"https:\/\/www.raulet.net\/WP\/wp-json\/wp\/v2\/posts\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.raulet.net\/WP\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.raulet.net\/WP\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.raulet.net\/WP\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.raulet.net\/WP\/wp-json\/wp\/v2\/comments?post=304"}],"version-history":[{"count":27,"href":"https:\/\/www.raulet.net\/WP\/wp-json\/wp\/v2\/posts\/304\/revisions"}],"predecessor-version":[{"id":615,"href":"https:\/\/www.raulet.net\/WP\/wp-json\/wp\/v2\/posts\/304\/revisions\/615"}],"wp:attachment":[{"href":"https:\/\/www.raulet.net\/WP\/wp-json\/wp\/v2\/media?parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.raulet.net\/WP\/wp-json\/wp\/v2\/categories?post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.raulet.net\/WP\/wp-json\/wp\/v2\/tags?post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}