{"id":3357,"date":"2020-11-17T22:43:34","date_gmt":"2020-11-17T14:43:34","guid":{"rendered":"http:\/\/hardihuang.info\/blog\/?p=3357"},"modified":"2020-11-17T22:43:34","modified_gmt":"2020-11-17T14:43:34","slug":"arduino-nano-pin-a6-and-a7","status":"publish","type":"post","link":"http:\/\/hardihuang.info\/blog\/?p=3357","title":{"rendered":"\u5173\u4e8eArduino nano A6\u3001A7\u7684\u90a3\u4e9b\u4e8b"},"content":{"rendered":"<p>\u5f88\u591a\u65f6\u5019\u7528arduino nano\u505a\u9879\u76ee\uff0c\u90fd\u4f1a\u9047\u5230\u4e00\u4e2a\u5934\u75bc\u7684\u95ee\u9898\uff0c\u90a3\u5c31\u662f\u5f53\u9879\u76ee\u6bd4\u8f83\u590d\u6742\uff0c\u5916\u63a5\u8bbe\u5907\u6bd4\u8f83\u591a\u65f6\uff0c\u5c31\u4f1a\u51fa\u73b0I\\O\u53e3\u4e0d\u591f\u7528\u7684\u60c5\u51b5\uff0c\u8fd9\u65f6\u5019\u6068\u4e0d\u5f97\u628a\u6240\u6709\u7684\u53e3\u90fd\u7528\u4e0a\u3002<!--more--><\/p>\n<p>\u6bd4\u5982\u8fd9\u6b21\u505a\u673a\u68b0\u81c2\u5c0f\u8f66\u9879\u76ee\uff0c\u56db\u4e2a\u9ea6\u8f6e\u7535\u673a\u5c31\u9700\u89818\u4e2aI\/O\u53e3\uff0c5\u4e2a\u8235\u673a\u53c8\u5360\u4e86\u4e94\u4e2a\u53e3\uff0c\u8fd8\u6709\u4e00\u4e2a\u6444\u50cf\u5934\u9700\u8981\u7528\u5230I2C\u5360\u4e86\u4e24\u4e2a\u53e3\uff0c\u518d\u6765\u4e00\u4e2aPS2\u9065\u63a7\u5668\u53c8\u7528\u63894\u4e2a\u53e3\u3002\u52a0\u8d77\u6765\u4e00\u5171\u9700\u898119\u4e2aI\/O\u53e3\uff0cArduino\u7684D2-D13\u52a0\u4e0aA0-A5\u4e00\u5171\u4e5f\u624d18\u4e2a\u53e3\uff0c\u8fd9\u65f6\u5c31\u4e0d\u5f97\u4e0d\u5360\u7528\u5230\u4e32\u53e3\u7684TX\u6216RX\u4e86\uff0c\u4f46\u95ee\u9898\u662f\u5360\u7528\u4e32\u53e3\u540e\uff0c\u5982\u679c\u7a0b\u5e8f\u60f3\u6253\u5370\u4e00\u4e9b\u503c\u5230\u4e32\u53e3\u76d1\u89c6\u5668\u7684\u65f6\u5019\uff0c\u5916\u63a5\u8bbe\u5907\u5f88\u5bb9\u6613\u5e72\u6270\u4fe1\u53f7\uff0c\u5bfc\u81f4\u6570\u636e\u4f20\u8f93\u5931\u8d25\uff0c\u6240\u4ee5\u4e00\u822c\u4e0d\u63a8\u8350\u4f7f\u7528\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/components101.com\/sites\/default\/files\/component_pin\/Arduino-Nano-Pinout.png\" alt=\"See the source image\" \/><\/p>\n<p>Arduino nano\u6bd4uno\u677f\u591a\u4e86\u4e24\u4e2aA6\u548cA7\u7684\u6a21\u62df\u53e3\uff0c\u4f46\u662f\u8fd9\u4e24\u4e2a\u6a21\u62df\u53e3\u786e\u5b9e\u529f\u80fd\u6b8b\u7f3a\u7684\u53e3\uff0c<strong>\u53ea\u652f\u6301\u6a21\u62df\u8f93\u5165\uff0c\u4e5f\u5c31\u662f\u8bf4digitalWrite();<span style=\"font-size: 1rem;\">digitalRead();<\/span>analogWrite(); \u8fd9\u4e09\u4e2a\u5185\u7f6e\u51fd\u6570\u5bf9A6\\A7\u8fd9\u4e24\u4e2a\u53e3\u90fd\u65e0\u6548\uff01<\/strong><\/p>\n<p><a href=\"http:\/\/hardihuang.info\/blog\/wp-content\/uploads\/2020\/11\/2020-11-17_222529.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-large wp-image-3359\" src=\"http:\/\/hardihuang.info\/blog\/wp-content\/uploads\/2020\/11\/2020-11-17_222529-1024x586.png\" alt=\"\" width=\"525\" height=\"300\" srcset=\"http:\/\/hardihuang.info\/blog\/wp-content\/uploads\/2020\/11\/2020-11-17_222529-1024x586.png 1024w, http:\/\/hardihuang.info\/blog\/wp-content\/uploads\/2020\/11\/2020-11-17_222529-300x172.png 300w, http:\/\/hardihuang.info\/blog\/wp-content\/uploads\/2020\/11\/2020-11-17_222529-768x440.png 768w, http:\/\/hardihuang.info\/blog\/wp-content\/uploads\/2020\/11\/2020-11-17_222529.png 1586w\" sizes=\"(max-width: 525px) 100vw, 525px\" \/><\/a><\/p>\n<p>\u7ffb\u9605nano\u677f\u7684\u539f\u7406\u56fe\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u8fd9\u4e24\u4e2a\u53e3\u662f\u4eceatmega328p\u82af\u7247\u4e0a\u7684ADC6\u548cADC7\u5f15\u51fa\u7684\u4e24\u4e2a\u5f15\u811a\uff0c\u5b98\u7f51\u505a\u51fa\u4e86\u5982\u4e0b\u8bf4\u660e\uff1a<\/p>\n<blockquote><p>The analog input pins can be used as digital pins, referred to as A0, A1, etc. The exception is the Arduino Nano, Pro Mini, and Mini\u2019s A6 and A7 pins, which can only be used as analog inputs.<\/p><\/blockquote>\n<p style=\"text-align: right;\"><a href=\"https:\/\/www.arduino.cc\/reference\/en\/language\/functions\/digital-io\/digitalread\/\" target=\"_blank\" rel=\"noopener\">-Arduino.cc<\/a><\/p>\n<p>\u4f46\u662f\u5982\u679c\u6211\u4eec\u771f\u7684\u662fI\/O\u53e3\u4e0d\u591f\u7528\u4e86\u600e\u4e48\u529e\u5462\uff1f\u6211\u4eec\u81f3\u5c11\u53ef\u4ee5\u7528\u5b83\u4eec\u6765\u505a\u4e3a\u6570\u5b57\u8f93\u5165\u53e3\u4f7f\u7528\uff0c\u53ea\u9700\u8981\u81ea\u5df1\u65b0\u5efa\u4e00\u4e2adigitalRead\u51fd\u6570\u5c31\u597d\u4e86\uff1a<\/p>\n<pre><code>bool digitalReadA6(){\r\n    return analogRead(A6)&gt;500? true : false;\r\n}\r\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f88\u591a\u65f6\u5019\u7528arduino nano\u505a\u9879\u76ee\uff0c\u90fd\u4f1a\u9047\u5230\u4e00\u4e2a\u5934\u75bc\u7684\u95ee\u9898\uff0c\u90a3\u5c31\u662f\u5f53\u9879\u76ee\u6bd4\u8f83\u590d\u6742\uff0c\u5916\u63a5\u8bbe\u5907\u6bd4\u8f83\u591a\u65f6\uff0c\u5c31\u4f1a\u51fa\u73b0I\\O\u53e3\u4e0d\u591f\u7528\u7684\u60c5\u51b5\uff0c\u8fd9\u65f6\u5019\u6068\u4e0d\u5f97\u628a\u6240\u6709\u7684\u53e3\u90fd\u7528\u4e0a\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"http:\/\/hardihuang.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3357"}],"collection":[{"href":"http:\/\/hardihuang.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hardihuang.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hardihuang.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hardihuang.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3357"}],"version-history":[{"count":3,"href":"http:\/\/hardihuang.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3357\/revisions"}],"predecessor-version":[{"id":3361,"href":"http:\/\/hardihuang.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3357\/revisions\/3361"}],"wp:attachment":[{"href":"http:\/\/hardihuang.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hardihuang.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3357"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hardihuang.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}