{"id":8112,"date":"2020-11-19T00:00:21","date_gmt":"2020-11-18T15:00:21","guid":{"rendered":"https:\/\/techclass.wfjydl.com\/?p=8112"},"modified":"2022-03-08T15:19:25","modified_gmt":"2022-03-08T07:19:25","slug":"arduino%e5%85%ad%e8%b6%b3%e6%9c%ba%e5%99%a8%e4%ba%ba%e7%ac%ac%e4%ba%8c%e9%83%a8%e5%88%86%ef%bc%9a%e7%bc%96%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/how-tos\/arduino\/arduino-hexapod-part-2-programming","title":{"rendered":"Arduino\u516d\u8db3\u673a\u5668\u4eba\u7b2c\u4e8c\u90e8\u5206\uff1a\u7f16\u7a0b"},"content":{"rendered":"<p><script type=\"text\/javascript\" src=\"https:\/\/ssl-cache.stream.ne.jp\/www50\/eqa194obdo\/jmc_pub\/jmc_swf\/player\/t3\/if.js\" charset=\"UTF-8\"><\/script><\/p>\n<div class=\"\u201cthe_content_wrapper\u201d\">\n\u8fd9\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8e<a href=\"https:\/\/www.deviceplus.com\/\">DevicePlus.com<\/a>\u82f1\u8bed\u7f51\u7ad9\u7684\u7ffb\u8bd1\u7a3f\u3002<\/p>\n<p class=\"p1\"><a href=\"https:\/\/techclass.wfjydl.com\/knowledge\/tech-info\/how-tos\/arduino\/how-to-arduino-hexapod-part-1-mechanics-and-wiring\"><span class=\"s1\"><b>\u70b9\u51fb\u6b64\u5904\u9605\u8bfb\u672c\u6587\u7b2c\u4e00\u90e8\u5206 &gt;<\/b><\/span><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4377\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image02.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"394\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image02.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image02-300x169.jpg 300w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image02-260x146.jpg 260w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image02-50x28.jpg 50w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image02-133x75.jpg 133w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p><span style=\"font-weight: 400;\">\u5728\u672c\u9879\u76ee\u7684\u7b2c\u4e8c\u90e8\u5206\u4e2d\uff0c\u6211\u4eec\u5c06\u7ee7\u7eed\u8fdb\u884c\u9879\u76ee\u4e2d\u76f8\u5bf9\u5bb9\u6613\u7684\u5185\u5bb9\u2014\u7f16\u7a0b\u3002\u5bf9\u516d\u8db3\u673a\u5668\u4eba\u8fdb\u884c\u7f16\u7a0b\u901a\u5e38\u6709\u4e24\u79cd\u4e0d\u540c\u7684\u65b9\u6cd5\u3002\u7b2c\u4e00\u79cd\u662f\u4ec5\u4ec5\u5f04\u6e05\u695a\u673a\u5668\u4eba\u5411\u524d\u884c\u8d70\u7684\u4e00\u7cfb\u5217\u4f3a\u670d\u8fd0\u8f6c\u3002\u663e\u7136\uff0c\u8fd9\u662f\u4e00\u4e2a\u8270\u96be\u5374\u9c9c\u89c1\u6210\u6548\u7684\u5de5\u4f5c\u2014\u60a8\u6240\u8bbe\u8ba1\u7684\u4ee3\u7801\u65e0\u6cd5\u76f4\u63a5\u5e94\u7528\u4e8e\u53e6\u4e00\u53f0\u516d\u8db3\u673a\u5668\u4eba\u4e0a\u3002\u6240\u4ee5\u7b2c\u4e8c\u79cd\u88ab\u79f0\u4e3a<\/span><i><span style=\"font-weight: 400;\">\u9006\u8fd0\u52a8\u5b66<\/span><\/i><span style=\"font-weight: 400;\">\u7684\u65b9\u6cd5\u5e94\u8fd0\u800c\u751f\u3002\u4f46\u662f\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u6539\u8fdb\u677f\u8f7d\u5fae\u63a7\u5236\u5668\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2>\u786c\u4ef6<\/h2>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u2022\tArduino Mega<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u2022\tAdafruit 16\u901a\u9053PWM\u6269\u5c55\u677f\uff08\u6216\u6a21\u5757\uff1b\u4f46\u662f\uff0c\u6b64\u5904\u5f3a\u70c8\u5efa\u8bae\u4f7f\u7528\u8be5\u6269\u5c55\u677f\uff0c\u56e0\u4e3a\u5b83\u7684\u539f\u578b\u9762\u79ef\u5f88\u5c0f\uff09<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u2022\t12\u4e2a\u5e26\u6709\u91d1\u5c5e\u9f7f\u8f6e\u7684\u5fae\u578b\u4f3a\u670d\uff08MG90S\u6216\u5176\u4ed6\u540c\u7b49\u89c4\u683c\u4ea7\u54c1\uff09<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u2022\t4.8V\u62166V\u7535\u6c60\uff08\u954d\u6c22\u3001\u9502\u79bb\u5b50\u7b49\uff09<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u2022\t60\u4e2aM3\u87ba\u6813+120\u4e2a\u87ba\u6bcd\u548c\u57ab\u5708\uff08\u4ec5\u7528\u4e8e\u8eab\u4f53\uff0c\u5bf9\u4e8e\u5176\u4ed6\u90e8\u4ef6\u7684\u5b89\u88c5\u60a8\u9700\u8981\u518d\u53e6\u5916\u6dfb\u52a0\uff09<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u2022\t6\u4e2a\u76f8\u540c\u7684\u5706\u73e0\u7b14\u5f39\u7c27<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u2022\tHC-SR04\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u6a21\u5757\uff08\u53ef\u9009\uff09<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>\u8f6f\u4ef6<\/h2>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">\u2022\tArduino IDE<\/span><\/li>\n<li style=\"font-weight: 400;\">\u2022\t<a href=\"https:\/\/github.com\/Gipsonek\/ArduPod\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">Github<\/span><\/a><span style=\"font-weight: 400;\"> \u2013 \u60a8\u5728\u8fd9\u91cc\u53ef\u4ee5\u627e\u5230\u6240\u6709\u7528\u4e8e\u6253\u5370\u7684 Arduino\u6e90\u4ee3\u7801\u548c3D\u6a21\u578b<\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2>UNO -&gt; Mega<\/h2>\n<p><span style=\"font-weight: 400;\">\u5728\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5efa\u8bae\u5728\u672c\u9879\u76ee\u4e2d\u4f7f\u7528Arduino UNO\u3002\u4f46\u662f\uff0c\u5728\u4f7f\u7528UNO\u65f6\u6211\u9047\u5230\u4e86\u4e00\u4e2a\u95ee\u9898\uff1a\u5b83\u6ca1\u6709\u8db3\u591f\u7684SRAM\u5185\u5b58\u6765\u8fdb\u884c\u9006\u8fd0\u52a8\u5b66\u6a21\u578b\u6b63\u5e38\u8fd0\u884c\u65f6\u6240\u9700\u7684\u6240\u6709\u8ba1\u7b97\u3002\u8fd9\u4e9b\u8ba1\u7b97\u5927\u591a\u6570\u662f\u7528<\/span><i><span style=\"font-weight: 400;\">\u6d6e\u70b9\u6570<\/span><\/i><span style=\"font-weight: 400;\">\u6765\u5b8c\u6210\u7684\u3002\u6bcf\u4e2a\u6570\u5b57\u5728\u4f7f\u7528\u65f6\u5c06\u5360\u75284\u4e2a\u5b57\u8282\u7684\u5185\u5b58\uff0c\u662f\u6574\u578b\u7684\u4e24\u500d\u3002\u867d\u7136\u770b\u8d77\u6765\u4e0d\u591a\uff0c\u4f46\u662fUNO\u53ea\u67092kB\u7684RAM\uff0c\u5176\u4e2d\u4e00\u4e9b\u8fd8\u4f1a\u88ab\u5168\u5c40\u53d8\u91cf\u5360\u7528\u3002\u5982\u679c\u6211\u4eec\u4e3a\u6240\u6709\u5168\u5c40\u53d8\u91cf\u548c\u5176\u4ed6\u5c40\u90e8\u53d8\u91cf\u4fdd\u75590.5kB\uff0c\u90a3\u4e48\u5c06\u5269\u4e0b1.5kB\u7684\u53ef\u7528\u5185\u5b58\uff0c\u8fd9\u4ec5\u80fd\u4f9b384\u4e2a\u6d6e\u70b9\u6570\u5360\u7528\u3002384\u53ef\u80fd\u770b\u8d77\u6765\u633a\u591a\uff0c\u4f46\u662f\u5bf9\u4e8e1K\u6a21\u578b\u6240\u4ea7\u751f\u7684\u6570\u636e\u91cf\u662f\u4e0d\u591f\u7684\uff08\u8bf7\u9605\u8bfb\u4e0b\u9762\u7684\u201c<\/span><b>\u7b97\u6cd5<\/b><span style=\"font-weight: 400;\">\u201d\u90e8\u5206\u627e\u5230\u76f8\u5173\u539f\u56e0\uff09\u3002\u6240\u4ee5\u6211\u4eec\u5fc5\u987b\u60f3\u529e\u6cd5\u83b7\u53d6\u66f4\u5927\u7684\u5185\u5b58\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u5b9e\u73b0\u8be5\u76ee\u7684\u6700\u7b80\u5355\u7684\u529e\u6cd5\u662f\u5c06UNO\u66f4\u6539\u4e3aMEGA\u3002MEGA\u548cUNO\u662f\u517c\u5bb9\u7684\uff0c\u6240\u4ee5\u5bf9\u4e8e\u539f\u7406\u56fe\u4e0d\u7528\u8fdb\u884c\u4fee\u6539\u3002\u53e6\u5916\uff0c\u4f7f\u7528MEGA\u4e0d\u4ec5\u53ef\u4ee5\u4e3a\u8ba1\u7b97\u90e8\u5206\u83b7\u53d6\u56db\u500d\u591a\u7684RAM\uff0c\u8fd8\u610f\u5473\u7740\u5c06\u6709\u516b\u500d\u4ee5\u4e0a\u7684\u95ea\u5b58\u53ef\u7528\u4e8e\u6211\u4eec\u7684\u7a0b\u5e8f\u5b58\u50a8\u3002\u6211\u4eec\u5f88\u53ef\u80fd\u4e0d\u4f1a\u6240\u6709\u90fd\u7528\u5230\uff0c\u4f46\u662f\u6709\u66f4\u5927\u7684\u9884\u7559\u7a7a\u95f4\u603b\u662f\u597d\u7684\u3002\u4ee5\u4e0b\u662f\u6539\u8fdb\u540e\u7684Fritzing\u539f\u7406\u56fe\uff0c\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662fArduino MEGA\u6700\u65b0\u7248\u672c (Rev 3)\uff0c\u66f4\u6362\u7684\u8fc7\u7a0b\u5f88\u7b80\u5355\uff0c\u8ddf\u65ad\u5f00UNO\u4e4b\u540e\u8fde\u63a5MEGA\u7684\u8fc7\u7a0b\u4e00\u6837\u3002\u4e0b\u9762\u793a\u610f\u56fe\u4ee5\u4f9b\u53c2\u8003\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_4380\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4380\" class=\"size-full wp-image-4380\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image05.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"672\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image05.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image05-300x288.jpg 300w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image05-152x146.jpg 152w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image05-50x48.jpg 50w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image05-78x75.jpg 78w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4380\" class=\"wp-caption-text\">\u56fe1\uff1aPWM\u6269\u5c55\u677f\u6539\u8fdb\u540e\u539f\u7406\u56fe<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_4386\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4386\" class=\"size-full wp-image-4386\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image11.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"552\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image11.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image11-300x237.jpg 300w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image11-185x146.jpg 185w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image11-50x39.jpg 50w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image11-95x75.jpg 95w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4386\" class=\"wp-caption-text\">\u56fe2\uff1aPWM\u6a21\u5757\u548cHC-SR04\u8d85\u58f0\u6ce2\u4f20\u611f\u5668\u6539\u8fdb\u540e\u539f\u7406\u56fe<\/p>\n<\/div>\n<p><span style=\"font-weight: 400;\">\u73b0\u5728\uff0c\u6211\u4eec\u6765\u63a2\u7a76\u4e00\u4e9b\u7269\u7406\u539f\u7406\u3001\u6240\u7528\u5230\u7684\u5927\u91cf\u6570\u5b66\u77e5\u8bc6\u4ee5\u53ca\u5c11\u91cf\u4ee3\u7801\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2>\u9006\u8fd0\u52a8\u5b66\u7b80\u4ecb<\/h2>\n<p><span style=\"font-weight: 400;\">\u53ef\u80fd\u6709\u4e9b\u4eba\u8fd8\u8bb0\u5f97\uff0c\u5728\u9ad8\u4e2d\u7684\u65f6\u5019\uff0c\u7269\u7406\u8bfe\u4e2d\u6709\u4e00\u90e8\u5206\u5185\u5bb9\u53eb\u505a\u201c\u8fd0\u52a8\u5b66\u201d\u3002\u7b80\u5355\u5730\u8bf4\uff0c\u8fd9\u662f\u529b\u5b66\u9886\u57df\u4e2d\u5bf9\u4e00\u4e2a\u76ee\u6807\u5bf9\u8c61\uff08\u6216\u4e00\u4e2a\u70b9\uff09\u8fd0\u52a8\u7684\u63cf\u8ff0\u3002\u8fd9\u610f\u5473\u7740\u5728\u8fd0\u52a8\u5b66\u4e2d\uff0c\u60a8\u5c06\u4f7f\u7528\u6570\u5b66\u516c\u5f0f\u548c\u6a21\u578b\u6765\u5bf9\u5355\u4e2a\u70b9\u7684\u5df2\u77e5\u8fd0\u52a8\u8fdb\u884c\u5206\u6790\u3002\u987e\u540d\u601d\u4e49\uff0c\u9006\u8fd0\u52a8\u5b66\uff08IK\uff09\u6070\u6070\u76f8\u53cd\uff1a\u901a\u8fc7\u4e00\u7cfb\u5217\u6570\u5b66\u516c\u5f0f\u6765\u53cd\u63a8\u5e76\u521b\u5efa\u8fd0\u52a8\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u5728\u673a\u5668\u4eba\u9886\u57df\uff0c\u901a\u5e38\u4f7f\u7528\u7684\u7b97\u6cd5\u53ea\u80fd\u6839\u636e\u76f8\u5e94\u7684\u7aef\u70b9\u8fd0\u52a8\u6765\u8ba1\u7b97\u6240\u6709\u5173\u8282\u7684\u8fd0\u52a8\u3002\u73b0\u5728\uff0c\u60a8\u53ef\u4ee5\u6e05\u695a\u5730\u770b\u5230\u9006\u8fd0\u52a8\u5b66\u5728\u4f3a\u670d\u8fd0\u52a8\u7f16\u7a0b\u90e8\u5206\u7684\u96be\u9898\u4e0a\u6240\u5177\u6709\u7684\u4f18\u52bf\u2014\u2014\u5b83\u662f\u53ef\u4ee5\u901a\u7528\u7684\u3002\u4ece\u7406\u8bba\u4e0a\u6765\u8bf4\uff0c\u4ec5\u4e00\u4e2a\u7b97\u6cd5\u5c31\u53ef\u4ee5\u5904\u7406\u673a\u5668\u4eba\u6240\u6267\u884c\u7684\u4efb\u4f55\u8fd0\u52a8\u3002\u4ece\u4f7f\u7528\u8005\u7684\u89d2\u5ea6\u6765\u8bf4\uff0c\u5b83\u975e\u5e38\u6613\u4e8e\u4f7f\u7528\u2014\u60a8\u53ea\u9700\u8981\u544a\u8bc9\u673a\u5668\u4eba\u5411\u5de6\u8f6c90\u00b0\uff0c\u7136\u540e\u76f4\u884c1\u7c73\u5c31\u53ef\u4ee5\u4e86\uff0c\u800c\u4e0d\u5fc5\u8003\u8651\u6bcf\u4e2a\u4f3a\u670d\u7684\u4f4d\u7f6e\u3002<\/span><\/p>\n<h2><b>\u6a21\u578b<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">\u5728\u4ee5\u4e0a\u6bb5\u843d\u4e2d\uff0c\u4e00\u4e2a\u8bcd\u4e0d\u65ad\u51fa\u73b0\uff1a\u4e00\u4e2a\uff08\u6570\u5b66\uff09\u6a21\u578b\u3002\u867d\u7136\u542c\u8d77\u6765\u5f88\u96be\uff0c\u4f46\u662f\u5bf9\u4e8e\u516d\u8db3\u673a\u5668\u4eba\u8fd9\u4e2a\u9879\u76ee\u6765\u8bf4\uff0c\u6a21\u578b\u975e\u5e38\u7b80\u5355\uff1a\u673a\u5668\u4eba\u80fd\u591f\u673a\u68b0\u6027\u7684\u6240\u8fbe\u5230\u7684\u4efb\u4f55\u4f4d\u7f6e\u90fd\u53ef\u4ee5\u7531\u4e00\u7ec4\u4e03\u4e2a\u70b9\u6765\u5b9a\u4e49\u3002\u4e00\u4e2a\u7528\u4e8e\u8eab\u4f53\uff0c\u53e6\u5916\u516d\u4e2a\u7528\u4e8e\u817f\u90e8\u3002\u5982\u679c\u60a8\u67e5\u770b\u4e86AP_Utils\u5e93\uff08\u53ef\u5728 <\/span><a href=\"https:\/\/github.com\/Gipsonek\/ArduPod\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">GitHub<\/span><\/a><span style=\"font-weight: 400;\"> \u4e0a\u83b7\u53d6\uff09\uff0c\u7279\u522b\u662f\u91cc\u9762\u7684AP_Utils.h\uff0c\u5c31\u4f1a\u770b\u5230\u5173\u4e8e\u8fd9\u4e9b\u70b9\u7684\u5b9a\u4e49\uff08\u5305\u542b\u5728\u5176\u4ed6\u5185\u5bb9\u4e2d\uff09\uff1a<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: white; font-weight: 400; background-color: black;\"><br \/>\nstruct body {<br \/>\nfloat x;<br \/>\nfloat y;<br \/>\nfloat z;<br \/>\nfloat facing;<br \/>\n};<\/span><\/p>\n<p><span style=\"color: white; font-weight: 400; background-color: black;\"><br \/>\nstruct leg {<br \/>\nuint8_t number;<br \/>\nbool move;<br \/>\nfloat phi;<br \/>\nfloat z;<br \/>\n};<br \/>\n<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u60a8\u53ef\u4ee5\u770b\u5230\u5728AP_Utils\u7c7b\u4e2d\u5b83\u4eec\u88ab\u58f0\u660e\u4e3a\u79c1\u6709\u7ed3\u6784\u3002<\/span><\/p>\n<p><span style=\"color: white; font-weight: 400; background-color: black;\">body origin;<br \/>\nleg legs[6];<br \/>\n<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u5c06\u8fd9\u4e9b\u7ed3\u6784\u79c1\u6709\u5316\u6709\u4ee5\u4e0b\u4e24\u4e2a\u539f\u56e0\uff1a<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">1.\t\u7528\u6237\u4e0d\u5e94\u5177\u6709\u968f\u610f\u4fee\u6539\u8fd9\u4e9b\u503c\u7684\u6743\u9650\u3002\u8fd9\u4e9b\u7ed3\u6784\u7684\u5b58\u5728\u662f\u4e3a\u4e86\u8ffd\u8e2a\u673a\u5668\u4eba\u7684\u5f53\u524d\u4f4d\u7f6e\uff0c\u56e0\u6b64\uff0c\u53ea\u6709\u5f53\u673a\u5668\u4eba\u771f\u6b63\u4ea7\u751f\u8fd0\u52a8\u7684\u65f6\u5019\u8fd9\u4e9b\u7ed3\u6784\u624d\u4f1a\u53d1\u751f\u53d8\u5316\u3002\u5047\u5982\u7528\u6237\u60f3\u8981\u66f4\u6539\u5f53\u524d\u7684\u539f\u70b9\u7684 <\/span><i><span style=\"font-weight: 400;\">z<\/span><\/i><span style=\"font-weight: 400;\"> \u5750\u6807\uff0c\u4f1a\u5bfc\u81f4IK\u6a21\u578b\u53d1\u751f\u4e0d\u53ef\u9884\u6d4b\u7684\u53d8\u5316\u2014\u8fd9\u663e\u7136\u662f\u4e0d\u53ef\u53d6\u7684\u3002<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">2.\t\u901a\u5e38\uff0c\u5c06\u5171\u6709\u51fd\u6570\u548c\u4e00\u4e2a\u7c7b\u4e2d\u7684\u53d8\u91cf\u6570\u91cf\u63a7\u5236\u5230\u6700\u4f4e\uff0c\u662f\u4e00\u79cd\u826f\u597d\u7684\u7f16\u7a0b\u4e60\u60ef\uff08\u5c24\u5176\u5728C++\u4e2d\uff09\u3002\u56e0\u6b64\u8fd9\u6837\u505a\u53ef\u4ee5\u63d0\u9ad8\u5b89\u5168\u6027\uff0c\u5e76\u5229\u4e8eAPI\u7684\u8f7b\u677e\u5b9e\u73b0\u3002<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">\u5982\u679c\u9700\u8981\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u8fd9\u4e9b\u70b9\u53ef\u89c6\u5316\u3002\u73b0\u5728\uff0c\u6211\u4eec\u7684\u6574\u4e2a\u673a\u5668\u4eba\u7531\u4e03\u4e2a\u70b9\u6765\u8868\u793a\uff08\u56fe3\uff09\u3002<\/span><\/p>\n<div id=\"attachment_4381\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4381\" class=\"size-full wp-image-4381\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image06.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"990\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image06.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image06-212x300.jpg 212w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image06-103x146.jpg 103w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image06-35x50.jpg 35w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image06-53x75.jpg 53w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4381\" class=\"wp-caption-text\">\u56fe3\uff1aIK\u6a21\u578b\u7684\u56fe\u5f62\u8868\u793a\u3002\u7b80\u800c\u8a00\u4e4b\uff0c\u8fd9\u5c31\u662f\u516d\u8db3\u673a\u5668\u4eba\u201c\u8ba4\u4e3a\u201d\u5b83\u6240\u770b\u8d77\u6765\u7684\u6837\u5b50\u3002\u7ea2\u70b9\u662f\u8eab\u4f53\uff0c\u84dd\u70b9\u662f\u817f\u3002<\/p>\n<\/div>\n<p><span style=\"font-weight: 400;\">\u8fd9\u4e9b\u7ed3\u6784\u7528\u4e8e\u8ffd\u8e2a\u6240\u6709\u817f\u90e8\u7684\u4f4d\u7f6e\u4ee5\u53ca\u673a\u5668\u4eba\u672c\u8eab\u7684\u4f4d\u7f6e\u3002\u60a8\u53ef\u80fd\u6ce8\u610f\u5230\u4e86\uff0c\u817f\u90e8\u7684\u4f4d\u7f6e\u4ec5\u7531\u4e24\u4e2a\u5750\u6807\u6765\u5b9a\u4e49\uff1a<\/span><i><span style=\"font-weight: 400;\">phi<\/span><\/i><span style=\"font-weight: 400;\"> \u548c <\/span><i><span style=\"font-weight: 400;\">z<\/span><\/i><span style=\"font-weight: 400;\">\u3002\u8fd9\u662f\u56e0\u4e3a\u6bcf\u6761\u817f\u53ea\u6709\u4e24\u4e2a\u81ea\u7531\u5ea6\uff0c\u56e0\u6b64\u53ea\u80fd\u6cbf\u7740\u4e24\u4e2a\u8f74\u8fdb\u884c\u79fb\u52a8\u3002\u73b0\u5728\u53ef\u4ee5\u901a\u8fc7\u8eab\u4f53\u7684<\/span><i><span style=\"font-weight: 400;\">x<\/span><\/i><span style=\"font-weight: 400;\">\u3001<\/span><i><span style=\"font-weight: 400;\">y<\/span><\/i><span style=\"font-weight: 400;\"> \u548c <\/span><i><span style=\"font-weight: 400;\">z<\/span><\/i><span style=\"font-weight: 400;\"> \u5750\u6807\u6765\u5bf9\u6240\u6709\u4f4d\u7f6e\u8fdb\u884c\u5b9a\u4e49\u3002\u6bcf\u6761\u817f\u7684<\/span><i><span style=\"font-weight: 400;\"> phi<\/span><\/i><span style=\"font-weight: 400;\"> \u548c <\/span><i><span style=\"font-weight: 400;\">z<\/span><\/i><span style=\"font-weight: 400;\"> \u5750\u6807\u7684\u8303\u56f4\u662f-1\u52301\uff0c\u5e76\u4e14\u4ec5\u786e\u5b9a\u4e86\u817f\u76f8\u5bf9\u4e8e\u8eab\u4f53\u7684\u4f4d\u7f6e\u3002\u5c3d\u7ba1\u73b0\u5728\u6765\u770b\u8fd9\u79cd\u590d\u6742\u6027\u4f3c\u4e4e\u662f\u4e0d\u5fc5\u8981\u7684\uff0c\u4f46\u662f\u5b9e\u9645\u4e0a\u8fd9\u6bd4\u6bcf\u6b21\u8fd0\u52a8\u540e\u8ba1\u7b97\u6bcf\u6761\u817f\u7684 <\/span><i><span style=\"font-weight: 400;\">x<\/span><\/i><span style=\"font-weight: 400;\">\u3001<\/span><i><span style=\"font-weight: 400;\">y<\/span><\/i><span style=\"font-weight: 400;\"> \u548c <\/span><i><span style=\"font-weight: 400;\">z<\/span><\/i><span style=\"font-weight: 400;\"> \u5750\u6807\u5bb9\u6613\u5f97\u591a\u3002<\/span><i><span style=\"font-weight: 400;\">phi<\/span><\/i><span style=\"font-weight: 400;\"> \u5750\u6807\u8868\u793a\u6c34\u5e73\u8fd0\u52a8\uff0cz\u8868\u793a\u5782\u76f4\u8fd0\u52a8\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_4388\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4388\" class=\"size-full wp-image-4388\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image14.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"1244\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image14.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image14-169x300.jpg 169w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image14-576x1024.jpg 576w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image14-82x146.jpg 82w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image14-28x50.jpg 28w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image14-42x75.jpg 42w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4388\" class=\"wp-caption-text\">\u56fe4\uff1a\u5e26\u6709phi\u8f74\u548cz\u8f74\u7684\u817f\u90e8\u7ec6\u8282<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>\u7b97\u6cd5<\/h2>\n<p><span style=\"font-weight: 400;\">\u73b0\u5728\uff0c\u6211\u4eec\u5bf9\u4e8e\u673a\u5668\u4eba\u6709\u4e86\u8db3\u591f\u7b80\u5355\u7684\u6570\u5b66\u8868\u8fbe\uff0c\u4f46\u662f\u8fd8\u6ca1\u6709\u7528\u5b83\u6765\u505a\u4efb\u4f55\u4e8b\u3002\u4e0b\u4e00\u6b65\u5c31\u662f\u7814\u7a76\u5982\u4f55\u901a\u8fc7\u4ec5\u4ec5\u4fee\u6539\u8be5\u6a21\u578b\u6765\u5b9e\u73b0\u4f3a\u670d\u7684\u8fd0\u8f6c\u3002\u6211\u4eec\u9700\u8981\u5b8c\u6210\u7684\u7a0b\u5e8f\u662f\u5c06\u8f93\u5165\u4f5c\u4e3a\u4e00\u7ec4\u70b9\u5750\u6807\uff0c\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a\u4f3a\u670d\u7684\u8fd0\u884c\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u8fd9\u65f6\u5019\u53e6\u4e00\u4e2a\u95ee\u9898\u5c31\u51fa\u73b0\u4e86\uff0c\u800c\u8fd9\u6b21\uff0c\u4ec5\u4ec5\u66ff\u6362\u6210\u53e6\u4e00\u4e2aArduino\u65e0\u6cd5\u89e3\u51b3\u3002\u5f53\u542f\u52a8\u4f3a\u670d\u65f6\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u4f7f\u5927\u90e8\u5206\u4f3a\u670d\u540c\u65f6\u8fd0\u8f6c\u3002\u4f46\u662f\uff0cArduino\uff08\u4ee5\u53ca\u6240\u6709\u4e0e\u6b64\u76f8\u5173\u7684AVRs\uff09\u4e00\u6b21\u53ea\u80fd\u6267\u884c\u4e00\u9879\u4efb\u52a1\u3002\u8fd9\u610f\u5473\u7740\u5982\u679c\u6211\u4eec\u5982\u679c\u60f3\u5e73\u7a33\u5730\u8fd0\u8f6c\u4f3a\u670d\uff0c\u5c31\u9700\u8981\u4e00\u4e2a\u4e00\u4e2a\u8fdb\u884c\u542f\u52a8\u3002\u5982\u679c\u4ec5\u4ec5\u5c06\u4f3a\u670d\u4ece\u4e00\u7aef\u76f4\u63a5\u8fd0\u8f6c\u5230\u53e6\u4e00\u7aef\uff0c\u6574\u4e2a\u8fc7\u7a0b\u5c06\u975e\u5e38\u4e0d\u7a33\u5b9a\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u89e3\u51b3\u8be5\u95ee\u9898\u7684\u4e00\u79cd\u65b9\u6cd5\u662f\u4e8b\u5148\u8ba1\u7b97\u597d\u6240\u6709\u4f3a\u670d\u7684\u4f4d\u7f6e\uff0c\u7136\u540e\u8fed\u4ee3\u8fd9\u4e9b\u6570\u636e\uff0c\u5e76\u5bf9\u6240\u6709\u4f3a\u670d\u8fdb\u884c\u8bbe\u7f6e\u3002\u56e0\u4e3aArduino MEGA\u7684\u65f6\u949f\u9891\u7387\u662f16MHz\uff0c\u6240\u4ee5\u6240\u6709\u4f3a\u670d\u867d\u7136\u5728\u5b9e\u9645\u8fc7\u7a0b\u4e2d\u4ee5\u5f88\u5c0f\u7684\u589e\u91cf\u8fdb\u884c\u79bb\u6563\u5316\u8fd0\u8f6c\uff0c\u4f46\u662f\u6574\u4f53\u8868\u73b0\u51fa\u6765\u7684\u8fd0\u884c\u8fc7\u7a0b\u662f\u8fde\u7eed\u6d41\u7545\u7684\u3002\u5c3d\u7ba1\u5b83\u4eec\u53ea\u662f\u9759\u6001\u56fe\u50cf\u7684\u96c6\u5408\uff0c\u4f46\u662f\u8fd9\u548c\u89c6\u9891\u4e2d\u6240\u4ea7\u751f\u7684\u8fde\u7eed\u8fd0\u52a8\u7684\u6548\u679c\u4e00\u81f4\u3002\u4eba\u8111\u65e0\u6cd5\u5bf9\u89c6\u89c9\u4fe1\u606f\u8fdb\u884c\u5feb\u901f\u5904\u7406\u3002\u5982\u679c\u6211\u4eec\u5728\u6bcf\u4e00\u6b21\u4f4d\u7f6e\u53d8\u6362\u4e4b\u540e\u6dfb\u52a0\u4e00\u4e2a50\u6beb\u79d2\u7684\u5ef6\u8fdf\uff0c\u5219\u5f88\u660e\u663e\uff0c\u4f3a\u670d\u8fd0\u8f6c\u5b9e\u9645\u4e0a\u662f\u7531\u5c0f\u7684\u589e\u91cf\u6240\u7ec4\u6210\u7684\u3002<\/span><br \/>\n<script type=\"text\/javascript\"><br \/>\n\tjstream_t3.PlayerFactoryIF.create({<br \/>\n\tb:\"eqa194obdo.eq.webcdn.stream.ne.jp\/www50\/eqa194obdo\/jmc_pub\/jmc_swf\/player\/\",<br \/>\n\tc:\"NDc3\",<br \/>\n\tm:\"NTc2\",<br \/>\n\ts:{<br \/>\n\t\thp:360,<br \/>\n\t\til:\"off\",<br \/>\n\t\trb:\"off\",<br \/>\n\t\tsn:\"f,t,g\",<br \/>\n\t\twp:640<br \/>\n\t}});<br \/>\n<\/script><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u8fd9\u4e5f\u662f\u6211\u4eec\u5fc5\u987b\u66f4\u6362Arduino\u7684\u539f\u56e0\u3002\u5982\u679c\u6211\u4eec\u60f3\u8981\u8fd0\u884c\u6bcf\u4e00\u4e2a\u4f3a\u670d\uff0c\u90a3\u4e48\u6211\u4eec\u9700\u8981\u5927\u91cf\u7684\u5185\u5b58\u6765\u5b58\u50a8\u521a\u521a\u6240\u8ba1\u7b97\u51fa\u7684\u5750\u6807\u3002\u5982\u679c\u6211\u4eec\u8fd0\u8f6c\u6240\u6709\u7684\u4f3a\u670d\uff0c\u6211\u4eec\u5c06\u9700\u8981600\u4e2a\u6d6e\u70b9\u6570\u6765\u5b58\u50a8\u8fd0\u52a8\u5750\u6807\uff0c\u56e0\u4e3a\u6bcf\u4e2a\u4f3a\u670d\u90fd\u81f3\u5c11\u9700\u898150\u4e2a\u4f4d\u7f6e\u624d\u80fd\u4ea7\u751f\u5e73\u6ed1\u8fde\u7eed\u7684\u8fd0\u8f6c\u6548\u679c\u3002600\u4e2a\u6d6e\u70b9\u6570\u5927\u7ea6\u662f 2.3 kB\u7684RAM\u2014\u8fd9\u5df2\u7ecf\u8d85\u8fc7\u4e86UNO\u7684\u5bb9\u91cf\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u5728AP_Utils\u5e93\u4e2d\uff0c\u5c06\u4f4d\u7f6e\u8f6c\u6362\u4e3a\u4f3a\u670d\u8fd0\u8f6c\u72b6\u51b5\u7684\u662f<\/span><b><i>traceLeg()<\/i><\/b><span style=\"font-weight: 400;\"> \u548c <\/span><b><i>setLegs()<\/i><\/b><span style=\"font-weight: 400;\"> \u51fd\u6570\u3002<\/span><i><span style=\"font-weight: 400;\">traceLeg()<\/span><\/i><span style=\"font-weight: 400;\"> \u51fd\u6570\u4ec5\u8fdb\u884c\u8ba1\u7b97\uff1a\u5f53\u63d0\u4f9b\u4e86\u76ee\u6807\u672b\u7aef\u7684 <\/span><i><span style=\"font-weight: 400;\">phi <\/span><\/i><span style=\"font-weight: 400;\">\u548c <\/span><i><span style=\"font-weight: 400;\">z<\/span><\/i><span style=\"font-weight: 400;\"> \u5750\u6807\u65f6\uff0c\u5b83\u5c06\u4ee5\u5750\u6807\u6570\u7ec4\u7684\u5f62\u5f0f\u521b\u5efa\u4e00\u4e2a\u8def\u5f84\u3002\u8def\u5f84\u53ef\u4ee5\u5177\u6709\u591a\u79cd\u5f62\u72b6\uff0c\u5f53\u524d\u652f\u6301\u7684\u662f\u7ebf\u5f62\uff08\u4ece\u4e00\u4e2a\u70b9\u5230\u53e6\u4e00\u4e2a\u70b9\u7684\u7b80\u5355\u76f4\u7ebf\uff09\u3001\u5706\u5f27\u548c\u692d\u5706\u5f27\u3002\u540e\u4e24\u79cd\u8def\u5f84\u53ef\u4ee5\u4f7f\u6b65\u884c\u53d8\u5f97\u66f4\u52a0\u5bb9\u6613\u3002\u7b2c\u4e8c\u79cd\u51fd\u6570 <\/span><i><span style=\"font-weight: 400;\">setLegs()<\/span><\/i><span style=\"font-weight: 400;\"> \u5c06\u6839\u636e <\/span><i><span style=\"font-weight: 400;\">traceLeg<\/span><\/i><span style=\"font-weight: 400;\">\u7684\u7ed3\u679c\u6765\u79fb\u52a8\u6240\u6709\u6307\u5b9a\u7684\u652f\u817f\uff0c\u4f46\u662f\uff0c\u6240\u6709\u8fd9\u4e9b\u5bf9\u5e38\u89c4\u7528\u6237\u662f\u9690\u85cf\u7684\u3002\u6574\u4e2a\u65b9\u6848\u7684\u91cd\u70b9\u662f\u5c3d\u53ef\u80fd\u5730\u65b9\u4fbf\u7528\u6237\u4f7f\u7528\u3002\u6700\u7ec8\u7528\u6237\u5c06\u65e0\u9700\u76f4\u63a5\u8bbe\u7f6e <\/span><i><span style=\"font-weight: 400;\">setLegs()<\/span><\/i><span style=\"font-weight: 400;\"> \uff0c\u800c\u4ec5\u9700\u8c03\u7528\u4e0e\u884c\u8d70\u76f4\u63a5\u76f8\u5173\u7684\u51fd\u6570\u5373\u53ef\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u73b0\u5728\u6211\u4eec\u5f00\u59cb\u8fdb\u5165IK\u7f16\u7a0b\u7684\u6700\u540e\u4e00\u6b65\uff0c\u5373\u771f\u6b63\u7684\u884c\u8d70\u3002\u6211\u4eec\u5df2\u7ecf\u5b8c\u6210\u4e86\u6240\u6709\u57fa\u7840\u5de5\u4f5c\uff1a\u6211\u4eec\u521b\u5efa\u4e86\u4e00\u4e2a\u6a21\u578b\u6765\u5bf9\u6240\u6709\u4e8b\u7269\u8fdb\u884c\u8ffd\u8e2a\uff0c\u6211\u4eec\u53ef\u4ee5\u8fd0\u884c\u591a\u4e2a\u4f3a\u670d\uff0c\u751a\u81f3\u53ef\u4ee5\u4f7f\u4f3a\u670d\u7684\u8fd0\u8f6c\u53d8\u5f97\u76f8\u5bf9\u5e73\u6ed1\u8fde\u7eed\u3002\u5728\u4ee5\u4e0b\u5185\u5bb9\u4e2d\uff0c\u652f\u817f\u7684\u7f16\u53f7\u4e0e\u4e0b\u56fe\u4e2d\u7684\u7f16\u53f7\u76f8\u5bf9\u5e94\uff1a<\/span><\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_4385\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4385\" class=\"size-full wp-image-4385\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image10.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"394\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image10.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image10-300x169.jpg 300w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image10-260x146.jpg 260w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image10-50x28.jpg 50w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image10-133x75.jpg 133w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4385\" class=\"wp-caption-text\">\u56fe5\uff1a\u652f\u817f\u7f16\u53f7<\/p>\n<\/div>\n<p><span style=\"font-weight: 400;\">\u8be5\u7f16\u53f7\u7cfb\u7edf\u540c\u65f6\u4e0e\u60a8\u5728\u5e93\u4e2d\u627e\u5230\u7684\u4ee3\u7801\u4e00\u81f4\u3002<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u6211\u4eec\u5148\u4ece\u7b80\u5355\u7684\u64cd\u4f5c\u5f00\u59cb\uff1a\u5728\u573a\u5730\u4e0a\u8f6c\u5411\u3002\u901a\u5e38\uff0c\u5728\u4e3a\u652f\u817f\u8bbe\u5b9a\u65b0\u7684\u4f4d\u7f6e\u65f6\uff0c\u60a8\u5fc5\u987b\u4fdd\u8bc1\u5176\u4e2d\u4e09\u6761\u817f\u5728\u5730\u9762\u4e0a\u3002\u8fd9\u80cc\u540e\u7684\u539f\u56e0\u5f88\u660e\u663e\u2014\u9664\u975e\u60a8\u53ef\u4ee5\u975e\u5e38\u5feb\u5730\u79fb\u52a8\u652f\u817f\uff0c\u4e0d\u7136\u673a\u5668\u4eba\u5c06\u5931\u53bb\u7a33\u5b9a\u6027\u5e76\u8dcc\u5012\u3002\u6211\u4eec\u53ef\u4ee5\u5206\u51e0\u6b65\u4f7f\u673a\u5668\u4eba\u8f6c\u5411\uff1a<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong>1. \u5c06\u652f\u817f0\u30012\u548c4\u79fb\u52a8\u5230phi \u5750\u6807\u6700\u5927\u503c\u5904\uff08\u6700\u5927\u6c34\u5e73\u89d2\uff09\u3002<\/strong><\/p>\n<div id=\"attachment_4382\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4382\" class=\"size-full wp-image-4382\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image07.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"394\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image07.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image07-300x169.jpg 300w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image07-260x146.jpg 260w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image07-50x28.jpg 50w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image07-133x75.jpg 133w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4382\" class=\"wp-caption-text\">\u56fe6\uff1a\u8f6c\u5411\u6b65\u9aa41\uff08\u652f\u817f0\u30012\u548c4\uff09<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>2. \u5bf9\u652f\u817f1\u30013\u548c5\u8fdb\u884c\u76f8\u540c\u64cd\u4f5c\u3002<\/strong><\/p>\n<div id=\"attachment_4378\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4378\" class=\"size-full wp-image-4378\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image03.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"394\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image03.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image03-300x169.jpg 300w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image03-260x146.jpg 260w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image03-50x28.jpg 50w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image03-133x75.jpg 133w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4378\" class=\"wp-caption-text\">\u56fe7\uff1a\u8f6c\u5411\u6b65\u9aa42\uff08\u652f\u817f1\u30013\u548c5\uff09<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>3. \u8eab\u4f53\u8f6c\u5411\u3002\u8fd9\u4e00\u6b65\u662f\u901a\u8fc7\u6cbf\u4e0e\u6b65\u9aa41-3\u4e2d\u76f8\u53cd\u7684\u65b9\u5411\u8fd0\u884c\u6240\u6709\u6c34\u5e73\u65b9\u5411\u7684\u4f3a\u670d\u6765\u5b8c\u6210\u7684\u3002\u56e0\u4e3a\u6240\u6709\u7684\u652f\u817f\u90fd\u5728\u5730\u9762\u4e0a\u4e14\u4e0d\u80fd\u79fb\u52a8\uff0c\u6240\u4ee5\u53ef\u4ee5\u79fb\u52a8\u7684\u53ea\u6709\u8eab\u4f53\u3002<\/strong><\/p>\n<div id=\"attachment_4379\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4379\" class=\"size-full wp-image-4379\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image04.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"1244\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image04.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image04-169x300.jpg 169w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image04-576x1024.jpg 576w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image04-82x146.jpg 82w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image04-28x50.jpg 28w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image04-42x75.jpg 42w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4379\" class=\"wp-caption-text\">\u56fe8\uff1a\u8f6c\u5411\u6b65\u9aa43<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u5bf9\u8fd9\u4e9b\u6b65\u9aa4\u8fdb\u884c\u91cd\u590d\u6267\u884c\u540e\uff0c\u673a\u5668\u4eba\u53ef\u4ee5\u8f6c\u5f2f80\u00b0\u3002\u5f53\u7136\uff0c\u53ea\u8981\u4e0d\u662f\u5728\u8fc7\u7a0b\u4e2d\u4e00\u76f4\u4fdd\u6301  <\/span><i><span style=\"font-weight: 400;\">phi <\/span><\/i><span style=\"font-weight: 400;\">\u8f74\u6700\u5927\u5750\u6807\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5c0f\u4e8e\u8be5\u89d2\u5ea6\u7684\u8f6c\u5411\u3002\u5f97\u76ca\u4e8e <\/span><i><span style=\"font-weight: 400;\">traceLeg()<\/span><\/i><span style=\"font-weight: 400;\"> \u51fd\u6570\u80cc\u540e\u7684\u5de7\u5999\u7b97\u6cd5\uff0c\u6211\u4eec\u4e0d\u5fc5\u8ba1\u7b97\u652f\u817f\u7684\u4efb\u4f55 <\/span><i><span style=\"font-weight: 400;\">z<\/span><\/i><span style=\"font-weight: 400;\"> \u5750\u6807\u503c\u2014\u8fd9\u4e9b\u8ba1\u7b97\u4f1a\u81ea\u52a8\u8fdb\u884c\uff0c\u5e76\u5f62\u6210\u5706\u6216\u692d\u5706\u7684\u5f62\u72b6\u3002\u60a8\u53ef\u4ee5\u5728\u4ee5\u4e0b\u89c6\u9891\u4e2d\u89c2\u5bdf\u5230\u8fd9\u4e00\u8fc7\u7a0b\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><script type=\"text\/javascript\"><br \/>\n\tjstream_t3.PlayerFactoryIF.create({<br \/>\n\tb:\"eqa194obdo.eq.webcdn.stream.ne.jp\/www50\/eqa194obdo\/jmc_pub\/jmc_swf\/player\/\",<br \/>\n\tc:\"NDc3\",<br \/>\n\tm:\"NTc4\",<br \/>\n\ts:{<br \/>\n\t\thp:360,<br \/>\n\t\til:\"off\",<br \/>\n\t\trb:\"off\",<br \/>\n\t\tsn:\"f,t,g\",<br \/>\n\t\twp:640<br \/>\n\t}});<br \/>\n<\/script><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u6700\u540e\u4e00\u6b65\u662f\u884c\u8d70\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u6211\u4eec\u5e0c\u671b\u5b83\u81f3\u5c11\u80fd\u5411\u524d\u884c\u8d70\u3002\u516d\u8db3\u673a\u5668\u4eba\u7684\u884c\u8d70\u7b97\u6cd5\u6709\u5f88\u591a\u79cd\uff0c\u4f46\u5927\u591a\u6570\u7b97\u6cd5\u90fd\u57fa\u4e8e\u6709\u4e09\u4e2a\u81ea\u7531\u5ea6\u7684\u652f\u817f\u3002\u6211\u4eec\u7684\u652f\u817f\u53ea\u6709\u4e24\u4e2a\u81ea\u7531\u5ea6\uff0c\u56e0\u6b64\u6211\u4eec\u5fc5\u987b\u81ea\u5df1\u8fdb\u884c\u4e00\u4e9b\u8bbe\u8ba1\u3002\u6211\u6240\u63d0\u51fa\u7684\u65b9\u6cd5\u867d\u7136\u6ca1\u6709\u8fbe\u5230\u9884\u671f\u7684\u901f\u5ea6\uff0c\u4f46\u662f\u8fd9\u79cd\u65b9\u6cd5\u662f\u6700\u6613\u4e8e\u7f16\u7a0b\u7684\uff0c\u5e76\u4e14\u6613\u4e8e\u89c2\u5bdf\u8fc7\u7a0b\u4e2d\u7684\u73b0\u8c61\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><strong>1. \u9996\u5148\uff0c\u652f\u817f0\u548c3\u5411\u524d\u79fb\u52a8<\/strong><\/p>\n<div id=\"attachment_4383\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4383\" class=\"size-full wp-image-4383\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image08.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"394\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image08.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image08-300x169.jpg 300w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image08-260x146.jpg 260w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image08-50x28.jpg 50w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image08-133x75.jpg 133w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4383\" class=\"wp-caption-text\">\u56fe9\uff1a\u884c\u8d70\u6b65\u9aa41\uff08\u652f\u817f0\u548c3\uff09<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>2. \u7136\u540e\uff0c\u652f\u817f2\u548c5\u5411\u76f8\u540c\u65b9\u5411\u79fb\u52a8<\/strong><\/p>\n<div id=\"attachment_4384\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4384\" class=\"size-full wp-image-4384\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image09.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"394\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image09.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image09-300x169.jpg 300w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image09-260x146.jpg 260w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image09-50x28.jpg 50w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image09-133x75.jpg 133w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4384\" class=\"wp-caption-text\">\u56fe10\uff1a\u884c\u8d70\u6b65\u9aa42\uff08\u652f\u817f2\u548c5\uff09<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>3. \u5bf9\u652f\u817f1\u548c4\u8fdb\u884c\u76f8\u540c\u64cd\u4f5c<\/strong><\/p>\n<div id=\"attachment_4376\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4376\" class=\"size-full wp-image-4376\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image01.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"394\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image01.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image01-300x169.jpg 300w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image01-260x146.jpg 260w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image01-50x28.jpg 50w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image01-133x75.jpg 133w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4376\" class=\"wp-caption-text\">\u56fe11\uff1a\u884c\u8d70\u6b65\u9aa44\uff08\u652f\u817f1\u548c4\uff09<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong>4. \u73b0\u5728\uff0c\u8eab\u4f53\u79fb\u52a8\u5411\u524d\uff0c\u5f00\u59cb\u91cd\u590d\u6267\u884c\u6574\u4e2a\u8fc7\u7a0b\u3002<\/strong><\/p>\n<div id=\"attachment_4387\" style=\"width: 710px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-4387\" class=\"size-full wp-image-4387\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image13.jpg\" alt=\"arduino hexapod\" width=\"700\" height=\"394\" srcset=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image13.jpg 700w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image13-300x169.jpg 300w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image13-260x146.jpg 260w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image13-50x28.jpg 50w, https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/10\/image13-133x75.jpg 133w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\"><\/p>\n<p id=\"caption-attachment-4387\" class=\"wp-caption-text\">\u56fe12\uff1a\u884c\u8d70\u6b65\u9aa44<\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u60a8\u53ef\u4ee5\u5728\u4ee5\u4e0b\u89c6\u9891\u4e2d\u89c2\u770b\u6574\u4e2a\u8fd0\u52a8\uff1a<\/span><\/p>\n<p><script type=\"text\/javascript\"><br \/>\n\tjstream_t3.PlayerFactoryIF.create({<br \/>\n\tb:\"eqa194obdo.eq.webcdn.stream.ne.jp\/www50\/eqa194obdo\/jmc_pub\/jmc_swf\/player\/\",<br \/>\n\tc:\"NDc3\",<br \/>\n\tm:\"NTc5\",<br \/>\n\ts:{<br \/>\n\t\thp:360,<br \/>\n\t\til:\"off\",<br \/>\n\t\trb:\"off\",<br \/>\n\t\tsn:\"f,t,g\",<br \/>\n\t\twp:640<br \/>\n\t}});<br \/>\n<\/script><\/p>\n<p>&nbsp;<\/p>\n<h2>\u57fa\u672c\u907f\u969c\u529f\u80fd<\/h2>\n<p><span style=\"font-weight: 400;\">\u60a8\u53ef\u80fd\u5df2\u7ecf\u6ce8\u610f\u5230\u4e86\uff0c\u5e93\u4e2d\u6709\u4e00\u90e8\u5206\u4e13\u95e8\u7528\u4e8eSR04\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u4eea\u3002\u8fd9\u662f\u4e3a\u4e86\u83b7\u53d6\u6709\u5173\u673a\u5668\u4eba\u6240\u5904\u73af\u5883\u7684\u4e00\u4e9b\u4fe1\u606f\u3002\u5f53\u7136\uff0c\u4e00\u4e2a\u56fa\u5b9a\u4e0d\u52a8\u7684\u4f20\u611f\u5668\u662f\u4e0d\u591f\u7684\uff0c\u56e0\u6b64\u5728\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4e2d\u6211\u4eec\u5728\u4e00\u4e2a\u989d\u5916\u7684\u4f3a\u670d\u4e0a\u4e5f\u5b89\u88c5\u4e86\u4e00\u4e2a\u4f20\u611f\u5668\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u6211\u76f8\u4fe1\u5927\u591a\u6570\u5c1d\u8bd5\u5236\u9020\u516d\u8db3\u673a\u5668\u4eba\u7684\u4eba\u5bf9\u8d85\u58f0\u6ce2\u6d4b\u8ddd\u4eea\u7684\u5de5\u4f5c\u539f\u7406\u662f\u6709\u4e00\u5b9a\u7a0b\u5ea6\u4e86\u89e3\u7684\u3002\u5bf9\u4e8e\u4e0e\u8be5\u4f20\u611f\u5668\u7684\u63a5\u53e3\u6211\u5efa\u8bae\u60a8\u4f7f\u7528 <\/span><i><span style=\"font-weight: 400;\">AP_Utils::sr04_median<\/span><\/i><span style=\"font-weight: 400;\"> \u51fd\u6570\u3002\u5b83\u53ef\u4ee5\u63d0\u4f9b\u5e93\u4e2d\u6240\u6709SR04\u51fd\u6570\u6700\u51c6\u786e\u7684\u7ed3\u679c\u3002\u60a8\u751a\u81f3\u53ef\u4ee5\u8f93\u51fa\u6570\u636e\u7684\u5355\u4f4d\uff0c\u76ee\u524d\u53ef\u4ee5\u652f\u6301\u6beb\u7c73\u3001\u5398\u7c73\u548c\u7c73\uff01<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b>\u91cd\u8981\u63d0\u793a\uff1a<\/b><span style=\"font-weight: 400;\"> \u8bf7\u6ce8\u610f\uff0c\u60a8\u9700\u8981Adafruit PWM\u9a71\u52a8\u7a0b\u5e8f\u5e93\u6765\u4f7fAP_Utils\u8fd0\u884c\uff0c\u60a8\u53ef\u4ee5\u70b9\u51fb<\/span><a href=\"https:\/\/github.com\/adafruit\/Adafruit-PWM-Servo-Driver-Library\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">\u6b64\u5904<\/span><\/a><span style=\"font-weight: 400;\"> \u4e0b\u8f7d\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u548c\u5176\u4ed6Arduino\u5e93\u4e00\u6837\u5bf9\u5176\u8fdb\u884c\u5b89\u88c5\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">\u4ee5\u4e0b\u662f\u4e00\u4e2a\u975e\u5e38\u7b80\u5355\u7684\u201c\u81ea\u4e3b\u201d\u6a21\u5f0f\u7684\u793a\u4f8b\uff0c\u4f7f\u7528\u4e86\u5230\u76ee\u524d\u4e3a\u6b62\u6211\u4eec\u6240\u8ba8\u8bba\u7684\u6240\u6709\u5185\u5bb9\uff1a\u884c\u8d70\u3001\u8f6c\u5411\u548c\u4eceSR04\u4e2d\u8bfb\u53d6\u8ddd\u79bb\u3002\u5982\u679c\u60a8\u8ba4\u771f\u9605\u8bfb\u4e86\u8fd9\u7bc7\u6587\u7ae0\uff0c\u90a3\u4e48\u5e94\u8be5\u80fd\u5b8c\u5168\u7406\u89e3\u4ee5\u4e0b\u4ee3\u7801\u4e2d\u6700\u91cd\u8981\u90e8\u5206\u7684\u5185\u5bb9\u3002\u6709\u5173\u6240\u6709\u51fd\u6570\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u8bf7\u53c2\u8003\u5e93\u6587\u4ef6\u5939\u4e2d\u6216 <\/span><a href=\"https:\/\/github.com\/Gipsonek\/ArduPod\/blob\/master\/arduino\/AP_Utils\/README.md\" target=\"_blank\" rel=\"noopener noreferrer\"><span style=\"font-weight: 400;\">GitHub<\/span><\/a><span style=\"font-weight: 400;\"> \u9875\u9762\u4e0a\u7684 README.md\u6587\u4ef6\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><b><i>Arduino \u4ee3\u7801<\/i><\/b><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism undefined-numbers lang-c\" data-lang=\"C\"><code>#include &lt;AP_Utils.h&gt;\r\n\r\n\r\n\r\n\/\/define the pins that the SR04 is connected to\r\n\r\n#define TRIG 3\r\n\r\n#define ECHO 2\r\n\r\n\r\n\r\n\/\/create an instance of AP_Utils class\r\n\r\nAP_Utils ardupod;\r\n\r\n\/\/you will have to supply your own offsets here\r\n\r\n\/\/see examples\/calibration.ino for details\r\n\r\nint offsets[16] = {5, 0, 0, -7, 10, -3, 6, -4, 3, -5, 10, -3, 0, 0, 0, 0};\r\n\r\n\r\n\r\nvoid setup() {\r\n\r\n \/\/reset the robot\r\n\r\n ardupod.begin(offsets);\r\n\r\n}\r\n\r\n\r\n\r\nvoid loop() {\r\n\r\n \/\/take one step directly forward\r\n\r\n ardupod.walk(0, 1);\r\n\r\n \/\/if an obstacle is closer than 20 cm, we have to turn\r\n\r\n if(sr04_median(TRIG, ECHO, CM, 100, 500) &lt; 20.0) {\r\n\r\n   \/\/turn 90 degrees to the right\r\n\r\n   ardupod.turn(90);\r\n\r\n }\r\n\r\n}\r\n<\/code><\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<br \/>\n&nbsp;<\/p>\n<h2>\u7ed3\u8bba<\/h2>\n<p><span style=\"font-weight: 400;\">\u606d\u559c\u60a8\u5b8c\u6210\u4e86\u8fd9\u4e2a\u6700\u5177\u6311\u6218\u6027\u7684\u9879\u76ee\u4e4b\u4e00\uff01\u505a\u5f97\u5f88\u597d\uff01\u5728\u5c1d\u8bd5\u4f7f\u60a8\u81ea\u5df1\u7684Ardupod\u884c\u8d70\u4e4b\u524d\uff0c\u8bf7\u786e\u8ba4\u540c\u65f6\u8fd0\u884c\u793a\u4f8b\u6587\u4ef6\u5939\u4e2d\u7684 <\/span><b>calibration.ino<\/b><span style=\"font-weight: 400;\"> \u548c <\/span><b>servo_test.ino<\/b><span style=\"font-weight: 400;\">\u3002\u8fd9\u5bf9\u4e8e\u6b63\u786e\u8bbe\u7f6e\u6240\u6709\u4f3a\u670d\u81f3\u5173\u91cd\u8981\uff0c\u8fd9\u6837\u4f3a\u670d\u624d\u4e0d\u4f1a\u88ab\u635f\u574f\uff01\u5728\u4e0b\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u53ef\u80fd\u5bf9\u6b64\u9879\u76ee\u8fdb\u884c\u6700\u540e\u4e00\u6b21\u63a2\u7d22\uff0c\u4ee5\u5bf9\u4e00\u4e9b\u673a\u68b0\u6027\u80fd\u8f83\u5dee\u7684\u70b9\u8fdb\u884c\u6539\u5584\uff0c\u4ee5\u53ca\uff0c\u66f4\u91cd\u8981\u7684\u662f\uff0c\u589e\u52a0\u4e00\u4e9b\u6539\u8fdb\u7684\u529f\u80fd\uff0c\u4f8b\u5982\u8fdc\u7a0b\u63a7\u5236\u3002<\/span><\/p>\n<p>&nbsp;<\/p>\n<div class=\"author-box-wrapper\">\n<div class=\"avatar-wrapper\">\n\t\t<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/techclass.wfjydl.com\/wp-content\/uploads\/2016\/08\/Jan-Gromes_avatar_1472220138-64x64.jpg\" width=\"64\" height=\"64\" alt=\"Jan Gromes\"><\/div>\n<div class=\"desc-wrapper\">\n<h5>Jan Gromes<\/h5>\n<div class=\"desc\">\n<p>Jan\u76ee\u524d\u5728\u5e03\u5c14\u8bfa\u5de5\u4e1a\u5927\u5b66\u5b66\u4e60\u7535\u6c14\u5de5\u7a0b\u3002\u4ed6\u5728\u57fa\u4e8eArduino\u6216\u5176\u4ed6\u5fae\u63a7\u5236\u5668\u521b\u5efa\u9879\u76ee\u65b9\u9762\u6709\u591a\u5e74\u7ecf\u9a8c\uff0c\u5e76\u4e14\u5bf9\u673a\u5668\u4eba\u7cfb\u7edf\u7684\u673a\u68b0\u8bbe\u8ba1\u9886\u57df\u6709\u6d53\u539a\u5174\u8da3\u3002<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"\u8fd9\u7bc7\u6587\u7ae0\u6765\u6e90\u4e8eDevicePlus.com\u82f1\u8bed\u7f51\u7ad9\u7684\u7ffb\u8bd1\u7a3f\u3002 \u70b9\u51fb\u6b64\u5904\u9605\u8bfb\u672c\u6587\u7b2c\u4e00\u90e8\u5206 &gt; &nbsp; \u5728\u672c\u9879\u76ee\u7684\u7b2c\u4e8c\u90e8\u5206\u4e2d\uff0c\u6211\u4eec\u5c06\u7ee7\u7eed\u8fdb\u884c\u9879\u76ee\u4e2d\u76f8\u5bf9\u5bb9\u6613\u7684\u5185\u5bb9\u2014\u7f16\u7a0b\u3002\u5bf9\u516d\u8db3\u673a\u5668\u4eba\u8fdb\u884c\u7f16\u7a0b\u901a\u5e38\u6709\u4e24\u79cd\u4e0d\u540c\u7684\u65b9\u6cd5\u3002\u7b2c [&hellip;]","protected":false},"author":3,"featured_media":16894,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1130],"tags":[],"class_list":["post-8112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino"],"acf":[],"wps_subtitle":"","_links":{"self":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/8112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/comments?post=8112"}],"version-history":[{"count":8,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/8112\/revisions"}],"predecessor-version":[{"id":16896,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/posts\/8112\/revisions\/16896"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media\/16894"}],"wp:attachment":[{"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/media?parent=8112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/categories?post=8112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techclass.wfjydl.com\/wp-json\/wp\/v2\/tags?post=8112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}