{"id":3754,"date":"2020-05-25T08:35:00","date_gmt":"2020-05-25T06:35:00","guid":{"rendered":"https:\/\/www.nerdiy.de\/?p=3754"},"modified":"2020-05-25T08:46:36","modified_gmt":"2020-05-25T06:46:36","slug":"code-snippets-arduino-i2c-enable-broadcast-reception","status":"publish","type":"post","link":"https:\/\/nerdiy.de\/en\/code-snippets-arduino-i2c-enable-broadcast-reception\/","title":{"rendered":"Code snippet: Arduino - Enable I2C broadcast receive"},"content":{"rendered":"<p>I2C is the bus protocol or technology through which a microcontroller can communicate with many sensors or actuators. Thanks to the right software you can also connect different microcontrollers with each other and let them communicate. Normally there is only one master per I2C bus which can request data from or send data to a slave via the corresponding address.<\/p>\n<p>In one of my projects I wanted or want to connect several microcontrollers. Several bus technologies are suitable for this. But I2C is almost the only one which is directly supported by almost every modern microcontroller without additional hardware requirements. So the choice was quickly made for I2C.<\/p>\n<p>So by means of I2C several microcontrollers were or are now connected with each other. The master can easily send a command to each individual slave. To do this, simply send the slave address and the desired command over the bus. All slaves listen to what is going on on the bus, but only the slave with the corresponding address reacts to the sent command. So far so good.<\/p>\n<p>But what if the master wants to send a command to all slaves? For example to start a command synchronously on all slaves? With two or three slaves you can still inform each slave individually. The processing speed is usually so fast that you don't notice a big time difference between the executions on the individual slaves. However, if you use this method with 100 slaves, you will quickly notice that the last notified slave starts much later than the first slave.<\/p>\n<p>The solution for this problem is the I2C broadcast address. This is an address that every slave on the bus listens to. To activate this you just have to set a control bit. At least this is how it works with Arduinos based on Atmel processors \ud83d\ude42 .<\/p>\n<p>How to set this bit is described in the following article.<\/p>\n<hr \/>\n<h2>Enable I2C broadcast for I2C slaves<\/h2>\n<p>So that all nodes on the I2C bus can be notified across the board, there is the broadcast address \"0\". So the zero is fixed defined as the address for broadcast messages and should not be used by any other slave.<\/p>\n<p>By default a microcontroller does not respond to this address. This has to be activated by setting the corresponding control bit. You just have to insert the following line into the \"setup()\" function of your program code.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">TWAR = (address &lt;&lt; 1) | 1; \/\/ enable listening on broadcast messages<\/pre>\n<p>In a complete I2C initialization function this could for example look like this<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">void init_i2c()\r\n{\r\n  Wire.begin(address);\r\n  TWAR = (address &lt;&lt; 1) | 1; \/\/ enable listening on broadcast messages\r\n  Wire.onReceive(i2c_receive_event);\r\n  Serial.print(F(&quot;I2C: I2C slave initialized at address: &quot;));\r\n  Serial.println(address);\r\n}<\/pre>\n<hr \/>\n<h2>General information about I2C and interrupts<\/h2>\n<p>An event on the I2C bus always calls an interrupt, which interrupts the regular sequence of your microcontroller. So the program execution jumps briefly from the regular program to the interrupt routine. But you should keep the stay in this routine as short as possible. Therefore it is \"common practice\" to set a \"flag\" within the interrupt routine. This \"flag\" is actually just a boolean variable, which is set to \"true\" there. Back in the main program flow of your microcontroller you can now regularly check if this variable is set.<\/p>\n<p>If yes, you can now read out the received data or commands and react accordingly.<\/p>\n<p>By the way: You should not use \"Serial.print...\" or similar time-consuming commands within the interrupt routines.<\/p>\n<hr \/>\n<h2>Further information<\/h2>\n<p><a href=\"http:\/\/forum.arduino.cc\/index.php?topic=183699.0\"><em><strong>http:\/\/forum.arduino.cc\/index.php?topic=183699.0<\/strong><\/em><\/a><\/p>\n<p><a href=\"http:\/\/www.gammon.com.au\/i2c\"><em><strong>http:\/\/www.gammon.com.au\/i2c<\/strong><\/em><\/a><\/p>\n<p><a href=\"http:\/\/www.gammon.com.au\/forum\/?id=10896&amp;reply=1#reply1\"><em><strong>http:\/\/www.gammon.com.au\/forum\/?id=10896&amp;reply=1#reply1<\/strong><\/em><\/a><\/p>\n<hr \/>\n<h2>Have fun with the project<\/h2>\r\n<p>I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary.<br \/>Ideas for new projects are always welcome. \ud83d\ude42<\/p>\r\n<p><strong>PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it&#039;s cool that I share the information with you, I would be happy about a small donation to the coffee fund. \ud83d\ude42<\/strong><\/p>\r\n<p><a href=\"https:\/\/ko-fi.com\/nerdiy\" target=\"_blank\" rel=\"noopener\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" style=\"border: 0px; height: 36px;\" src=\"https:\/\/i0.wp.com\/cdn.ko-fi.com\/cdn\/kofi4.png?resize=143%2C36&#038;ssl=1\" alt=\"Buy Me a Coffee at ko-fi.com\" width=\"143\" height=\"36\" border=\"0\" \/><\/a>\u00a0 \u00a0 \u00a0 \u00a0<input name=\"cmd\" type=\"hidden\" value=\"_s-xclick\" \/> <input name=\"hosted_button_id\" type=\"hidden\" value=\"UAZE9RMHJY7VJ\" \/> <input title=\"PayPal - The safer, easier way to pay online!\" alt=\"Donate with PayPal button\" name=\"submit\" src=\"https:\/\/www.paypalobjects.com\/de_DE\/DE\/i\/btn\/btn_donateCC_LG.gif\" type=\"image\" \/> <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.paypal.com\/de_DE\/i\/scr\/pixel.gif?resize=1%2C1&#038;ssl=1\" alt=\"\" width=\"1\" height=\"1\" border=\"0\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>I2C is the bus protocol or technology through which a microcontroller can communicate with many sensors or actuators. Thanks to the right software, you can also connect different microcontrollers with each other and [...].<\/p>","protected":false},"author":1,"featured_media":8502,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[56,66,86],"tags":[29,73,60,156],"class_list":["post-3754","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-codeschnipsel","category-elektronik","tag-arduino","tag-arduino-nano","tag-codeschnipsel","tag-i2c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Codeschnipsel: Arduino - I2C-Broadcast empfang aktivieren - nerdiy.de - DIY, Elektronik, 3D Druck und mehr...<\/title>\n<meta name=\"description\" content=\"Read a huge collection of detailed Tutorials on Nerdiy.de about all kind of Software, Hardware and general maker topics.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nerdiy.de\/en\/code-snippets-arduino-i2c-enable-broadcast-reception\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Codeschnipsel: Arduino - I2C-Broadcast empfang aktivieren - nerdiy.de - DIY, Elektronik, 3D Druck und mehr...\" \/>\n<meta property=\"og:description\" content=\"Read a huge collection of detailed Tutorials on Nerdiy.de about all kind of Software, Hardware and general maker topics.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nerdiy.de\/en\/code-snippets-arduino-i2c-enable-broadcast-reception\/\" \/>\n<meta property=\"og:site_name\" content=\"nerdiy.de - DIY, Elektronik, 3D Druck und mehr...\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/nerdiy.de\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/nerdiy.de\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-25T06:35:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-25T06:46:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/05\/www.nerdiy.de-decodeschnipsel-arduino-i2c-broadcast-empfang-aktivierenencode-snippet-arduino-activate-i2c-broadcast-reception-sharex-lmhk6d6iyx.png?fit=746%2C271&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"746\" \/>\n\t<meta property=\"og:image:height\" content=\"271\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Fab\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@nerdiyde\" \/>\n<meta name=\"twitter:site\" content=\"@nerdiyde\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fab\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/\"},\"author\":{\"name\":\"Fab\",\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/#\\\/schema\\\/person\\\/f1579a71868adb0be60a74246d3e0908\"},\"headline\":\"Codeschnipsel: Arduino &#8211; I2C-Broadcast empfang aktivieren\",\"datePublished\":\"2020-05-25T06:35:00+00:00\",\"dateModified\":\"2020-05-25T06:46:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/\"},\"wordCount\":574,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/nerdiy.de\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/www.nerdiy.de-decodeschnipsel-arduino-i2c-broadcast-empfang-aktivierenencode-snippet-arduino-activate-i2c-broadcast-reception-sharex-lmhk6d6iyx.png?fit=746%2C271&ssl=1\",\"keywords\":[\"Arduino\",\"Arduino Nano\",\"Codeschnipsel\",\"I2C\"],\"articleSection\":[\"Arduino\",\"Codeschnipsel\",\"Elektronik\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/\",\"url\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/\",\"name\":\"Codeschnipsel: Arduino - I2C-Broadcast empfang aktivieren - nerdiy.de - DIY, Elektronik, 3D Druck und mehr...\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/nerdiy.de\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/www.nerdiy.de-decodeschnipsel-arduino-i2c-broadcast-empfang-aktivierenencode-snippet-arduino-activate-i2c-broadcast-reception-sharex-lmhk6d6iyx.png?fit=746%2C271&ssl=1\",\"datePublished\":\"2020-05-25T06:35:00+00:00\",\"dateModified\":\"2020-05-25T06:46:36+00:00\",\"description\":\"Read a huge collection of detailed Tutorials on Nerdiy.de about all kind of Software, Hardware and general maker topics.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/nerdiy.de\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/www.nerdiy.de-decodeschnipsel-arduino-i2c-broadcast-empfang-aktivierenencode-snippet-arduino-activate-i2c-broadcast-reception-sharex-lmhk6d6iyx.png?fit=746%2C271&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/nerdiy.de\\\/wp-content\\\/uploads\\\/2020\\\/05\\\/www.nerdiy.de-decodeschnipsel-arduino-i2c-broadcast-empfang-aktivierenencode-snippet-arduino-activate-i2c-broadcast-reception-sharex-lmhk6d6iyx.png?fit=746%2C271&ssl=1\",\"width\":746,\"height\":271},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Codeschnipsel: Arduino &#8211; I2C-Broadcast empfang aktivieren\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/#website\",\"url\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/\",\"name\":\"nerdiy.de - DIY, Elektronik, 3D Druck und mehr...\",\"description\":\"Bei nerdiy.de dreht sich alles um Elektronik, Heimwerken, 3D-Druck, Smart Home und viele andere technische Themen.\",\"publisher\":{\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/#organization\",\"name\":\"Nerdiy.de\",\"url\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/nerdiy.de\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/www.nerdiy.de-v1.0final180x180-1.png?fit=180%2C180&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/nerdiy.de\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/www.nerdiy.de-v1.0final180x180-1.png?fit=180%2C180&ssl=1\",\"width\":180,\"height\":180,\"caption\":\"Nerdiy.de\"},\"image\":{\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/nerdiy.de\",\"https:\\\/\\\/x.com\\\/nerdiyde\",\"https:\\\/\\\/www.instagram.com\\\/nerdiy.de\\\/\",\"https:\\\/\\\/www.pinterest.de\\\/nerdiyde\\\/\",\"https:\\\/\\\/www.youtube.com\\\/nerdiy\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/nerdiy.de\\\/de_de\\\/#\\\/schema\\\/person\\\/f1579a71868adb0be60a74246d3e0908\",\"name\":\"Fab\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5cd8a2c5a20873f04ac46048f749a6f5335f6d9d3af744d9bb04f4052c44fca2?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5cd8a2c5a20873f04ac46048f749a6f5335f6d9d3af744d9bb04f4052c44fca2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5cd8a2c5a20873f04ac46048f749a6f5335f6d9d3af744d9bb04f4052c44fca2?s=96&d=mm&r=g\",\"caption\":\"Fab\"},\"sameAs\":[\"https:\\\/\\\/nerdiy.de\",\"https:\\\/\\\/www.facebook.com\\\/nerdiy.de\\\/\",\"https:\\\/\\\/www.instagram.com\\\/nerdiy.de\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/nerdiy-de\\\/\",\"http:\\\/\\\/www.pinterest.com\\\/nerdiyde\\\/\",\"https:\\\/\\\/x.com\\\/nerdiyde\",\"https:\\\/\\\/www.youtube.com\\\/c\\\/Nerdiy\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Code snippets: Arduino - Enable I2C broadcast reception - nerdiy.de - DIY, electronics, 3D printing and more...","description":"Read a huge collection of detailed Tutorials on Nerdiy.de about all kind of Software, Hardware and general maker topics.","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:\/\/nerdiy.de\/en\/code-snippets-arduino-i2c-enable-broadcast-reception\/","og_locale":"en_US","og_type":"article","og_title":"Codeschnipsel: Arduino - I2C-Broadcast empfang aktivieren - nerdiy.de - DIY, Elektronik, 3D Druck und mehr...","og_description":"Read a huge collection of detailed Tutorials on Nerdiy.de about all kind of Software, Hardware and general maker topics.","og_url":"https:\/\/nerdiy.de\/en\/code-snippets-arduino-i2c-enable-broadcast-reception\/","og_site_name":"nerdiy.de - DIY, Elektronik, 3D Druck und mehr...","article_publisher":"https:\/\/www.facebook.com\/nerdiy.de","article_author":"https:\/\/www.facebook.com\/nerdiy.de\/","article_published_time":"2020-05-25T06:35:00+00:00","article_modified_time":"2020-05-25T06:46:36+00:00","og_image":[{"width":746,"height":271,"url":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/05\/www.nerdiy.de-decodeschnipsel-arduino-i2c-broadcast-empfang-aktivierenencode-snippet-arduino-activate-i2c-broadcast-reception-sharex-lmhk6d6iyx.png?fit=746%2C271&ssl=1","type":"image\/png"}],"author":"Fab","twitter_card":"summary_large_image","twitter_creator":"@nerdiyde","twitter_site":"@nerdiyde","twitter_misc":{"Written by":"Fab","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/#article","isPartOf":{"@id":"https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/"},"author":{"name":"Fab","@id":"https:\/\/nerdiy.de\/de_de\/#\/schema\/person\/f1579a71868adb0be60a74246d3e0908"},"headline":"Codeschnipsel: Arduino &#8211; I2C-Broadcast empfang aktivieren","datePublished":"2020-05-25T06:35:00+00:00","dateModified":"2020-05-25T06:46:36+00:00","mainEntityOfPage":{"@id":"https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/"},"wordCount":574,"commentCount":0,"publisher":{"@id":"https:\/\/nerdiy.de\/de_de\/#organization"},"image":{"@id":"https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/05\/www.nerdiy.de-decodeschnipsel-arduino-i2c-broadcast-empfang-aktivierenencode-snippet-arduino-activate-i2c-broadcast-reception-sharex-lmhk6d6iyx.png?fit=746%2C271&ssl=1","keywords":["Arduino","Arduino Nano","Codeschnipsel","I2C"],"articleSection":["Arduino","Codeschnipsel","Elektronik"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/","url":"https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/","name":"Code snippets: Arduino - Enable I2C broadcast reception - nerdiy.de - DIY, electronics, 3D printing and more...","isPartOf":{"@id":"https:\/\/nerdiy.de\/de_de\/#website"},"primaryImageOfPage":{"@id":"https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/#primaryimage"},"image":{"@id":"https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/05\/www.nerdiy.de-decodeschnipsel-arduino-i2c-broadcast-empfang-aktivierenencode-snippet-arduino-activate-i2c-broadcast-reception-sharex-lmhk6d6iyx.png?fit=746%2C271&ssl=1","datePublished":"2020-05-25T06:35:00+00:00","dateModified":"2020-05-25T06:46:36+00:00","description":"Read a huge collection of detailed Tutorials on Nerdiy.de about all kind of Software, Hardware and general maker topics.","breadcrumb":{"@id":"https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/#primaryimage","url":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/05\/www.nerdiy.de-decodeschnipsel-arduino-i2c-broadcast-empfang-aktivierenencode-snippet-arduino-activate-i2c-broadcast-reception-sharex-lmhk6d6iyx.png?fit=746%2C271&ssl=1","contentUrl":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/05\/www.nerdiy.de-decodeschnipsel-arduino-i2c-broadcast-empfang-aktivierenencode-snippet-arduino-activate-i2c-broadcast-reception-sharex-lmhk6d6iyx.png?fit=746%2C271&ssl=1","width":746,"height":271},{"@type":"BreadcrumbList","@id":"https:\/\/nerdiy.de\/de_de\/codeschnipsel-arduino-i2c-broadcast-empfang-aktivieren\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/nerdiy.de\/de_de\/"},{"@type":"ListItem","position":2,"name":"Codeschnipsel: Arduino &#8211; I2C-Broadcast empfang aktivieren"}]},{"@type":"WebSite","@id":"https:\/\/nerdiy.de\/de_de\/#website","url":"https:\/\/nerdiy.de\/de_de\/","name":"nerdiy.de - DIY, electronics, 3D printing and more...","description":"At nerdiy.de, everything revolves around electronics, DIY, 3D printing, smart home and many other technical topics.","publisher":{"@id":"https:\/\/nerdiy.de\/de_de\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nerdiy.de\/de_de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/nerdiy.de\/de_de\/#organization","name":"Nerdiy.de","url":"https:\/\/nerdiy.de\/de_de\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nerdiy.de\/de_de\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/04\/www.nerdiy.de-v1.0final180x180-1.png?fit=180%2C180&ssl=1","contentUrl":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/04\/www.nerdiy.de-v1.0final180x180-1.png?fit=180%2C180&ssl=1","width":180,"height":180,"caption":"Nerdiy.de"},"image":{"@id":"https:\/\/nerdiy.de\/de_de\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/nerdiy.de","https:\/\/x.com\/nerdiyde","https:\/\/www.instagram.com\/nerdiy.de\/","https:\/\/www.pinterest.de\/nerdiyde\/","https:\/\/www.youtube.com\/nerdiy"]},{"@type":"Person","@id":"https:\/\/nerdiy.de\/de_de\/#\/schema\/person\/f1579a71868adb0be60a74246d3e0908","name":"Fab","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5cd8a2c5a20873f04ac46048f749a6f5335f6d9d3af744d9bb04f4052c44fca2?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5cd8a2c5a20873f04ac46048f749a6f5335f6d9d3af744d9bb04f4052c44fca2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5cd8a2c5a20873f04ac46048f749a6f5335f6d9d3af744d9bb04f4052c44fca2?s=96&d=mm&r=g","caption":"Fab"},"sameAs":["https:\/\/nerdiy.de","https:\/\/www.facebook.com\/nerdiy.de\/","https:\/\/www.instagram.com\/nerdiy.de","https:\/\/www.linkedin.com\/company\/nerdiy-de\/","http:\/\/www.pinterest.com\/nerdiyde\/","https:\/\/x.com\/nerdiyde","https:\/\/www.youtube.com\/c\/Nerdiy"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/05\/www.nerdiy.de-decodeschnipsel-arduino-i2c-broadcast-empfang-aktivierenencode-snippet-arduino-activate-i2c-broadcast-reception-sharex-lmhk6d6iyx.png?fit=746%2C271&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9GM3g-Yy","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":15476,"url":"https:\/\/nerdiy.de\/en\/howto-espeasy-pca9685-pwm-port-extension-connect-to-the-esp8266-and-control-2\/","url_meta":{"origin":3754,"position":0},"title":"HowTo: ESPEasy \u2013 Connect and control the PCA9685 PWM port extension to the ESP8266","author":"Fab","date":"27. January 2021","format":false,"excerpt":"Der PCA9685 ist ein recht praktischer IC. Dieser wird \u00fcber I2C an den Mikrocontroller (zum Beispiel ESP8266) angebunden und kann dann bis zu 16 einzelne PWM Kan\u00e4le steuern. So k\u00f6nnt Ihr mit nur zwei (I2C) Pins am Mikrocontroller bis zu 16 LEDs, Servos oder mit zus\u00e4tzlichem Schaltungsaufwand auch Motoren steuern.\u2026","rel":"","context":"In &quot;Abendprojekt(&lt;2h)&quot;","block_context":{"text":"Abendprojekt(&lt;2h)","link":"https:\/\/nerdiy.de\/en\/category\/evening-project2h\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2021\/01\/www.nerdiy.de-howto-espeasy-pca9685-pwm-port-erweiterung-an-den-esp8266-anschliessen-und-ansteuern-fritzing-svn2j0apok.jpg?fit=1200%2C503&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2021\/01\/www.nerdiy.de-howto-espeasy-pca9685-pwm-port-erweiterung-an-den-esp8266-anschliessen-und-ansteuern-fritzing-svn2j0apok.jpg?fit=1200%2C503&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2021\/01\/www.nerdiy.de-howto-espeasy-pca9685-pwm-port-erweiterung-an-den-esp8266-anschliessen-und-ansteuern-fritzing-svn2j0apok.jpg?fit=1200%2C503&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2021\/01\/www.nerdiy.de-howto-espeasy-pca9685-pwm-port-erweiterung-an-den-esp8266-anschliessen-und-ansteuern-fritzing-svn2j0apok.jpg?fit=1200%2C503&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2021\/01\/www.nerdiy.de-howto-espeasy-pca9685-pwm-port-erweiterung-an-den-esp8266-anschliessen-und-ansteuern-fritzing-svn2j0apok.jpg?fit=1200%2C503&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":928,"url":"https:\/\/nerdiy.de\/en\/arduinoide-tips-and-tricks-2\/","url_meta":{"origin":3754,"position":1},"title":"ArduinoIDE - Tips and Tricks","author":"Fab","date":"12. June 2018","format":false,"excerpt":"Die ArdunioIDE ist - verglichen mit anderen Entwicklungsumgebungen - sehr simpel gehalten. Es gibt nicht viele Sachen die man ein- oder verstellen kann. Dies hat den Vorteil, dass Anf\u00e4nger oder \"Fachfremde\" von der Einstellungsvielfalt nicht \u00fcberfordert werden und man bei der Programmierung und \u00dcbertragung nicht soviel falsch machen kann. Trotzdem\u2026","rel":"","context":"In &quot;Arduino&quot;","block_context":{"text":"Arduino","link":"https:\/\/nerdiy.de\/en\/category\/arduino\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/06\/Screenshot-57.png?fit=1200%2C592&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/06\/Screenshot-57.png?fit=1200%2C592&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/06\/Screenshot-57.png?fit=1200%2C592&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/06\/Screenshot-57.png?fit=1200%2C592&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/06\/Screenshot-57.png?fit=1200%2C592&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":202,"url":"https:\/\/nerdiy.de\/en\/fhem-nanocul-install\/","url_meta":{"origin":3754,"position":2},"title":"HowTo: FHEM \u2013 install nanoCul","author":"Fab","date":"22. February 2018","format":false,"excerpt":"So richtig Spa\u00df macht ein Smart-Home-System erst dann, wenn es mit anderen Komponenten kommunizieren kann. Da viele Systeme zur Kommunikation Funkverbindungen nutzen ist es nur logisch FHEM so bald wie m\u00f6glich ebenfalls Funk-f\u00e4hig zu machen. Die meisten Sensoren und Aktoren im Smart-Home Bereich setzen dabei neben W-Lan und Bluetooth auf\u2026","rel":"","context":"In &quot;Abendprojekt(&lt;2h)&quot;","block_context":{"text":"Abendprojekt(&lt;2h)","link":"https:\/\/nerdiy.de\/en\/category\/evening-project2h\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/02\/20171107_160724-1-scaled.jpg?fit=1200%2C900&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/02\/20171107_160724-1-scaled.jpg?fit=1200%2C900&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/02\/20171107_160724-1-scaled.jpg?fit=1200%2C900&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/02\/20171107_160724-1-scaled.jpg?fit=1200%2C900&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/02\/20171107_160724-1-scaled.jpg?fit=1200%2C900&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2083,"url":"https:\/\/nerdiy.de\/en\/evaluate-howto-raspberry-pi-mpr121-touchsensor-via-i2c-and-node-red\/","url_meta":{"origin":3754,"position":3},"title":"HowTo: Raspberry Pi - Evaluate MPR121 touch sensor via I2C and Node Red","author":"Fab","date":"2. July 2022","format":false,"excerpt":"Dank des I2C Bus kann der Raspberry Pi mit vielerlei praktischen Sensoren und Aktoren ausgestattet werden. Eine (meiner Meinung nach) sehr elegante M\u00f6glichkeit f\u00fcr Benutzereingaben bietet dabei der MPR121. Der MPR121 ist ein Controller, der es erm\u00f6glicht bis zu 12 Touch-Elektroden auszuwerten. Ihr k\u00f6nnt damit also bis zu 12 Elektroden\u2026","rel":"","context":"In &quot;Abendprojekt(&lt;2h)&quot;","block_context":{"text":"Abendprojekt(&lt;2h)","link":"https:\/\/nerdiy.de\/en\/category\/evening-project2h\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/12\/www.nerdiy.de-howto-elektronik-mpr121-an-raspberrypi-esp32-esp8266-und-co-anschliessen-fritzing-tnihiv4t95-1.jpg?fit=962%2C752&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/12\/www.nerdiy.de-howto-elektronik-mpr121-an-raspberrypi-esp32-esp8266-und-co-anschliessen-fritzing-tnihiv4t95-1.jpg?fit=962%2C752&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/12\/www.nerdiy.de-howto-elektronik-mpr121-an-raspberrypi-esp32-esp8266-und-co-anschliessen-fritzing-tnihiv4t95-1.jpg?fit=962%2C752&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2020\/12\/www.nerdiy.de-howto-elektronik-mpr121-an-raspberrypi-esp32-esp8266-und-co-anschliessen-fritzing-tnihiv4t95-1.jpg?fit=962%2C752&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":617,"url":"https:\/\/nerdiy.de\/en\/fibonacci-clock-programming\/","url_meta":{"origin":3754,"position":4},"title":"HowTo: Fibonacci Clock \u2013 Programming","author":"Fab","date":"29. May 2018","format":false,"excerpt":"In den beiden Beitr\u00e4gen FibonacciUhr - Ein ungew\u00f6hnlicher Zeitanzeiger und FibonacciUhr - Zusammenbau wurde die FibonacciUhr vorgestellt und beschrieben wie ihr eine eigene FibonacciUhr zusammenbauen k\u00f6nnt. Nachdem ihr den Zusammenbau abgeschlossen habt steht nun noch die Programmierung der Uhr an. Dies ist im folgendem Artikel beschrieben. Voraussetzungen Zur Programmierung eurer\u2026","rel":"","context":"In &quot;Abendprojekt(&lt;2h)&quot;","block_context":{"text":"Abendprojekt(&lt;2h)","link":"https:\/\/nerdiy.de\/en\/category\/evening-project2h\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/05\/InkedScreenshot-152_LI.jpg?fit=1048%2C590&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/05\/InkedScreenshot-152_LI.jpg?fit=1048%2C590&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/05\/InkedScreenshot-152_LI.jpg?fit=1048%2C590&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/05\/InkedScreenshot-152_LI.jpg?fit=1048%2C590&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1697,"url":"https:\/\/nerdiy.de\/en\/tasmota-ws2812-light-chain-to-build-yourself\/","url_meta":{"origin":3754,"position":5},"title":"HowTo: Tasmota \u2013 WS2812 light chain to build yourself","author":"Fab","date":"27. February 2019","format":false,"excerpt":"Von dem Bau der WeltkartenLampe hatte ich noch ein paar Kunststoff-Lampengeh\u00e4use \u00fcber. Diese lagen lange einsam im Regal rum, bis ich auf die Idee kam daraus eine kleine RGB-Lichterkette mit WS2812 LED's zu bauen. Das tolle bei den WS2812B-LED's ist, dass man die Farbe und Helligkeit jeder einzelnen LED steuern\u2026","rel":"","context":"In &quot;3D-Druck&quot;","block_context":{"text":"3D-Druck","link":"https:\/\/nerdiy.de\/en\/category\/3d-printing\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/10\/www.nerdiy.de-tasmota-ws2812-lichterkette-zum-selber-bauen-20181002-183208.jpg?fit=1200%2C900&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/10\/www.nerdiy.de-tasmota-ws2812-lichterkette-zum-selber-bauen-20181002-183208.jpg?fit=1200%2C900&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/10\/www.nerdiy.de-tasmota-ws2812-lichterkette-zum-selber-bauen-20181002-183208.jpg?fit=1200%2C900&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/10\/www.nerdiy.de-tasmota-ws2812-lichterkette-zum-selber-bauen-20181002-183208.jpg?fit=1200%2C900&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/nerdiy.de\/wp-content\/uploads\/2018\/10\/www.nerdiy.de-tasmota-ws2812-lichterkette-zum-selber-bauen-20181002-183208.jpg?fit=1200%2C900&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/nerdiy.de\/en\/wp-json\/wp\/v2\/posts\/3754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nerdiy.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nerdiy.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nerdiy.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nerdiy.de\/en\/wp-json\/wp\/v2\/comments?post=3754"}],"version-history":[{"count":0,"href":"https:\/\/nerdiy.de\/en\/wp-json\/wp\/v2\/posts\/3754\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nerdiy.de\/en\/wp-json\/wp\/v2\/media\/8502"}],"wp:attachment":[{"href":"https:\/\/nerdiy.de\/en\/wp-json\/wp\/v2\/media?parent=3754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nerdiy.de\/en\/wp-json\/wp\/v2\/categories?post=3754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nerdiy.de\/en\/wp-json\/wp\/v2\/tags?post=3754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}