{"id":12036,"date":"2017-03-12T00:00:00","date_gmt":"2017-03-11T16:00:00","guid":{"rendered":"https:\/\/fgchen.com\/wpedu2\/2017\/03\/12\/mblok-arduino%ef%bc%8c%e8%ae%93-mearm%e6%a9%9f%e6%a2%b0%e6%89%8b%e8%87%82%e5%8b%95%e8%b5%b7%e4%be%86\/"},"modified":"2026-03-30T14:50:48","modified_gmt":"2026-03-30T06:50:48","slug":"mblok-arduino%ef%bc%8c%e8%ae%93-mearm%e6%a9%9f%e6%a2%b0%e6%89%8b%e8%87%82%e5%8b%95%e8%b5%b7%e4%be%86","status":"publish","type":"post","link":"https:\/\/fgchen.com\/wpedu\/2017\/03\/mblok-arduino%ef%bc%8c%e8%ae%93-mearm%e6%a9%9f%e6%a2%b0%e6%89%8b%e8%87%82%e5%8b%95%e8%b5%b7%e4%be%86\/","title":{"rendered":"mBlok+ Arduino\uff0c\u8b93 meArm\u6a5f\u68b0\u624b\u81c2\u52d5\u8d77\u4f86"},"content":{"rendered":"<p class=\"comments-section\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-medium\" src=\"https:\/\/chenfuguo.gitbooks.io\/arduino\/content\/myArm.jpg\" width=\"4000\" height=\"3000\" \/><\/p>\n\n<p class=\"comments-section\">MeArm\u662f\u4e00\u500b\u6241\u5e73\u8a2d\u8a08\u7684\u6a5f\u5668\u624b\u81c2\u5957\u4ef6\uff0c\u53ea\u9700\u8981\u4e00\u652f\u8d77\u5b50\u548c\u5c0d\u4e8b\u7269\u71b1\u60c5\u7684\u5fc3\u5373\u53ef\u4ee5\u5b8c\u6210MeArm\u7684\u7d44\u88dd\uff0cMeArm\u80fd\u5920\u5e36\u4f60\u9032\u5165\u7a0b\u5f0f\u8a2d\u8a08\u3001\u96fb\u5b50\u3001\u6a5f\u5668\u4eba\u548c\u5de5\u7a0b\u7684\u4e16\u754c\uff0cLifehacker\u7db2\u7ad9\u63cf\u8ff0MeArm\u662f\u5c0d\u521d\u5b78\u8005\u4e00\u500b\u5b8c\u7f8e\u7684Arduino\u5c08\u6848\u3002<\/p>\n\n<p class=\"comments-section\">MyArm\u662f\u6211\u5011\u6839\u64da<a href=\"https:\/\/www.mearm.com\/\" target=\"_blank\" rel=\"noopener noreferrer\">MeArm<\/a>\u7684\u958b\u6e90\u5716\uff0c\u52a0\u4e0a\u70ba\u672c\u5730\u5b78\u7ae5\u7cbe\u5fc3\u5efa\u9020\u7684\u6559\u5b78\u5957\u4ef6\uff0c\u521d\u968e\u7248\u672c\u5305\u62ec\u6a5f\u68b0\u624b\u81c2\u3001\u96fb\u8def\u677f\u3001\u96d9\u6416\u687f\uff0c\u9032\u968e\u7248\u672c\u5247\u52a0\u4e0a\u7d05\u5916\u7dda\u9059\u63a7\u63a7\u5236\u3001\u85cd\u82bd\u8207\u624b\u6a5f\u63a7\u5236\u3001\u7121\u7ddaWiFi\u7269\u806f\u7db2\u7684\u529f\u80fd\uff0c\u521d\u968e\u7248\u672c\u5728\u65bc\u5e36\u9818\u521d\u5b78\u8005\u9032\u5165MyArm\u7684\u4e16\u754c\uff0c\u900f\u904e\u96d9\u6416\u687f\u4f86\u63a7\u5236\u6a5f\u68b0\u624b\u81c2\u7684\u56db\u9846\u4f3a\u670d\u99ac\u9054\uff0c\u53ef\u5b8c\u6210\u624b\u81c2\u7684\u4e09\u500b\u7dad\u5ea6\u7684\u904b\u52d5\uff0c\u4ee5\u53ca\u6a5f\u68b0\u624b\u81c2\u722a\u5b50\u7684\u52d5\u4f5c\u3002<\/p>\n\n<p class=\"comments-section\">\u7d05\u5916\u7dda\u9059\u63a7\u7248\u672c\uff0c\u53ef\u8b93\u6211\u5011\u7528\u7d05\u5916\u7dda\u9059\u63a7\u5668\u63a7\u5236\u6a5f\u68b0\u624b\u81c2\uff0c\u85c9\u6b64\u6211\u5011\u53ef\u4ee5\u5b78\u7fd2\u7d05\u5916\u7dda\u9059\u63a7\u7684\u539f\u7406\u8207\u64cd\u4f5c\uff0c\u6211\u5011\u4e5f\u53ef\u4ee5\u7528\u5bb6\u96fb\u7684\u9059\u63a7\u5668\u4f86\u505a\u70ba\u63a7\u5236\u5668\uff0c\u751a\u81f3\u900f\u904e\u624b\u6a5f\u5229\u7528\u4e00\u500b\u7d05\u5916\u7dda\u767c\u5c04\u5668\uff0c\u5c31\u53ef\u4ee5\u505a\u6210\u4e00\u500b\u5f37\u5927\u7684\u7d05\u5916\u7dda\u9059\u63a7\u5668\uff0c\u63a7\u5236\u6240\u6709\u5bb6\u4e2d\u7684\u96fb\u5668\u8a2d\u5099\uff0c\u50cf\u662f\u96fb\u8996\u3001\u51b7\u6c23\u6a5f\u7b49\u3002<\/p>\n\n<p class=\"comments-section\">\u85cd\u82bd\u8207\u624b\u6a5f\u63a7\u5236\u7248\u672c\u5247\u662f\u5229\u7528\u667a\u6167\u578b\u624b\u6a5f\u5167\u5efa\u7684\u85cd\u82bd\uff0c\u4f86\u9023\u7d50\u6a5f\u68b0\u624b\u81c2\uff0c\u900f\u904e\u6b64\u7248\u672c\uff0c\u6211\u5011\u53ef\u4ee5\u5b78\u7fd2\u5982\u4f55\u5728\u624b\u6a5f\u6216\u5e73\u677f\u4e0a\u8a2d\u8a08\u7a0b\u5f0f\u3002<\/p>\n\n<p class=\"comments-section\">\u7121\u7ddaWiFi\u7248\u672c\u5247\u662f\u56e0\u61c9\u73fe\u4eca\u6700\u592f\u7684\u7269\u806f\u7db2\u79d1\u6280\uff0c\u6b64\u7248\u672c\u53ef\u4ee5\u900f\u904eWeb\u5c0d\u6a5f\u68b0\u624b\u81c2\u9032\u884c\u63a7\u5236\uff0c\u53ef\u5be6\u73fe\u9060\u7aef\u9059\u63a7\u6a5f\u68b0\uff0c\u4efb\u4f55\u60f3\u8981\u5b78\u7fd2\u7269\u806f\u7db2\u79d1\u6280\u7684\u4e0d\u80fd\u932f\u904e\u6b64\u4e00\u7248\u672c\u3002<\/p>\n\n<p class=\"comments-section\">\u672c\u6559\u5b78\u662f\u6211\u5011\u70ba\u4e86\u672c\u5730\u5b78\u7ae5\u6240\u5efa\u7acb\u7684\u5b8c\u6574\u4e2d\u6587\u5b78\u7fd2\u8cc7\u6e90\uff0c\u5e0c\u671b\u8b93\u5927\u5bb6\u5920\u900f\u904eMyArm\u9032\u5165\u5275\u5ba2\u7684\u4e16\u754c\u3002<\/p>\n\n<img decoding=\"async\" class=\"alignnone size-medium\" src=\"https:\/\/yuanyouyuan.gitbooks.io\/linkit-smart-7688-guide\/content\/chap3\/pic\/sg90.jpg\" width=\"550\" height=\"400\" \/>\n<img decoding=\"async\" class=\"alignnone \" src=\"http:\/\/2.bp.blogspot.com\/-p7fU0wa0yHU\/VKnBPT1vwgI\/AAAAAAAAAIs\/gauXk9a2rhg\/s1600\/sg90wiring.jpg\" width=\"381\" height=\"354\" \/>\n<strong><span style=\"font-size: 18pt\">\u55ae\u4e00\u99ac\u9054\u6e2c\u8a66<\/span><\/strong>\n<strong><span style=\"font-size: 18pt\">mBlock\uff1a(<a href=\"http:\/\/192.192.246.169\/~wells\/Downloads\/Motor.sb2\">\u7a0b\u5f0f\u4e0b\u8f09<\/a>)<\/span><\/strong>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4647\" src=\"http:\/\/www.fgchen.com\/wp\/wp-content\/uploads\/2017\/03\/Servo-mBlock.png\" alt=\"\" width=\"555\" height=\"578\" \/>\n<strong><span style=\"font-size: 18pt\">Arduino IDE (<a href=\"http:\/\/192.192.246.169\/~wells\/Downloads\/servo.ino\">\u7a0b\u5f0f\u4e0b\u8f09<\/a>)<\/span><\/strong>\n\n<pre class=\"theme:vs2012-black lang:c# decode:true \">\/*\n\u99ac\u9054\u7684\u63a5\u6cd5Vcc\u63a5Arduino\u677f\u5b50\u7684Vin\uff0cGND\u63a5\u677f\u5b50GND\uff0c\u8a0a\u865f\u7dda\u63a55\u30019\u300110\u300111\uff0c\u5176\u4e2d\u4e4b1\u3002\ndegree: \u99ac\u9054\u7684\u65cb\u8f49\u89d2\u5ea6(45~135)\nPM\uff1a1\u6216-1\uff0c\u4ee5\u7528\u63a7\u5236degree\u7684\u503c\u662f\u52a0\u4e0a15(\u89d2\u5ea6\u7684\u8b8a\u5316)\u9084\u662f15\u3002\n\u7a0b\u5f0f\u5224\u65b7\u82e5degree\u503c\u7b49\u65bc45\u6642\uff0c\u8b93PM\u70ba1\uff0c\u4f7f\u5f97degree\u7d2f\u52a015\n\u82e5\u7b49\u65bc135\u6642\uff0c\u8b93PM=-1\uff0c\u4f7f\u5f97degree\u503c\u905e\u6e1b15\n *\/\n#include &lt;Servo.h&gt;\nServo motor; \/\/\u5b9a\u7fa9\u99ac\u9054\u8b8a\u6578(\u7269\u4ef6)\nvoid setup() {\n  \/\/ put your setup code here, to run once:\n  motor.attach(9); \/\/\u8a2d\u5b9a\u99ac\u9054\u8a0a\u865f\u8173\u9023\u63a5\u81f3Arduino\u677f\u5b50\u7684\u6578\u4f4d\u63a5\u81739\n}\nint pm = 1;\nint degree = 45;\nvoid loop() {\n  \/\/ put your main code here, to run repeatedly:\n  motor.write(degree); \/\/\u8b93\u99ac\u9054\u8f49\u81f3degree\u89d2\u5ea6\n  delay(300); \/\/\u99ac\u9054\u82e5\u4ee5\u9ad8\u901f\u65b9\u5f0f\u65cb\u8f49\u6703\u71d2\u6bc0\uff0c\u5fc5\u9808\u52a0\u4e0a\u5ef6\u9072\uff0c\u9019\u908a\u55ae\u4f4d\u662f\u6beb\u79d2\uff0c\u4e5f\u5c31\u662f1\/1000\u79d2\u3002\n  if (degree == 45) {\n    pm = 1;\n  }\n  if (degree == 135) {\n    pm = -1;\n  }\n  degree = degree + (pm * 15); \/\/\u8b8a\u5316degree\uff0c\n}<\/pre>\n\n<strong><span style=\"font-size: 18pt\">\u56db\u9846\u99ac\u9054\u7684\u63a7\u5236-mBlock\u53c3\u8003\uff1a<\/span><\/strong>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4599\" src=\"http:\/\/www.fgchen.com\/wp\/wp-content\/uploads\/2017\/03\/meArm.png\" alt=\"\" width=\"538\" height=\"468\" \/>\n\u53c3\u8003\u8cc7\u6599\uff1a\n1\uff0eArduino: MeArm \u8207\u96d9\u6416\u687f\uff0c<a href=\"http:\/\/gsyan888.blogspot.tw\/2014\/11\/arduino-mearm-dual-joystick.html\">http:\/\/gsyan888.blogspot.tw\/2014\/11\/arduino-mearm-dual-joystick.html<\/a>\n2\uff0e<a title=\"Permanent Link: mblock\u7b2c\u5341\u4e00\u8ab2(\u4f3a\u670d\u99ac\u9054)\" href=\"http:\/\/blog.ilc.edu.tw\/blog\/blog\/868\/post\/103154\/605139\" rel=\"bookmark\">mblock\u7b2c\u5341\u4e00\u8ab2(\u4f3a\u670d\u99ac\u9054)<\/a>\n&nbsp;","protected":false},"excerpt":{"rendered":"<p>MeArm\u662f\u4e00\u500b\u6241\u5e73\u8a2d\u8a08\u7684\u6a5f\u5668\u624b\u81c2\u5957\u4ef6\uff0c\u53ea\u9700\u8981\u4e00\u652f\u8d77\u5b50\u548c\u5c0d\u4e8b\u7269\u71b1\u60c5\u7684\u5fc3\u5373\u53ef\u4ee5\u5b8c\u6210 &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","fifu_image_url":"","fifu_image_alt":"","footnotes":""},"categories":[266],"tags":[104,105,106,107],"class_list":["post-12036","post","type-post","status-publish","format-standard","hentry","category-266","tag-arduino","tag-mblock","tag-mearm","tag-scratch"],"_links":{"self":[{"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/posts\/12036","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/comments?post=12036"}],"version-history":[{"count":1,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/posts\/12036\/revisions"}],"predecessor-version":[{"id":13414,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/posts\/12036\/revisions\/13414"}],"wp:attachment":[{"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/media?parent=12036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/categories?post=12036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fgchen.com\/wpedu\/wp-json\/wp\/v2\/tags?post=12036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}