{"id":868,"date":"2016-05-05T11:17:05","date_gmt":"2016-05-05T03:17:05","guid":{"rendered":"https:\/\/www.webteach.tw\/?p=868"},"modified":"2016-05-05T11:17:05","modified_gmt":"2016-05-05T03:17:05","slug":"arduino-1602-lcd-%e6%b6%b2%e6%99%b6%e9%a1%af%e7%a4%ba","status":"publish","type":"post","link":"https:\/\/www.webteach.tw\/?p=868","title":{"rendered":"[ Arduino ] \u2013 1602 LCD \u6db2\u6676\u986f\u793a"},"content":{"rendered":"<p>\t\t\t\t2016-10-11 \u66f4\u65b0<br \/>\nArduino Yun SDA SCL \u8173\u4f4d\u4e0d\u662f\u7528 A4 A5 \u800c\u662fPIN 2 PIN 3 \u6216\u662f\u76f4\u63a5\u4f7f\u7528\u6a5f\u677f\u4e0a\u5f15\u51fa\u7684 SDA SCL\u8173\u4f4d\u7686\u53ef\u3002<br \/>\n1.\u4e0b\u8f09\u65b0\u7248lcd\u63a7\u5236\u51fd\u5f0f I2C<br \/>\n<a href=\"https:\/\/github.com\/marcoschwartz\/LiquidCrystal_I2C\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/github.com\/marcoschwartz\/LiquidCrystal_I2C<\/a><br \/>\n2.\u8173\u4f4d SDA \u63a5 A4<br \/>\n       SCL \u63a5 A5<br \/>\n       GND \u63a5 GND<br \/>\n       VCC \u63a5 5V (\u63a53.3V\u96fb\u6703\u4e0d\u5920\u7528 \u986f\u793a\u5c31\u6703\u5f88\u6de1)<br \/>\n3.\u8abf\u6574\u986f\u793a\u53ef\u8b8a\u96fb\u7d44(\u986f\u793a\u5c0d\u6bd4) \u5f8c\u65b9\u85cd\u8272\u65b9\u584a \u5411\u5de6\u8f49\u662f\u8b8a\u6de1 \u5411\u53f3\u8f49\u8b8a\u6df1<br \/>\n[javascript]<br \/>\n#include &lt;LiquidCrystal_I2C.h&gt;<br \/>\nLiquidCrystal_I2C lcd(0x27,16,2);<br \/>\nvoid setup() {<br \/>\n  \/\/ put your setup code here, to run once:<br \/>\n  lcd.init();\/\/\u521d\u59cb\u5316LCD<br \/>\n  lcd.backlight();\/\/\u662f\u5426\u958b\u555f\u80cc\u5149<br \/>\n  lcd.setCursor(2,0);\/\/\u8a2d\u5b9a\u6e38\u6a19\u4f4d\u7f6e<br \/>\n  lcd.print(&quot;Hello World!&quot;);\/\/\u5beb\u5165\u5b57\u4e32<br \/>\n}<br \/>\nvoid loop() {<br \/>\n  \/\/ put your main code here, to run repeatedly:<br \/>\n}<br \/>\n[\/javascript]\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2016-10-11 \u66f4\u65b0 Arduino Yun&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[65,359],"class_list":["post-868","post","type-post","status-publish","format-standard","hentry","category-arduino","tag-65","tag-lcd"],"_links":{"self":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/868","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=868"}],"version-history":[{"count":0,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=\/wp\/v2\/posts\/868\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=868"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=868"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webteach.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=868"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}