{"id":311350,"date":"2020-10-12T21:00:39","date_gmt":"2020-10-12T21:00:39","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=311350"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=311350","title":{"rendered":"\u041f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u0441 web-\u043a\u0430\u043c\u0435\u0440\u043e\u0439 \u043d\u0430 ESP32"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/523174\/\">\u0418\u0434\u0435\u044f \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0441 web-\u043a\u0430\u043c\u0435\u0440\u043e\u0439 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043f\u043e\u043d\u0442\u0430\u043d\u043d\u043e. \u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0438\u043c\u0435\u0442\u044c \u0432 \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0435 \u0441\u043a\u0440\u043e\u043c\u043d\u043e\u0439 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 IP-\u043a\u0430\u043c\u0435\u0440\u044b. \u0418 \u0442\u0443\u0442 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441 \u0432 \u0446\u0435\u043d\u0435 \u0438\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435, \u0441\u043a\u043e\u0440\u0435\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u043c. \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u043c \u0434\u043b\u044f \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 DIY \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0432\u0440\u043e\u0434\u0435 <a href=\"https:\/\/github.com\/emakefun\/hummer-bot.git\" rel=\"nofollow\">\u044d\u0442\u043e\u0433\u043e<\/a><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u0441\u0431\u043e\u0440\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/c9\/3o\/of\/c93oofvgpd1wl9itmewgqwtnwwi.jpeg\" alt=\"image\"><\/p>\n<h2>\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0443\u044e\u0449\u0438\u0435<\/h2>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u0430\u0437\u044b \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 <b>\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0434\u0432\u0443\u0445\u043f\u0430\u043b\u0443\u0431\u043d\u0430\u044f \u0440\u043e\u0431\u043e-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430<\/b> <a href=\"https:\/\/aliexpress.ru\/item\/32854302809.html\" rel=\"nofollow\">Car Chassis 2WD Mini Kit<\/a><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/rz\/lr\/d1\/rzlrd1oy3vy81mbfikttht5j8fu.jpeg\" alt=\"image\"><\/p>\n<p>  \u0420\u0430\u0437\u043c\u0435\u0440\u044b \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b: 135 \u043c\u043c \u0445 135 \u043c\u043c \u0445 80 \u043c\u043c<\/p>\n<p>  \u041f\u0440\u0438\u0432\u043e\u0434\u043e\u043c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u0432\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 <b>\u043c\u043e\u0442\u043e\u0440-\u043a\u043e\u043b\u0435\u0441\u0430 \u0441 \u0440\u0435\u0434\u0443\u043a\u0442\u043e\u0440\u043e\u043c \u0438 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0435\u043c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0430<\/b> \u0441 \u0440\u0430\u0441\u0442\u0440\u043e\u0432\u044b\u043c\u0438 \u0434\u0438\u0441\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438:<\/p>\n<ul>\n<li> \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a: 250 \u043c\u0410 \u043c\u0430\u043a\u0441. \u043f\u0440\u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0438 3,6 \u0412<\/li>\n<li> \u043a\u0440\u0443\u0442\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 800 \u0433\/\u0441\u043c (\u043f\u0440\u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0438 6\u0412)<\/li>\n<li> \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f: 6 \u2014 8 \u0412<\/li>\n<li> \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0431\u0435\u0437 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438: 170 \u043e\u0431\/\u043c\u0438\u043d (\u043f\u0440\u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0438 3,6 \u0412)<\/li>\n<li> \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0440\u0435\u0434\u0443\u043a\u0442\u043e\u0440\u0430: 1: 48<\/li>\n<li> \u043e\u0441\u0438 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0441 \u0434\u0432\u0443\u0445 \u0441\u0442\u043e\u0440\u043e\u043d<\/li>\n<li> \u0434\u0438\u0430\u043c\u0435\u0442\u0440 \u043e\u0441\u0435\u0439: 5 \u043c\u043c<\/li>\n<li> \u0440\u0430\u0437\u043c\u0435\u0440\u044b: 64x20x20 \u043c\u043c<\/li>\n<li> \u0432\u0435\u0441: 26 \u0433<\/li>\n<\/ul>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <b>\u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f<\/b> \u0432\u044b\u0431\u0440\u0430\u043d \u043c\u043e\u0434\u0443\u043b\u044c MX1508<br \/>  \u041f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u043e \u043c\u043e\u0434\u0443\u043b\u044c \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/robotchip.ru\/obzor-drayvera-motora-mx1508\/\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2f\/lj\/c8\/2fljc8oume8wcne8fwpyv1c7gky.png\" alt=\"image\"><\/p>\n<p>  \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b:<\/p>\n<ul>\n<li>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f: 2 \u2014 10 \u0412<\/li>\n<li>\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430 \u043d\u0430 \u043e\u0434\u0438\u043d \u043a\u0430\u043d\u0430\u043b: 1.5 \u0410 (\u043f\u0438\u043a\u043e\u0432\u044b\u0439 \u0442\u043e\u043a 2.5 \u0410, \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434)<\/li>\n<li> \u0412\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u043b\u043e\u0433\u0438\u043a\u0430: 5 \u0412<\/li>\n<li> \u0413\u0430\u0431\u0430\u0440\u0438\u0442\u044b: 24,7 \u0445 21 \u0445 0,5 \u043c\u043c<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f IP \u043a\u0430\u043c\u0435\u0440\u044b \u0432\u044b\u0431\u0440\u0430\u043d\u044b \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 <b>\u0441\u0435\u0440\u0432\u043e\u0434\u0432\u0438\u0436\u043a\u0438<\/b> <a href=\"http:\/\/www.towerpro.com.tw\/product\/sg90-7\/\" rel=\"nofollow\">SG90 2\u043a\u0433<\/a><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_e\/j3\/f2\/_ej3f201y4vqmtlrza_mx0uvv8k.jpeg\" alt=\"image\"><\/p>\n<p>  \u041d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f:<\/p>\n<ul>\n<li>Weight: 9g<\/li>\n<li>Dimension: 23\u00d712.2x29mm<\/li>\n<li>Stall torque: 1.8kg\/cm(4.8v)<\/li>\n<li>Gear type: POM gear set<\/li>\n<li>Operating speed: 0.1sec\/60degree(4.8v)<\/li>\n<li>Operating voltage: 4.8v<\/li>\n<li>Temperature range: 0\u2103_ 55\u2103<\/li>\n<li>Dead band width: 1us<\/li>\n<li>Power Supply: Through External Adapter<\/li>\n<li>servo wire length: 25 cm<\/li>\n<li>Servo Plug: JR (Fits JR and Futaba)<\/li>\n<\/ul>\n<p>  <b>\u0414\u043b\u044f web-\u043a\u0430\u043c\u0435\u0440\u044b \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0434\u0435\u0440\u0436\u0430\u0442\u0435\u043b\u044c <a href=\"https:\/\/aliexpress.ru\/item\/32854302809.html\" rel=\"nofollow\">FPV Bracket Kit<\/a> <\/b><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/i5\/il\/wv\/i5ilwv-a3egowwx6guke6juaxb0.jpeg\" alt=\"image\"><\/p>\n<p>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0434\u0435\u0440\u0436\u0430\u0442\u0435\u043b\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435: \u201cFPV \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c FPV-\u043a\u0430\u043c\u0435\u0440\u0443 \u0432 3-\u0445 \u043f\u043b\u043e\u0441\u043a\u043e\u0441\u0442\u044f\u0445. \u041f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u043a \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 \u0438\u043b\u0438 \u043f\u043e\u043b\u0435\u0442\u043d\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430\u043c\u0438 EMAX 9g ES08A Mini Servo \u0438\u043b\u0438 \u0441\u0435\u0440\u0432\u0430\u043c\u0438 SG90 (\u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u043c\u0438).\u201d<br \/>  \u201c\u0421 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430\u043c\u0438\u201d \u2014 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u043b\u044c\u043d\u0438\u043a\u043e\u043c \u0432 \u043f\u0440\u044f\u043c\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435. \u041d\u043e \u0434\u043b\u044f DIY \u0437\u0430 $0.36 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0435\u0431\u0435 \u043d\u0438\u0447\u0435\u0433\u043e. \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0436\u0430\u043b\u043e\u0432\u0430\u043b\u0438\u0441\u044c, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u043b\u0430, \u0438 \u0441\u0435\u0440\u0432\u044b \u043d\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0438 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430\u043c, \u0432 \u043c\u043e\u0435\u043c \u0436\u0435 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0441\u0435 \u043d\u043e\u0440\u043c. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0432\u0430 \u0434\u0432\u0438\u0436\u043a\u0430 SG90 \u0434\u043b\u044f \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u043a\u0430\u043c\u0435\u0440\u044b. \u0412\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0440\u0430\u0441\u043f\u0435\u0447\u0430\u0442\u0430\u0442\u044c \u043d\u0430 3D-\u043f\u0440\u0438\u043d\u0442\u0435\u0440\u0435 \u0442\u043e\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0441\u044f, \u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043f\u043e\u043a\u0430 \u043d\u0430 \u044d\u0442\u043e\u043c \u0434\u0435\u0440\u0436\u0430\u0442\u0435\u043b\u0435.<\/p>\n<p>  <b>IP \u041a\u0430\u043c\u0435\u0440\u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 ESP32 CAM<\/b><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/z-\/ab\/dr\/z-abdre8-f7nq7qx2pbwmuvbka0.jpeg\" alt=\"image\"><\/p>\n<p>  \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e: \u201c<a href=\"https:\/\/www.esp32.com\/viewtopic.php?t=5603#p24343\" rel=\"nofollow\">The I2S subsystem in the ESP32<\/a> also provides a high speed bus connected directly to RAM for Direct Memory Access. Putting it simply, you can configure the ESP32 I2S subsystem to send or receive parallel data under hardware control.\u201d<br \/>  \u0422.\u0435. \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 I2S ESP32 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0438\u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0434 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c, \u0447\u0442\u043e \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a\u0430\u043c\u0435\u0440\u044b. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u044b \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f <a href=\"https:\/\/www.seeedstudio.com\/ESP32-CAM-Development-Board-with-camer-p-3153.html\" rel=\"nofollow\">Seeed Studio,<\/a> \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0446\u0435\u043d\u0430 $9.90, \u043d\u043e \u0432 \u043d\u0430\u0448\u0438\u0445 \u0440\u0430\u0434\u0438\u043e\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 \u043f\u0440\u043e\u0434\u0430\u044e\u0442 \u0437\u0430 $8, \u0432\u0438\u0434\u0438\u043c\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e Seeed Studio \u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c.<\/p>\n<p>  \u0422\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<ul>\n<li>The smallest 802.11b\/g\/n Wi-Fi BT SoC Module<\/li>\n<li> Low power 32-bit CPU,can also serve the application processor<\/li>\n<li> Up to 160MHz clock speed\uff0cSummary computing power up to 600 DMIPS<\/li>\n<li> Built-in 520 KB SRAM, external 4MPSRAM<\/li>\n<li> Supports UART\/SPI\/I2C\/PWM\/ADC\/DAC<\/li>\n<li> Support OV2640 and OV7670 cameras,Built-in Flash lamp.<\/li>\n<li> Support image WiFI upload<\/li>\n<li> Support TF card<\/li>\n<li> Supports multiple sleep modes.<\/li>\n<li> Embedded Lwip and FreeRTOS<\/li>\n<li> Supports STA\/AP\/STA+AP operation mode<\/li>\n<li> Support Smart Config\/AirKiss technology<\/li>\n<li> Support for serial port local and remote firmware upgrades (FOTA)<\/li>\n<\/ul>\n<h4>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u043f\u0438\u0442\u0430\u043d\u0438\u044f<\/h4>\n<p>  \u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u043e\u0442 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e\u0433\u043e \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0431\u0435\u0437 \u043f\u043e\u0434\u0437\u0430\u0440\u044f\u0434\u043a\u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u043e\u0441\u044c. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430 \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0438\u0442\u0430\u043d\u0438\u044f 2\u0410 \u043d\u0430 18650 \u0441 USB-\u0432\u044b\u0445\u043e\u0434\u043e\u043c \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0442\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/k1\/8o\/e-\/k18oe-zz1kawhmnu_n6ia9_kgoo.jpeg\" alt=\"image\"><\/p>\n<p>  \u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438:  <\/p>\n<ul>\n<li>\u0422\u0438\u043f \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430: 18650 Li-Ion (\u0431\u0435\u0437 \u0437\u0430\u0449\u0438\u0442\u044b)<\/li>\n<li>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0437\u0430\u0440\u044f\u0434\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430: \u043e\u0442 5\u0412 \u0434\u043e 8\u0412<\/li>\n<li>\u0412\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f:<\/li>\n<li>3\u0412 \u2014 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0449\u0438\u0442\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e<\/li>\n<li>5\u0412 \u2014 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0432\u044b\u0448\u0430\u044e\u0449\u0438\u0439 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/li>\n<li>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u043e\u043a:<\/li>\n<li>\u0412\u044b\u0445\u043e\u0434 3\u0412 \u2014 1\u0410<\/li>\n<li>\u0412\u044b\u0445\u043e\u0434 5\u0412 \u2014 2\u0410<\/li>\n<li>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a \u0437\u0430\u0440\u044f\u0434\u043a\u0438: 1\u0410<\/li>\n<li>\u0422\u0438\u043f \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u044a\u0451\u043c\u0430: micro-USB<\/li>\n<li>\u0422\u0438\u043f \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u044a\u0451\u043c\u0430: USB-A<\/li>\n<li>\u041f\u043e\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043b\u0435\u0439 5\u0412 \u2014 \u043e\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0433\u043e \u0437\u0430\u043c\u044b\u043a\u0430\u043d\u0438\u044f<\/li>\n<li>\u0413\u0430\u0431\u0430\u0440\u0438\u0442\u043d\u044b\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u044b:<\/li>\n<li>\u041f\u0435\u0447\u0430\u0442\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430: 29,5 \u0445 99,5 \u0445 19 \u043c\u043c<\/li>\n<li>\u0412\u0441\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430: 30 \u0445 116 \u0445 20 \u043c\u043c<\/li>\n<\/ul>\n<p>  <b>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0432\u044b\u0431\u0440\u0430\u043d ESP-WROOM-32<\/b><\/p>\n<p>  \u0420\u0430\u043d\u0435\u0435 \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 ESP32 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e. \u0417\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u044f:  <\/p>\n<ul>\n<li>32-\u0431\u0438\u0442\u043d\u044b\u0439 \u0434\u0432\u0443\u044f\u0434\u0435\u0440\u043d\u044b\u0439 \u043c\u0438\u043a\u0440\u043e\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 Xtensa LX6 \u0434\u043e 240 \u041c\u0413\u0446<\/li>\n<li>\u0424\u043b\u0435\u0448-\u043f\u0430\u043c\u044f\u0442\u044c: 4 \u041c\u0411<\/li>\n<li>\u0411\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c Wi-Fi 802.11b\/g\/n \u0434\u043e 150 \u041c\u0431\/c, Bluetooth 4.2 BR\/EDR\/BLE<\/li>\n<li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 STA\/AP\/STA+AP \u0440\u0435\u0436\u0438\u043c\u043e\u0432, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0435\u043a TCP\/IP<\/li>\n<li>GPIO 32 (UART, SPI, I2C, I2S \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b, \u0428\u0418\u041c, SD \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b, \u0435\u043c\u043a\u043e\u0441\u0442\u043d\u044b\u0435 \u0441\u0435\u043d\u0441\u043e\u0440\u043d\u044b\u0435, \u0410\u0426\u041f, \u0426\u0410\u041f \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e<\/li>\n<li>\u041f\u0438\u0442\u0430\u043d\u0438\u0435: \u0447\u0435\u0440\u0435\u0437 microUSB \u0440\u0430\u0437\u044a\u0435\u043c (CP2102 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c) \u0438\u043b\u0438 \u0432\u044b\u0432\u043e\u0434\u044b<\/li>\n<li>\u0428\u0430\u0433 \u0432\u044b\u0432\u043e\u0434\u043e\u0432: 2.54 \u043c\u043c (\u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043c\u0430\u043a\u0435\u0442\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0443)<\/li>\n<li>\u0420\u0430\u0437\u043c\u0435\u0440 \u043f\u043b\u0430\u0442\u044b: 5.2 \u0445 2.8 \u0441\u043c<\/li>\n<\/ul>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 <b>\u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438<\/b> \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u044b \u0434\u0432\u0430 \u043e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u043e\u0432 \u201cNoname\u201d \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432 \u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0442\u0440\u043e\u0432\u044b\u0445 \u0434\u0438\u0441\u043a\u043e\u0432 \u043c\u043e\u0442\u043e\u0440-\u043a\u043e\u043b\u0435\u0441\u0430<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1y\/72\/ma\/1y72mapjvdyqcsz1714lzldwxbk.jpeg\" alt=\"image\"><\/p>\n<p>  \u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438:  <\/p>\n<ul>\n<li>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f: 3,3\u0412 \u2014 5\u0412<\/li>\n<li>\u0428\u0438\u0440\u0438\u043d\u0430 \u043f\u0430\u0437\u0430 \u0434\u0430\u0442\u0447\u0438\u043a\u0430: 6 \u043c\u043c;<\/li>\n<li>\u0422\u0438\u043f \u0432\u044b\u0445\u043e\u0434\u0430: \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0438 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439<\/li>\n<li>\u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440: c\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0432\u044b\u0445\u043e\u0434\u0430<\/li>\n<\/ul>\n<p>  \u0414\u043b\u044f <b>\u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0443\u043b\u044c\u0442\u0440\u0430\u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u0434\u0430\u043b\u044c\u043d\u043e\u043c\u0435\u0440 HC-SR04<\/b><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ca\/v6\/1d\/cav61dmzfenw3wd3izyzfmlgvek.jpeg\" alt=\"image\"><\/p>\n<p>  \u0425\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438:  <\/p>\n<ul>\n<li>\u041d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f: 5 \u0412<\/li>\n<li>\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0442\u0438\u0448\u0438\u043d\u044b: 2 \u043c\u0410<\/li>\n<li>\u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435: 15 \u043c\u0410<\/li>\n<li>\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0439: 2\u2013400 \u0441\u043c<\/li>\n<li>\u042d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0443\u0433\u043e\u043b \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f: 15<\/li>\n<li>\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0443\u0433\u043e\u043b \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f: 30\u00b0<\/li>\n<\/ul>\n<h2>\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/h2>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u0441\u0442\u0430\u043b\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0438 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u044f ESP32 CAM. <br \/>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u043d\u0430 <a href=\"https:\/\/habr.com\/ru\/post\/463157\/\">\u0425\u0430\u0440\u0431\u0435,<\/a> <a href=\"http:\/\/psenyukov.ru\/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE%D0%BA%D0%B0%D0%BC%D0%B5%D1%80%D0%B0-%D0%BD%D0%B0-esp32\/\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c,<\/a> <a href=\"https:\/\/voltiq.ru\/esp32-cam-video-web-server\/\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a> \u0438 \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445.<br \/>  \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0441\u0442\u0430\u0442\u044c\u0438 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 <a href=\"https:\/\/randomnerdtutorials.com\/esp32-cam-video-streaming-face-recognition-arduino-ide\/\" rel=\"nofollow\">\u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Arduino IDE.<\/a> \u0412 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0438 \u043c\u0435\u043d\u044f \u043f\u043e-\u043d\u0430\u0447\u0430\u043b\u0443 \u044d\u0442\u043e\u0442 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0442\u043e\u0436\u0435 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043b.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/xy\/zt\/ad\/xyztad9kgjjvh9pn2cyxtlztgxe.png\" alt=\"image\"><\/p>\n<p>  \u0412 \u0440\u0430\u0434\u0438\u043e\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430\u0445 \u043c\u043e\u0434\u0443\u043b\u0438 ESP32-CAM \u043f\u0440\u043e\u0434\u0430\u044e\u0442\u0441\u044f \u0441 \u043a\u0430\u043c\u0435\u0440\u043e\u0439 OV2640, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0441\u043a\u0435\u0442\u0447\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435:<\/p>\n<pre><code class=\"cpp\">\/\/ Select camera model \/\/#define CAMERA_MODEL_WROVER_KIT \/\/#define CAMERA_MODEL_ESP_EYE \/\/#define CAMERA_MODEL_M5STACK_PSRAM \/\/#define CAMERA_MODEL_M5STACK_WIDE #define CAMERA_MODEL_AI_THINKER <\/code><\/pre>\n<p>  \u0410 \u0442\u0430\u043a\u0436\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c SSID \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u043a \u0442\u043e\u0447\u043a\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 Wi-Fi<\/p>\n<pre><code class=\"cpp\">const char* ssid = &quot;REPLACE_WITH_YOUR_SSID&quot;; const char* password = &quot;REPLACE_WITH_YOUR_PASSWORD&quot;; <\/code><\/pre>\n<p>  \u041e\u0434\u043d\u0438\u043c \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0440\u0430\u0431\u043e\u0442\u044b web-\u043a\u0430\u043c\u0435\u0440\u044b \u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u043e\u043a\u0441\u0438-\u0441\u0435\u0440\u0432\u0435\u0440 Keenetic. \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0439 \u0440\u043e\u0443\u0442\u0435\u0440 Keenetik Viva. \u0421\u0435\u0440\u0432\u0438\u0441 KeenDNS \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c\u0443 web-\u0440\u0435\u0441\u0443\u0440\u0441\u0443. \u041d\u043e \u043a \u043c\u043e\u0435\u043c\u0443 \u0443\u0434\u0438\u0432\u043b\u0435\u043d\u0438\u044e \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u0443\u0434\u0430\u0447\u0435\u0439. \u041f\u0440\u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u043e\u0448\u0438\u0431\u043a\u0443 \u00abHeader fields are too long for server to interpret\u00bb. \u0421 <a href=\"https:\/\/github.com\/espressif\/arduino-esp32\/issues\/2983\" rel=\"nofollow\">\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439<\/a> \u044f \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f. \u0420\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 CONFIG_HTTPD_MAX_REQ_HDR_LEN, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440<\/p>\n<pre><code class=\"cpp\">#define CONFIG_HTTPD_MAX_REQ_HDR_LEN 2048 <\/code><\/pre>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Arduino IDE ESP32 \u043c\u043e\u0434\u0443\u043b\u0438 \u0443\u0436\u0435 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b \u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u0432 Windows \u043f\u043e \u043f\u0443\u0442\u0438 \u2014 %userprofile%\\AppData\\Local\\Arduino15\\packages\\esp32\\hardware\\esp32\\1.0.4\\tools\\sdk\\<br \/>  \u041f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0434\u0430\u0441\u0442.<br \/>  \u0422\u043e \u0435\u0441\u0442\u044c \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ESP-IDF.<br \/>  \u0420\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043b\u043e \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/github.com\/espressif\/esp-who\" rel=\"nofollow\">github.com\/espressif\/esp-who<\/a>. \u0412 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442 camera_web_server, \u0434\u0435\u043b\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430, \u043d\u0443 \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a Wi-Fi<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ur\/kh\/9d\/urkh9danvm4c8on5p7hyntjaytm.png\" alt=\"image\"><\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0435\u043a\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f, \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0447\u0435\u043a-\u0431\u043e\u043a\u0441 \u2014 Support array \u2018rtc_gpio_desc\u2019 for ESP32<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/j6\/ir\/fn\/j6irfna1y2d0osmoor8mtnjvhl8.png\" alt=\"image\"><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043f\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c\u0443 IP \u0430\u0434\u0440\u0435\u0441\u0443 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0441 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c \u043d\u0430\u0448\u0435\u0439 web-\u043a\u0430\u043c\u0435\u0440\u044b. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/pp\/nn\/j2\/ppnnj22on55b4kdxs0u2rorb-xw.png\" alt=\"image\"><\/p>\n<p>  \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e\u0445\u043e\u0436 \u043d\u0430 Arduino \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b.<\/p>\n<p>  \u042f \u0432\u043d\u0435\u0441 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b app_httpd.c \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u043c \u0432\u044b\u0432\u043e\u0434\u0430 GPIO_NUM_2 \u0441 web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u0425\u043e\u0442\u044f \u0432 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043c\u043e\u0434\u0443\u043b\u044f \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c\u0441\u044f \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0438\u043d\u043e\u0432 \u0434\u043b\u044f \u043d\u0443\u0436\u0434 SD-\u043a\u0430\u0440\u0442\u044b, \u043d\u043e \u044f \u0435\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0433\u0443 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0438\u043d\u044b.<\/p>\n<pre><code class=\"cpp\">void app_httpd_main() { \tgpio_set_direction(GPIO_NUM_2, GPIO_MODE_OUTPUT);  static esp_err_t cmd_handler(httpd_req_t *req) { ....... \/\/\u0441\u0442\u0440\u043e\u0447\u043a\u0430 736 else if(!strcmp(variable, &quot;gpio2&quot;)) {     \t\tif (val == 0)                 gpio_set_level(GPIO_NUM_2, 0);             else                 gpio_set_level(GPIO_NUM_2, 1);     \t} <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0434\u0438\u0441\u0442\u0430\u043d\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044f \u043d\u0430\u0432\u0435\u0440\u0441\u0442\u0430\u043b \u043d\u0435\u0437\u0430\u043c\u044b\u0441\u043b\u043e\u0432\u0430\u0442\u0443\u044e \u043f\u0430\u043d\u0435\u043b\u044c \u043d\u0430 Node-Red, \u0447\u0442\u043e \u043a\u0440\u0443\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 Raspberry pi.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qu\/o3\/it\/quo3itp-thbmebyirtjotolszhc.png\" alt=\"image\"><\/p>\n<p>  \u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u0438\u0434\u0435\u043e\u043f\u043e\u0442\u043e\u043a\u0430 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432 \u043d\u043e\u0434\u0443 template:<\/p>\n<pre><code class=\"xml\">&lt;iframe      src=&quot;http:\/\/192.168.1.61&quot;     width=&quot;300&quot; height=&quot;300&quot;&gt; &lt;\/iframe&gt; <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u0432\u0430\u0436\u0435\u043d \u043e\u0434\u0438\u043d \u043c\u043e\u043c\u0435\u043d\u0442: \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e http, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 https \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 Content-Security-Policy. \u0415\u0441\u043b\u0438 \u0436\u0435 \u0438 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"javascript\">&lt;script&gt;     var meta = document.createElement('meta');     meta.httpEquiv = &quot;Content-Security-Policy&quot;;     meta.content = &quot;default-src * 'unsafe-inline' 'unsafe-eval'; script-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src *; style-src * 'unsafe-inline';&quot;; document.getElementsByTagName('head')[0].appendChild(meta); &lt;\/script&gt; <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0438\u043d\u043e\u043c GPIO_NUM_2 \u043c\u043e\u0434\u0443\u043b\u044f ESP32-CAM \u043f\u043e\u0441\u043b\u0435 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043f\u0440\u043e\u0448\u0438\u0432\u043a\u0443 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 http GET \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code class=\"bash\">http:\/\/192.168.1.61\/control?var=gpio2&amp;val=1 \/\/\u0438\u043b\u0438 0 <\/code><\/pre>\n<p>  \u041d\u0430 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0435 \u043f\u0430\u043d\u0435\u043b\u0438 \u2014 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u0435\u043b\u044c wakeup, \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vt\/2p\/sl\/vt2pslqgpx9oop7ng-kgkef2bmy.png\" alt=\"image\"><\/p>\n<p>  \u0433\u0434\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f request:<\/p>\n<pre><code class=\"javascript\">var newMsg = {} var i = msg.payload ? 1 : 0; newMsg.query = &quot;control?var=gpio2&amp;val=&quot; + i node.send(newMsg) <\/code><\/pre>\n<p>  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u043e\u0434\u044b http request:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/a-\/vn\/m2\/a-vnm2e1-mxl8yepj6jlt4qdkkc.png\" alt=\"image\"><\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u043f\u043e MQTT<\/p>\n<h4>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a Wi-Fi \u0438 MQTT<\/h4>\n<p>  \u042f \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Arduino \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a, \u0442\u0430\u043a \u043a\u0430\u043a \u044f \u043d\u0430 \u043d\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043b. \u041d\u043e \u0432 \u0438\u0442\u043e\u0433\u0435 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0443 \u043c\u0435\u043d\u044f \u043d\u0430 ESP-IDF.<\/p>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430 #include &lt;WiFi.h&gt;<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a Wi-Fi \u0434\u043b\u044f Arduino \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">void setup_wifi() {   Serial.println(&quot;Starting connecting WiFi.&quot;);   delay(1000);   for (int8_t i = 0; i &lt; 3; i++)   {     WiFi.begin(ssid, password);     uint32_t start = millis();     while (WiFi.status() != WL_CONNECTED &amp;&amp; ((millis() - start) &lt; 4000))     {       Serial.print(&quot;.&quot;);       delay(500);     }     if (WiFi.status() == WL_CONNECTED)     {       Serial.println(&quot;WiFi connected&quot;);       Serial.println(&quot;IP address: &quot;);       Serial.println(WiFi.localIP());       return;     }     else     {       Serial.println(&quot;Connecting Failed&quot;);       \/\/WiFi.reconnect(); \/\/ this reconnects the AP so the user can stay on the page     }   } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0438\u043a\u043b \u043d\u0430 \u0442\u0440\u0438 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438, \u0442.\u043a. \u0441 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u043e\u043f\u044b\u0442\u043a\u0438 \u0447\u0430\u0441\u0442\u043e \u043d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0434\u0435\u0442 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 WL_CONNECTED. \u041c\u043e\u0436\u0435\u0442 \u043a\u0430\u043a-\u0442\u043e \u043f\u043e-\u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0448\u0438\u0442\u044c, \u043d\u043e \u0442\u0430\u043a \u0442\u043e\u0447\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a MQTT \u0434\u043b\u044f Arduino \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/knolleary\/pubsubclient.git\" rel=\"nofollow\">github.com\/knolleary\/pubsubclient.git<\/a>.<\/p>\n<p>  \u0414\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a #include &lt;PubSubClient.h&gt;<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a MQTT<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">bool setup_mqtt() {   if (WiFi.status() == WL_CONNECTED)   {     if (!client.connected())     {       client.setServer(mqtt_server, 1883);       client.setCallback(callback);     }     Serial.print(&quot;Connecting to MQTT server &quot;);     Serial.print(mqtt_server);     Serial.println(&quot;...&quot;);     String clientId = &quot;ESP32_car_client&quot;;     if (client.connect(clientId.c_str()))     {       Serial.println(&quot;Connected to MQTT server &quot;);       \/\/subscribing to topics       client.subscribe(&quot;esp32\/car\/#&quot;);       client.subscribe(&quot;esp32\/camera\/#&quot;);       return true;     }     else     {       Serial.println(&quot;Could not connect to MQTT server&quot;);       return false;     }   }   return false; } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a Wi-Fi, \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0431\u0440\u043e\u043a\u0435\u0440\u0443 client.setServer(mqtt_server, 1883);<\/p>\n<p>  \u0418 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043b\u043b\u0431\u0435\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044e client.setCallback(callback);<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">MQTT \u043a\u043e\u043b\u043b\u0431\u0435\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">void callback(char *topic, byte *payload, unsigned int length) {   Serial.println(&quot;Message arrived &quot;);   memset(payload_buf, 0, 10);   for (int i = 0; i &lt; length; i++)   {     payload_buf[i] = (char)payload[i];   }    command_t mqtt_command = {       .topic = topic,       .message = payload_buf};   xQueueSend(messageQueue, (void *)&amp;mqtt_command, 0); } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c\u0441\u044f \u043d\u0430 \u0442\u043e\u043f\u0438\u043a\u0438<\/p>\n<pre><code class=\"cpp\">client.subscribe(&quot;esp32\/car\/#&quot;); client.subscribe(&quot;esp32\/camera\/#&quot;); <\/code><\/pre>\n<p>  \u0411\u044b\u043b\u0438 \u0437\u0430\u043c\u0435\u0447\u0435\u043d\u044b \u0441\u043b\u0443\u0447\u0430\u0438 \u201c\u043e\u0442\u0432\u0430\u043b\u0438\u0432\u0430\u043d\u0438\u044f\u201d MQTT \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0432 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u043f\u0440\u043e\u0441\u0430.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u043e\u043f\u0440\u043e\u0441\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">void pollingTask(void *parameter) {   int32_t start = 0;    while (true) {     if (!client.connected()) {       long now = millis();       if (now - start &gt; 5000) {         start = now;         \/\/ Attempt to reconnect         if (setup_mqtt()) {           start = 0;         }       }     }     else {       client.loop();       int val = digitalRead(WAKEUP_PIN);       if (val == LOW) {         Serial.println(&quot;Going to sleep now&quot;);         esp_deep_sleep_start();       }     }     vTaskDelay(100 \/ portTICK_PERIOD_MS);   }   vTaskDelete(NULL); } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a Wi-FI \u0438 MQTT c \u043f\u043e\u043c\u043e\u0449\u044c\u044e ESP-IDF \u0431\u044b\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 <a href=\"https:\/\/habr.com\/ru\/post\/522730\/\">\u0441\u0442\u0430\u0442\u044c\u0435<\/a><\/p>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f ESP-IDF \u0433\u043b\u044e\u043a\u043e\u0432 \u043f\u0440\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u043a Wi-Fi \u0438 MQTT \u043d\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u043b\u043e\u0441\u044c. \u041e\u0434\u0438\u043d \u043d\u044e\u0430\u043d\u0441 \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 MQTT \u0442\u043e\u043f\u0438\u043a\u0430 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 esp_err_t mqtt_event_handler(esp_mqtt_event_handle_t event): \u043f\u0440\u0438 \u0442\u0438\u043f\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f MQTT_EVENT_DATA \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b event-&gt;topic_len \u0438 event-&gt;data_len \u0438 \u0431\u0440\u0430\u0442\u044c \u0438\u043c\u044f \u0442\u043e\u043f\u0438\u043a\u0430 \u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u0434\u043b\u0438\u043d\u044b, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043c\u0443\u0441\u043e\u0440. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0443\u0444\u0435\u0440\u043d\u044b\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0438\u043b\u0438 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0430\u043c\u044f\u0442\u044c \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 (\u0437\u0430\u0442\u0435\u043c \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u0435\u0435), \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a<\/p>\n<pre><code class=\"cpp\">strncpy(topic, event-&gt;topic, event-&gt;topic_len); strncpy(data, event-&gt;data, event\u2192data_len); <\/code><\/pre>\n<p>  \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0442\u043e\u043f\u0438\u043a \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 esp_mqtt_client_publish<\/p>\n<pre><code class=\"cpp\">esp_mqtt_client_publish(client, topics[i], topic_buff[i], 0,0,0); <\/code><\/pre>\n<h4>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u043b\u044c\u0442\u0440\u0430\u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 HC-SR04<\/h4>\n<p>  HC-SR04 \u2013 \u0434\u0435\u0448\u0435\u0432\u044b\u0439 \u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0434\u0430\u0442\u0447\u0438\u043a \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0441 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430\u043c\u0438. \u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0432 \u0441\u0435\u0442\u0438 \u043a\u0443\u0447\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0430 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443: <a href=\"https:\/\/arduinomaster.ru\/datchiki-arduino\/ultrazvukovoj-dalnomer-hc-sr04\/\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a> \u0438 <a href=\"http:\/\/wiki.amperka.ru\/%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D1%8B:hc-sr04-ultrasonic-sensor-distance-module\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c.<\/a> \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"http:\/\/raspoid.com\/download\/datasheet\/HCSR04\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c,<\/a> \u0430 \u043a\u0440\u0430\u0442\u043a\u0438\u0439 \u0434\u0430\u0442\u0430\u0448\u0438\u0442 <a href=\"https:\/\/cdn.sparkfun.com\/datasheets\/Sensors\/Proximity\/HCSR04.pdf\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c.<\/a> <br \/>  \u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0434\u0430\u0442\u044c \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e 10 \u03bcs \u043d\u0430 \u043f\u0438\u043d Trig. \u042d\u0442\u043e \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0441\u0435\u043d\u0441\u043e\u0440\u043e\u043c 8 \u0446\u0438\u043a\u043b\u043e\u0432 \u0443\u043b\u044c\u0442\u0440\u0430\u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0433\u043e \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 \u0441 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 40 \u043a\u0413\u0446 \u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0440\u0430\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0443\u043b\u044c\u0442\u0440\u0430\u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0433\u043e \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430. \u041a\u043e\u0433\u0434\u0430 \u0434\u0430\u0442\u0447\u0438\u043a \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0443\u043b\u044c\u0442\u0440\u0430\u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u043e\u0442 \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0430, \u043e\u043d \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 Echo \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0438\u043e\u0434 (\u0448\u0438\u0440\u0438\u043d\u0443), \u043f\u0440\u043e\u043f\u043e\u0440\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044e. \u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0443\u043b\u0443:<\/p>\n<p>  <code> distance = duration * 340 \u043c\/\u0441 = duration * 0.034 \u043c\/\u043c\u043a\u0441, \u0433\u0434\u0435<br \/>  <\/code><br \/>  340 \u043c\/\u0441 \u2014 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0437\u0432\u0443\u043a\u0430 \u0432 \u0432\u043e\u0437\u0434\u0443\u0445\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/u_\/cg\/zf\/u_cgzfg3lpu6prumpchnjllsvii.png\" alt=\"image\"><\/p>\n<p>  \u0412 Arduino \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044f pulseIn \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u0437\u043d\u0430\u0442\u044c \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 \u0432 \u03bcs<br \/>  \u0414\u043b\u044f ESP-IDF \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 ESP-IDF <a href=\"https:\/\/github.com\/UncleRus\/esp-idf-lib\" rel=\"nofollow\">Components library,<\/a> \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0442\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 ultrasonic \u0434\u043b\u044f HC-SR04.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">esp_err_t ultrasonic_measure_cm(const ultrasonic_sensor_t *dev, uint32_t max_distance, uint32_t *distance) {     CHECK_ARG(dev &amp;&amp; distance);      PORT_ENTER_CRITICAL;      \/\/ Ping: Low for 2..4 us, then high 10 us     CHECK(gpio_set_level(dev-&gt;trigger_pin, 0));     ets_delay_us(TRIGGER_LOW_DELAY);     CHECK(gpio_set_level(dev-&gt;trigger_pin, 1));     ets_delay_us(TRIGGER_HIGH_DELAY);     CHECK(gpio_set_level(dev-&gt;trigger_pin, 0));      \/\/ Previous ping isn't ended     if (gpio_get_level(dev-&gt;echo_pin))         RETURN_CRITICAL(ESP_ERR_ULTRASONIC_PING);      \/\/ Wait for echo     int64_t start = esp_timer_get_time();     while (!gpio_get_level(dev-&gt;echo_pin))     {         if (timeout_expired(start, PING_TIMEOUT))             RETURN_CRITICAL(ESP_ERR_ULTRASONIC_PING_TIMEOUT);     }      \/\/ got echo, measuring     int64_t echo_start = esp_timer_get_time();     int64_t time = echo_start;     int64_t meas_timeout = echo_start + max_distance * ROUNDTRIP;     while (gpio_get_level(dev-&gt;echo_pin))     {         time = esp_timer_get_time();         if (timeout_expired(echo_start, meas_timeout))             RETURN_CRITICAL(ESP_ERR_ULTRASONIC_ECHO_TIMEOUT);     }     PORT_EXIT_CRITICAL;      *distance = (time - echo_start) \/ ROUNDTRIP;      return ESP_OK; } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u0435 \u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443. \u0418\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0446\u0438\u043a\u043b\u0435 while \u043f\u043e\u043a\u0430 \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0432\u044b\u0441\u043e\u043a\u0438\u0439 \u043d\u0430 Echo \u043f\u0438\u043d\u0435 (\u043f\u043e\u0441\u043b\u0435 \/\/ got echo, measuring) \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f <\/p>\n<pre><code class=\"cpp\">*distance = (time - echo_start) \/ ROUNDTRIP <\/code><\/pre>\n<p>  \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0432 \u0441\u0430\u043d\u0442\u0438\u043c\u0435\u0442\u0440\u0430\u0445 ROUNDTRIP = 58.<\/p>\n<p>  \u0412 Arduino \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0435\u0449\u0435 \u043f\u0440\u043e\u0449\u0435<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include &quot;ultrasonic.h&quot;  portMUX_TYPE mux = portMUX_INITIALIZER_UNLOCKED; #define PORT_ENTER_CRITICAL portENTER_CRITICAL(&amp;mux) #define PORT_EXIT_CRITICAL portEXIT_CRITICAL(&amp;mux)  Ultrasonic::Ultrasonic() {   pinMode(GPIO_NUM_33, OUTPUT);   pinMode(GPIO_NUM_26, INPUT); }  uint32_t Ultrasonic::calculateDistance() {     PORT_ENTER_CRITICAL;     digitalWrite(GPIO_NUM_33, LOW);     delayMicroseconds(2);     digitalWrite(GPIO_NUM_33, HIGH);     delayMicroseconds(10);     digitalWrite(GPIO_NUM_33, LOW);     duration = pulseIn(GPIO_NUM_26, HIGH);     PORT_EXIT_CRITICAL;     distance = duration \/ 58;     return distance; }  uint32_t Ultrasonic::getDistance() {     return distance; } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0411\u044b\u043b\u0430 \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ultrasonic ESP-IDF \u0434\u043b\u044f Arduino \u043f\u0440\u043e\u0435\u043a\u0442\u0430 ESP32, \u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e \u0434\u0435\u043b\u043e \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0433\u043b\u044e\u043a\u0430 \u0434\u0430\u0442\u0447\u0438\u043a\u0430. \u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0430\u043a, \u0442\u043e\u0447\u043d\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c. \u0413\u043b\u044e\u043a \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u2014 \u044d\u0442\u043e \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u043e\u0441\u0447\u0435\u0442 \u0432 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430\u0445 \u0438 \u0432\u044b\u0434\u0430\u0447\u0430 \u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0439, \u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0446\u0438\u0444\u0440\u0430\u0445 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442, \u043a\u0430\u043a \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0431\u043e\u043b\u0435\u0435 20000 \u0441\u043c. \u041d\u0430 \u0444\u043e\u0440\u0443\u043c\u0430\u0445 \u043f\u0438\u0448\u0443\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0438\u0437-\u0437\u0430 \u043d\u0435\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 (\u043a\u0438\u0442\u0430\u0439\u0441\u043a\u0430\u044f \u043a\u043e\u043f\u0438\u044f).<\/p>\n<h4>\u0418\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432<\/h4>\n<p>  \u041e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043e\u0432 \u0441\u043e\u0437\u0434\u0430\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440\u0430 LM393 \u0438 \u0449\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430. \u041f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0440\u0430\u0441\u0442\u0440\u043e\u0432\u044b\u043c\u0438 \u0434\u0438\u0441\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0434\u0435\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u0430\u043b \u0440\u0435\u0434\u0443\u043a\u0442\u043e\u0440\u0430 \u0438\u043b\u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f.<\/p>\n<p>  \u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438: <a href=\"http:\/\/digitrode.ru\/computing-devices\/mcu_cpu\/315-arduino-i-modul-fotoimpulsnogo-datchika-skorosti-vrascheniya-dvigatelya.html\" rel=\"nofollow\">digitrode.ru<\/a>, <a href=\"https:\/\/mirrobo.ru\/micro\/schityvanija-uglovoj-skorosti-jenkodery-dlja-arduino\/\" rel=\"nofollow\">mirrobo.ru<\/a>, \u0438 <a href=\"https:\/\/arduino-kit.ru\/product\/datchik-skorosti-vrascheniya\" rel=\"nofollow\">arduino-kit.ru<\/a>.<\/p>\n<p>  \u0421\u0445\u0435\u043c\u0430 \u0434\u0430\u0442\u0447\u0438\u043a\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/uu\/rv\/tj\/uurvtjwsbrvfa0_yh1xjfcre9ty.jpeg\" alt=\"image\"><\/p>\n<p>  \u0412 Arduino \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u043c\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<br \/>   \u2014 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e (\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443) \u0441\u0447\u0435\u0442\u0447\u0438\u043a\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440  <\/p>\n<pre><code class=\"cpp\">typedef struct {   int encoder_pin = ENCODER_PIN; \/\/ pulse output from the module   unsigned int rpm = 0; \/\/ rpm reading   volatile byte pulses = 0; \/\/ number of pulses   unsigned long timeold = 0;   unsigned int pulsesperturn = 20; } pulse_t; <\/code><\/pre>\n<p>  \u0417\u0430\u0442\u0435\u043c \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 setup \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d \u0438 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0433\u043e<\/p>\n<pre><code class=\"cpp\">pinMode(pulse_struct.encoder_pin, INPUT); attachInterrupt(pulse_struct.encoder_pin, counter, FALLING); <\/code><\/pre>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0431\u043e\u0440\u043e\u0442\u043e\u0432 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 <\/p>\n<pre><code class=\"cpp\">pulse_struct.rpm =          (60 * 1000 \/ pulse_struct.pulsesperturn )\/          (1000)* pulse_struct.pulses; <\/code><\/pre>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">void pulseTask(void *parameters) {   sensor_data_t data;   data.sensor = OPTICAL_SENSOR;   portBASE_TYPE xStatus;     while (true) {       \/\/Don't process interrupts during calculations       detachInterrupt(0);       pulse_struct.rpm =          (60 * 1000 \/ pulse_struct.pulsesperturn )\/          (1000)* pulse_struct.pulses;       pulse_struct.pulses = 0;       data.value = pulse_struct.rpm;       \/\/Restart the interrupt processing       attachInterrupt(0, counter, FALLING);       Serial.print(&quot;optical: &quot;);       Serial.println(data.value);      \/\/Sending data to sensors queue     xStatus = xQueueSend(sensorQueue, (void *)&amp;data, 0);     if( xStatus != pdPASS ) {      printf(&quot;Could not send optical to the queue.\\r\\n&quot;);     }     taskYIELD();     vTaskDelay(1000 \/ portTICK_PERIOD_MS);    } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0412 ESP-IDF \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a PCNT, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043e\u043f\u0438\u0441\u0430\u043d \u0432 <a href=\"https:\/\/habr.com\/ru\/post\/522730\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439<\/a> \u0441\u0442\u0430\u0442\u044c\u0435.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">typedef struct {       uint16_t delay; \/\/delay im ms       int pin;       int ctrl_pin;       pcnt_channel_t channel;       pcnt_unit_t unit;       int16_t count; } speed_sensor_params_t;  void pulseTask(void *parameters) {   sensor_data_t data_1;   sensor_data_t data_2;   data_1.sensor = OPTICAL_SENSOR_1;   data_2.sensor = OPTICAL_SENSOR_2;   portBASE_TYPE xStatus;    speed_sensor_params_t params_1 = {       .delay = 100,       .pin = ENCODER_1_PIN,       .ctrl_pin = GPIO_NUM_0,       .channel = PCNT_CHANNEL_0,       .unit = PCNT_UNIT_0,       .count = 0,   };     ESP_ERROR_CHECK(init_speed_sensor(&amp;params_1));      speed_sensor_params_t params_2 = {       .delay = 100,       .pin = ENCODER_2_PIN,       .ctrl_pin = GPIO_NUM_1,       .channel = PCNT_CHANNEL_0,       .unit = PCNT_UNIT_1,       .count = 0,   };     ESP_ERROR_CHECK(init_speed_sensor(&amp;params_2));      while(true) {         data_1.value = calculateRpm(&amp;params_1);         data_2.value = calculateRpm(&amp;params_2);         sensor_array[OPTICAL_SENSOR_1] = data_1.value;         sensor_array[OPTICAL_SENSOR_2] = data_2.value;         printf(&quot;speed 1 = %d\\n&quot;, data_1.value);         printf(&quot;speed 2 = %d\\n&quot;, data_2.value);         xStatus = xQueueSend(sensorQueue, (void *)&amp;data_1, 0);         xStatus = xQueueSend(sensorQueue, (void *)&amp;data_2, 0);         if( xStatus != pdPASS ) {         printf(&quot;Could not send optical to the queue.\\r\\n&quot;);         }         vTaskDelay(100 \/ portTICK_PERIOD_MS); } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<h4>\u0428\u0418\u041c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u041f\u0440\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434\u0430\u043c\u0438 \u043d\u0430 Arduino \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430 <a href=\"http:\/\/developer.alexanderklimov.ru\/arduino\/servo.php\" rel=\"nofollow\">developer.alexanderklimov<\/a>, <a href=\"http:\/\/wiki.amperka.ru\/articles:servo\" rel=\"nofollow\">wiki.amperka.ru<\/a>.<br \/>  \u041a\u0430\u043a \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0435 \u0432\u044b\u0448\u0435: \u201c\u0441\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0432\u043e\u0434 \u2014 \u044d\u0442\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043c\u043e\u0442\u043e\u0440\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 \u0443\u0433\u043e\u043b \u0438 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435.\u201d \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441 \u0448\u0438\u0440\u043e\u0442\u043d\u043e-\u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043d\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044f\u0446\u0438\u0435\u0439, \u0433\u0434\u0435 \u043e\u0442 \u0448\u0438\u0440\u0438\u043d\u044b \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u0443\u0433\u043e\u043b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ye\/bj\/n2\/yebjn2vuzrczcbfyj5cf00xiz78.png\" alt=\"image\"><\/p>\n<p>  \u0414\u043b\u044f ESP32 \u043d\u0430 Arduino \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <a href=\"https:\/\/github.com\/jkb-git\/ESP32Servo\" rel=\"nofollow\">ESP32Servo<\/a> <\/p>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a<\/p>\n<pre><code class=\"cpp\">#include &lt;ESP32Servo.h&gt;<\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 <\/p>\n<pre><code class=\"cpp\">Servo servo_horisontal;<\/code><\/pre>\n<p>  \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u0438\u043d<\/p>\n<pre><code class=\"cpp\"> servo_horisontal.attach(SERVO_CAM_HOR_PIN);<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430<\/p>\n<pre><code class=\"cpp\">servo_horisontal.write(value);<\/code><\/pre>\n<p>  \u0428\u0418\u041c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043d\u0430 Arduino \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/espressif\/arduino-esp32\/blob\/a4305284d085caeddd1190d141710fb6f1c6cbe1\/cores\/esp32\/esp32-hal-ledc.h\" rel=\"nofollow\">esp32-hal-ledc.h<\/a><br \/>  \u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b ESP32 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e Arduino analogWrite() \u0434\u043b\u044f \u0428\u0418\u041c. \u0412\u043c\u0435\u0441\u0442\u043e \u0438\u0445 \u043f\u0440\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438: <br \/>  ledcSetup(channel, freq, resolution_bits) \u2014 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043d\u0430\u043b, \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0438 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435<br \/>  ledcAttachPin(GPIO, channel) \u2014 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0440\u0442 \u0438 \u043a\u0430\u043d\u0430\u043b<br \/>  ledcWrite(channel, dutycycle) \u2014 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043d\u0430\u043b \u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0428\u0418\u041c-\u0441\u0438\u0433\u043d\u0430\u043b\u0430<br \/>  \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/randomnerdtutorials.com\/esp32-pwm-arduino-ide\/\" rel=\"nofollow\">\u0443\u0432\u0438\u0434\u0435\u0442\u044c <\/a><br \/>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f, \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u044b\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u043d\u043e \u0438\u0445 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0438 \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0446\u0435\u043b\u0435\u0439.<\/p>\n<p>  \u0412 ESP-IDF \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u043e-\u043f\u0440\u0438\u0432\u043e\u0434\u043e\u043c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044f MCPWM, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u041f\u0440\u0438\u043c\u0435\u0440 MCPWM servo motor control \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"https:\/\/github.com\/espressif\/esp-idf\/tree\/master\/examples\/peripherals\/mcpwm\/mcpwm_servo_control\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a><\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">static uint32_t servo_per_degree_init(uint32_t degree_of_rotation) {     uint32_t cal_pulsewidth = 0;     cal_pulsewidth = (SERVO_MIN_PULSEWIDTH + (((SERVO_MAX_PULSEWIDTH -          SERVO_MIN_PULSEWIDTH) * (degree_of_rotation)) \/ (SERVO_MAX_DEGREE)));     return cal_pulsewidth; }  void mcpwm_example_servo_control(void *arg) {     uint32_t angle, count;     \/\/1. mcpwm gpio initialization     mcpwm_example_gpio_initialize();      \/\/2. initial mcpwm configuration     printf(&quot;Configuring Initial Parameters of mcpwm......\\n&quot;);     mcpwm_config_t pwm_config;     pwm_config.frequency = 50;    \/\/frequency = 50Hz, i.e. for every servo motor time period should be 20ms     pwm_config.cmpr_a = 0;    \/\/duty cycle of PWMxA = 0     pwm_config.cmpr_b = 0;    \/\/duty cycle of PWMxb = 0     pwm_config.counter_mode = MCPWM_UP_COUNTER;     pwm_config.duty_mode = MCPWM_DUTY_MODE_0;     mcpwm_init(MCPWM_UNIT_0, MCPWM_TIMER_0, &amp;pwm_config);    \/\/Configure PWM0A &amp; PWM0B with above settings     while (1) {         for (count = 0; count &lt; SERVO_MAX_DEGREE; count++) {             printf(&quot;Angle of rotation: %d\\n&quot;, count);             angle = servo_per_degree_init(count);             printf(&quot;pulse width: %dus\\n&quot;, angle);             mcpwm_set_duty_in_us(MCPWM_UNIT_0, MCPWM_TIMER_0, MCPWM_OPR_A, angle);             vTaskDelay(10);     \/\/Add delay, since it takes time for servo to rotate, generally 100ms\/60degree rotation at 5V         }     } } <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0422.\u0435. \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 mcpwm_init(MCPWM_UNIT_0, MCPWM_TIMER_0, &amp;pwm_config); <br \/>  \u0410 \u0437\u0430\u0442\u0435\u043c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u0433\u043b\u0430 <br \/>  mcpwm_set_duty_in_us(MCPWM_UNIT_0, MCPWM_TIMER_0, MCPWM_OPR_A, angle);<\/p>\n<p>  C \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f MCPWM \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u043f\u0440\u0438\u0432\u043e\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/github.com\/espressif\/esp-idf\/tree\/master\/examples\/peripherals\/mcpwm\" rel=\"nofollow\">github<\/a>.<br \/>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u043c \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u0431\u044b\u043b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432 <a href=\"https:\/\/habr.com\/ru\/post\/522730\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 <\/a>\u0441\u0442\u0430\u0442\u044c\u0435. <\/p>\n<p>  \u0425\u043e\u0447\u0435\u0442\u0441\u044f \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e-\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u0443\u044e <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%93%D0%BE%D0%BB%D0%BE%D0%BD%D0%BE%D0%BC%D0%BD%D0%B0%D1%8F_%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D0%B0\" rel=\"nofollow\">\u043d\u0435\u0433\u043e\u043b\u043e\u043d\u043e\u043c\u043d\u0443\u044e<\/a> \u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0414\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0438 \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u0431\u0440\u043e\u0441 \u0432 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0430\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0445 \u043d\u0438\u0445 \u0434\u043b\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0439 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438. \u041e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0442\u0435\u043e\u0440\u0438\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 robotosha.ru <a href=\"http:\/\/robotosha.ru\/robotics\/robot-motion.html\" rel=\"nofollow\">robotosha.ru\/robotics\/robot-motion.html<\/a>. \u0414\u043b\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0442\u043e\u0440-\u0440\u0435\u0434\u0443\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d PID-\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u044c\u044e \u0432 \u0432\u0438\u0434\u0435 \u043e\u043f\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e <a href=\"https:\/\/www.youtube.com\/watch?v=p0CuvnaPC7Q&amp;t=1649s\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a> \u0438 <a href=\"http:\/\/we.easyelectronics.ru\/Theory\/pid-regulyatory--dlya-chaynikov-praktikov.html\" rel=\"nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<br \/>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0439 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438. \u0414\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u0438\u043d\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u043a\u043e\u0434\u0435.<\/p>\n<h4>Sleep Modes<\/h4>\n<p>  \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"https:\/\/docs.espressif.com\/projects\/esp-idf\/en\/latest\/esp32\/api-reference\/system\/sleep_modes.html\" rel=\"nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0432 <a href=\"https:\/\/randomnerdtutorials.com\/esp32-deep-sleep-arduino-ide-wake-up-sources\/\" rel=\"nofollow\">\u0441\u0442\u0430\u0442\u044c\u0435, <\/a> ESP32 \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0440\u0435\u0436\u0438\u043c\u0430\u043c\u0438 \u043f\u0438\u0442\u0430\u043d\u0438\u044f:  <\/p>\n<ul>\n<li>Active mode<\/li>\n<li>Modem Sleep mode<\/li>\n<li>Light Sleep mode<\/li>\n<li>Deep Sleep mode<\/li>\n<li>Hibernation mode<\/li>\n<\/ul>\n<p>  \u0412 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0440\u0435\u0436\u0438\u043c\u0430\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zx\/on\/uc\/zxonucizn1bmjxnshnqddddkzxm.png\" alt=\"image\"><\/p>\n<p>  \u042f \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0440\u0435\u0436\u0438\u043c Deep Sleep mode \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043d\u0430 \u043f\u0438\u043d\u0435 GPIO_NUM_13<\/p>\n<pre><code class=\"cpp\">gpio_set_direction(WAKEUP_PIN, GPIO_MODE_INPUT); esp_sleep_enable_ext0_wakeup(WAKEUP_PIN,1); \/\/1 = High, 0 = Low <\/code><\/pre>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u044f \u043f\u043e\u0434\u0442\u044f\u043d\u0443\u043b \u0432\u0445\u043e\u0434 10\u043a \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u043e\u043c \u043a 3.3 \u0412, \u0445\u043e\u0442\u044f \u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e. \u0410 \u0432 \u0437\u0430\u0434\u0430\u0447\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0432\u0445\u043e\u0434\u0430<\/p>\n<pre><code class=\"cpp\">if(!gpio_get_level(WAKEUP_PIN)) {          printf(&quot;Going to sleep now\\n&quot;);         esp_deep_sleep_start();     } <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0431\u0443\u0434\u0443 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435. \u0411\u044b\u043b \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 ESP32 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439. \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u0442\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 ESP-IDF \u0438 Arduino.<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/523174\/\"> https:\/\/habr.com\/ru\/post\/523174\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/523174\/\">\u0418\u0434\u0435\u044f \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0441 web-\u043a\u0430\u043c\u0435\u0440\u043e\u0439 \u043d\u0430 \u0431\u043e\u0440\u0442\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043f\u043e\u043d\u0442\u0430\u043d\u043d\u043e. \u041c\u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0438\u043c\u0435\u0442\u044c \u0432 \u0430\u0440\u0441\u0435\u043d\u0430\u043b\u0435 \u0441\u043a\u0440\u043e\u043c\u043d\u043e\u0439 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0439 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 IP-\u043a\u0430\u043c\u0435\u0440\u044b. \u0418 \u0442\u0443\u0442 \u0434\u0430\u0436\u0435 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e\u043f\u0440\u043e\u0441 \u0432 \u0446\u0435\u043d\u0435 \u0438\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435, \u0441\u043a\u043e\u0440\u0435\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0442\u0432\u043e\u0440\u0447\u0435\u0441\u043a\u0438\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u043c. \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u043c \u0434\u043b\u044f \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0431\u044b\u043b\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 DIY \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u0432\u0440\u043e\u0434\u0435 <a href=\"https:\/\/github.com\/emakefun\/hummer-bot.git\" rel=\"nofollow\">\u044d\u0442\u043e\u0433\u043e<\/a>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-311350","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311350"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/311350\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}