{"id":22029,"date":"2017-12-14T22:12:56","date_gmt":"2017-12-14T15:12:56","guid":{"rendered":"http:\/\/tom.ji42.com\/?p=22029"},"modified":"2020-11-09T07:29:37","modified_gmt":"2020-11-09T00:29:37","slug":"%e0%b8%84%e0%b9%89%e0%b8%99%e0%b8%ab%e0%b8%b2-address-i2c-%e0%b8%94%e0%b9%89%e0%b8%a7%e0%b8%a2-arduino","status":"publish","type":"post","link":"https:\/\/tom.tomwork.net\/?p=22029","title":{"rendered":"\u0e04\u0e49\u0e19\u0e2b\u0e32 Address I2C \u0e14\u0e49\u0e27\u0e22 Arduino"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/cds.linear.com\/image\/33004.png\" alt=\"\" width=\"550\" height=\"238\" \/><\/p>\n<p>\u0e43\u0e19\u0e1a\u0e32\u0e07\u0e04\u0e23\u0e31\u0e49\u0e07\u0e01\u0e32\u0e23\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d \u0e01\u0e31\u0e1a\u0e2d\u0e38\u0e1b\u0e01\u0e23\u0e13\u0e4c Sensor Module \u0e1a\u0e32\u0e07\u0e0a\u0e19\u0e34\u0e14\u0e21\u0e35\u0e01\u0e32\u0e23\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d \u0e1c\u0e48\u0e32\u0e19 I2C IIC (SCL SDA) \u0e40\u0e0a\u0e48\u0e19 \u0e08\u0e2d\u00a0<a href=\"https:\/\/www.9arduino.com\/product\/26\/i2c-iic-1602-lcd-blue-screen-with-backlight-of-the-lcd-screen\">LCD I2C\/IIC 1602 LCD<\/a>\u00a0\u0e2b\u0e23\u0e37\u0e2d\u00a0<a href=\"https:\/\/www.9arduino.com\/product\/tag\/rtc-arduino\">RTC Arduino<\/a>\u00a0\u0e41\u0e15\u0e48\u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e17\u0e23\u0e32\u0e1a Address \u0e17\u0e35\u0e48\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49\u0e40\u0e23\u0e32\u0e08\u0e30\u0e21\u0e32\u0e19\u0e33\u0e40\u0e2a\u0e19\u0e2d\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32 Address \u0e02\u0e2d\u0e07 I2C \u0e01\u0e31\u0e19\u0e04\u0e23\u0e31\u0e1a \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e43\u0e2b\u0e49\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d \u0e01\u0e31\u0e1a Arduino \u0e44\u0e14\u0e49<\/p>\n<p><strong>\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49\u0e02\u0e2d\u0e22\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07 \u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32 Address \u0e02\u0e2d\u0e07 \u0e08\u0e2d\u00a0<a href=\"https:\/\/www.9arduino.com\/product\/26\/i2c-iic-1602-lcd-blue-screen-with-backlight-of-the-lcd-screen\">LCD I2C\/IIC 1602 LCD<\/a>\u00a0\u0e19\u0e48\u0e30\u0e04\u0e23\u0e31\u0e1a<\/strong><\/p>\n<p><!--more--><\/p>\n<p><strong>\u0e01\u0e32\u0e23\u0e15\u0e48\u0e2d\u0e27\u0e07\u0e08\u0e23<\/strong><\/p>\n<table border=\"0\">\n<tbody>\n<tr>\n<td><strong>Arduino Uno<\/strong><\/td>\n<td><strong>\u00a0Module IIC\/I2C Interface\u00a0<\/strong><\/td>\n<\/tr>\n<tr>\n<td>A4<\/td>\n<td>SDA<\/td>\n<\/tr>\n<tr>\n<td>A5<\/td>\n<td>SCL<\/td>\n<\/tr>\n<tr>\n<td>5V<\/td>\n<td>VCC<\/td>\n<\/tr>\n<tr>\n<td>Gnd<\/td>\n<td>Gnd<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07 Code \u0e17\u0e35\u0e48\u0e43\u0e0a\u0e49\u0e04\u0e49\u0e19\u0e2b\u0e32 I2C<\/strong><\/p>\n<blockquote><p>\/\/ I2C Scanner<\/p>\n<p>\/\/ Written by Nick Gammon<\/p>\n<p>\/\/ Date: 20th April 2011<\/p>\n<p>&nbsp;<\/p>\n<p>#include &lt;Wire.h&gt;<\/p>\n<p>&nbsp;<\/p>\n<p>void setup() {<\/p>\n<p>Serial.begin (9600);<\/p>\n<p>&nbsp;<\/p>\n<p>\/\/ Leonardo: wait for serial port to connect<\/p>\n<p>while (!Serial)<\/p>\n<p>{<\/p>\n<p>}<\/p>\n<p>&nbsp;<\/p>\n<p>Serial.println ();<\/p>\n<p>Serial.println (&#8220;www.9arduino.com &#8230;&#8221;);<\/p>\n<p>Serial.println (&#8220;I2C scanner. Scanning &#8230;&#8221;);<\/p>\n<p>byte count = 0;<\/p>\n<p>&nbsp;<\/p>\n<p>Wire.begin();<\/p>\n<p>for (byte i = 8; i &lt; 120; i++) \u00a0\/\/ Loop \u0e04\u0e49\u0e19\u0e2b\u0e32 Address<\/p>\n<p>{<\/p>\n<p>Wire.beginTransmission (i);<\/p>\n<p>if (Wire.endTransmission () == 0)<\/p>\n<p>{<\/p>\n<p>Serial.print (&#8220;Found address: &#8220;);<\/p>\n<p>Serial.print (i, DEC);<\/p>\n<p>Serial.print (&#8221; (0x&#8221;);<\/p>\n<p>Serial.print (i, HEX);<\/p>\n<p>Serial.println (&#8220;)&#8221;);<\/p>\n<p>count++;<\/p>\n<p>delay (1);<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>Serial.println (&#8220;Done.&#8221;);<\/p>\n<p>Serial.print (&#8220;Found &#8220;);<\/p>\n<p>Serial.print (count, DEC);<\/p>\n<p>Serial.println (&#8221; device(s).&#8221;);<\/p>\n<p>}<\/p>\n<p>void loop() {}<\/p>\n<p>&nbsp;<\/p><\/blockquote>\n<p><strong>\u0e41\u0e2a\u0e14\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e2d\u0e2d\u0e01\u0e21\u0e32<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/do.lnwfile.com\/_\/do\/_raw\/rc\/1v\/sj.jpg\" alt=\"\" \/><\/p>\n<p><strong>\u0e1e\u0e1a 1 Address \u0e04\u0e37\u0e2d 0x3f \u0e04\u0e23\u0e31\u0e1a<\/strong><\/p>\n<p><strong>\u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16 \u0e19\u0e33\u0e44\u0e1b\u0e1b\u0e23\u0e30\u0e22\u0e38\u0e04\u0e43\u0e0a\u0e49\u0e01\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d Sensor Module \u0e17\u0e35\u0e48\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d \u0e1c\u0e48\u0e32\u0e19 I2C \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e2b\u0e32 Address \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e40\u0e15\u0e23\u0e35\u0e22\u0e21\u0e40\u0e02\u0e35\u0e22\u0e19 code \u0e44\u0e14\u0e49\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e16\u0e39\u0e01\u0e15\u0e49\u0e2d\u0e07 \u0e04\u0e23\u0e31\u0e1a<\/strong><\/p>\n<p>\u0e1a\u0e17\u0e04\u0e27\u0e32\u0e21\u0e08\u0e32\u0e01 :\u00a0http:\/\/henrysbench.capnfatz.com\/henrys-bench\/arduino-projects-tips-and-more\/arduino-quick-tip-find-your-i2c-address\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e43\u0e19\u0e1a\u0e32\u0e07\u0e04\u0e23\u0e31\u0e49\u0e07\u0e01\u0e32\u0e23\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d \u0e01\u0e31\u0e1a\u0e2d\u0e38\u0e1b\u0e01\u0e23\u0e13\u0e4c Sensor Module \u0e1a\u0e32\u0e07\u0e0a\u0e19\u0e34\u0e14\u0e21\u0e35\u0e01\u0e32\u0e23\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d \u0e1c\u0e48\u0e32\u0e19 I2C IIC (SCL SDA) \u0e40\u0e0a\u0e48\u0e19 \u0e08\u0e2d\u00a0LCD I2C\/IIC 1602 LCD\u00a0\u0e2b\u0e23\u0e37\u0e2d\u00a0RTC Arduino\u00a0\u0e41\u0e15\u0e48\u0e40\u0e23\u0e32\u0e44\u0e21\u0e48\u0e17\u0e23\u0e32\u0e1a Address \u0e17\u0e35\u0e48\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49\u0e40\u0e23\u0e32\u0e08\u0e30\u0e21\u0e32\u0e19\u0e33\u0e40\u0e2a\u0e19\u0e2d\u0e27\u0e34\u0e18\u0e35\u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32 Address \u0e02\u0e2d\u0e07 I2C \u0e01\u0e31\u0e19\u0e04\u0e23\u0e31\u0e1a \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e43\u0e2b\u0e49\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e15\u0e48\u0e2d \u0e01\u0e31\u0e1a Arduino \u0e44\u0e14\u0e49 \u0e27\u0e31\u0e19\u0e19\u0e35\u0e49\u0e02\u0e2d\u0e22\u0e01\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07 \u0e01\u0e32\u0e23\u0e04\u0e49\u0e19\u0e2b\u0e32 Address \u0e02\u0e2d\u0e07 \u0e08\u0e2d\u00a0LCD I2C\/IIC 1602 LCD\u00a0\u0e19\u0e48\u0e30\u0e04\u0e23\u0e31\u0e1a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"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":[13],"tags":[],"class_list":["post-22029","post","type-post","status-publish","format-standard","hentry","category-13"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6cOVM-5Jj","_links":{"self":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/22029","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=22029"}],"version-history":[{"count":2,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/22029\/revisions"}],"predecessor-version":[{"id":25360,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=\/wp\/v2\/posts\/22029\/revisions\/25360"}],"wp:attachment":[{"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22029"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=22029"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tom.tomwork.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=22029"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}