{"id":41205,"date":"2023-10-01T15:15:41","date_gmt":"2023-10-01T07:15:41","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=41205"},"modified":"2023-10-14T17:01:49","modified_gmt":"2023-10-14T09:01:49","slug":"eajkzdjakpzl","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/41205.html","title":{"rendered":"ESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\uff1a\u79d1\u666e\u4e13\u680f"},"content":{"rendered":"
ESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\uff0c\u53ef\u4ee5\u5b9e\u73b0\u667a\u80fd\u63a7\u5236\uff0c\u4f7f\u60a8\u53ef\u4ee5\u8f7b\u677e\u63a7\u5236\u8235\u673a\u79fb\u52a8\u3002\u672c\u6587\u5c06\u4ecb\u7ecdESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\u7684\u57fa\u672c\u539f\u7406\u3001\u7535\u8def\u8bbe\u8ba1\u548c\u5b9e\u73b0\u6b65\u9aa4\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528ESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\u5b9e\u73b0\u667a\u80fd\u63a7\u5236\u3002<\/p>\n
ESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\u7684\u57fa\u672c\u539f\u7406\u662f\uff1aESP32\u677f\u4e0a\u7684\u6309\u952e\u53ef\u4ee5\u88ab\u68c0\u6d4b\u5230\uff0c\u4ece\u800c\u53ef\u4ee5\u901a\u8fc7\u7f16\u7a0b\u5c06\u6309\u952e\u4fe1\u53f7\u53d1\u9001\u5230Arduino\u677f\u4e0a\u3002Arduino\u677f\u4e0a\u7684\u8235\u673a\u53ef\u4ee5\u63a5\u6536\u5230ESP32\u677f\u4e0a\u7684\u6309\u952e\u4fe1\u53f7\uff0c\u4ece\u800c\u5b9e\u73b0\u667a\u80fd\u63a7\u5236\u3002<\/p>\n
ESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\u7684\u7535\u8def\u8bbe\u8ba1\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u5c06ESP32\u677f\u548cArduino\u677f\u8fde\u63a5\u8d77\u6765\u5373\u53ef\uff0c\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n
ESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\u7684\u5b9e\u73b0\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n
void loop() {<\/p>
if (digitalRead(buttonPin) == HIGH) {<\/p>
digitalWrite(servoPin, HIGH);<\/p>
delay(1000);<\/p>
} else {<\/p>
digitalWrite(servoPin, LOW);<\/p>
delay(1000);<\/p>
}<\/p>
}<\/p><\/pre>\n
ESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\u53ef\u4ee5\u5b9e\u73b0\u667a\u80fd\u63a7\u5236\uff0c\u4f7f\u60a8\u53ef\u4ee5\u8f7b\u677e\u63a7\u5236\u8235\u673a\u79fb\u52a8\u3002<\/strong>\u672c\u6587\u4ecb\u7ecd\u4e86ESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\u7684\u57fa\u672c\u539f\u7406\u3001\u7535\u8def\u8bbe\u8ba1\u548c\u5b9e\u73b0\u6b65\u9aa4\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528ESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\u5b9e\u73b0\u667a\u80fd\u63a7\u5236\u3002\u901a\u8fc7\u4ee5\u4e0a\u4ecb\u7ecd\uff0c\u60a8\u5e94\u8be5\u53ef\u4ee5\u8f7b\u677e\u638c\u63e1ESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\u7684\u57fa\u672c\u77e5\u8bc6\uff0c\u4ece\u800c\u5b9e\u73b0\u667a\u80fd\u63a7\u5236\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" ESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\uff0c\u53ef\u4ee5\u5b9e\u73b0\u667a\u80fd\u63a7\u5236\uff0c\u4f7f\u60a8\u53ef\u4ee5\u8f7b\u677e\u63a7\u5236\u8235\u673a\u79fb\u52a8\u3002\u672c\u6587\u5c06\u4ecb\u7ecdESP32\u6309\u952e\u63a7\u5236\u8235\u673aArduino\u7684\u57fa\u672c\u539f\u7406\u3001\u7535\u8def\u8bbe\u8ba1\u548c\u5b9e\u73b0\u6b65\u9aa4\uff0c\u4ee5\u53ca\u5982\u4f55\u4f7f<\/p>\n","protected":false},"author":1,"featured_media":4132,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[325,322,305],"class_list":["post-41205","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-arduino","tag-esp32","tag-dzjs"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/41205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=41205"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/41205\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=41205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=41205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=41205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}