{"id":371658,"date":"2024-05-21T04:53:52","date_gmt":"2024-05-21T04:53:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=371658"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T04:53:52","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=371658","title":{"rendered":"<span>\u041f\u0430\u044f\u0435\u043c \u0410\u0440\u0434\u0443\u0438\u043d\u043e-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0438 \u0438\u0433\u0440\u0430\u0435\u043c \u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0439\u0448\u0438\u043c \u0448\u0438\u043b\u0434\u043e\u043c<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/companies\/ruvds\/articles\/802457\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/5r\/nq\/wt\/5rnqwt5riromgnzj7ipxqolo1t8.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/5r\/nq\/wt\/5rnqwt5riromgnzj7ipxqolo1t8.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412\u0430\u0441 \u0442\u043e\u0436\u0435 \u043e\u0433\u043e\u0440\u0447\u0430\u043b\u043e, \u0447\u0442\u043e PLS-\u0440\u0430\u0437\u044a\u0451\u043c\u044b \u043f\u043b\u0430\u0442 <b><font color=\"#3AC1EF\">Arduino Uno<\/font><\/b> \u0438 <b><font color=\"#3AC1EF\">Mega<\/font><\/b> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0431\u0435\u0437 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u043a\u0438 \u0441 \u0448\u0430\u0433\u043e\u043c 2.54 \u043c\u043c, \u043e\u0442\u0447\u0435\u0433\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0448\u0438\u043b\u0434 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043c\u0430\u043a\u0435\u0442\u043a\u0438 \u043f\u043e\u0434 \u043f\u0430\u0439\u043a\u0443?<\/p>\n<p>  \u0410 \u0435\u0449\u0451 \u043e\u0431\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0430 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u043f\u043b\u0430\u0442\u0430\u0445 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043a\u043d\u043e\u043f\u043e\u043a, \u043a\u0440\u043e\u043c\u0435 \u0441\u0431\u0440\u043e\u0441\u0430, \u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u0435\u0441\u0442\u044c, \u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0451\u043d\u043d\u044b\u0445 \u043a \u043b\u0438\u043d\u0438\u044f\u043c Tx \u0438 Rx, \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u043a\u0435\u0442\u0447\u0430 \u0438 \u043e\u0431\u043c\u0435\u043d\u0435 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c. \u0422\u043e \u0435\u0441\u0442\u044c, \u0431\u0435\u0437 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0441\u043e\u0431\u0435\u0440\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 Arduino Uno \u0441 \u0442\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c\u0438 \u043a GPIO \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438 \u0438 \u0442\u0440\u0435\u043c\u044f \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438, \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044f \u0441\u0431\u0440\u043e\u0441\u0430. \u0410 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u044a\u0451\u043c\u043e\u0432 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 \u0448\u0438\u043b\u0434\u0430\u043c\u0438.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0438 \u0448\u0430\u0433 2.54 \u043c\u043c \u0434\u043b\u044f \u043f\u0430\u0435\u0447\u043d\u044b\u0445 \u0438 \u0431\u0435\u0441\u043f\u0430\u0435\u0447\u043d\u044b\u0445 \u043c\u0430\u043a\u0435\u0442\u043d\u044b\u0445 \u043f\u043b\u0430\u0442, \u0442\u043e \u043b\u0443\u0447\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f <b><font color=\"#3AC1EF\">Arduino Nano<\/font><\/b>. \u041d\u043e \u043a \u043d\u0435\u043c\u0443 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0448\u0438\u043b\u0434, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438\u0437 \u043d\u0430\u0431\u043e\u0440\u0430 <b><font color=\"#3AC1EF\">OPEN-SMART UNO R3<\/font><\/b>, \u0441\u0431\u043e\u0440\u043a\u043e\u0439 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u044b \u0437\u0430\u0439\u043c\u0451\u043c\u0441\u044f.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u043e\u043d\u0442\u0430\u0436\u0430<\/font><\/h2>\n<p>  <\/p>\n<blockquote><p>\u041f\u0440\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043d\u0430 \u043f\u0435\u0447\u0430\u0442\u043d\u044b\u0435 \u043f\u043b\u0430\u0442\u044b \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e: \u043f\u0435\u0440\u0432\u044b\u043c\u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0432\u044b\u0441\u043e\u0442\u043e\u0439.<\/p><\/blockquote>\n<p>  \u041d\u0430\u0448 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0440\u0430\u0434\u0438\u043e\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u2014 \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u043e\u0432. \u0418\u0445 \u0437\u0434\u0435\u0441\u044c \u0432\u0441\u0435\u0433\u043e \u043f\u044f\u0442\u044c \u0448\u0442\u0443\u043a, \u0447\u0435\u0442\u044b\u0440\u0435 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u043c 1 \u043a\u0438\u043b\u043e\u043e\u043c \u0438 \u043e\u0434\u0438\u043d 10-\u043a\u0438\u043b\u043e\u043e\u043c\u043d\u044b\u0439.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/7v\/6a\/5p\/7v6a5pfyllbti5w_mgjtmrwq3go.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/7v\/6a\/5p\/7v6a5pfyllbti5w_mgjtmrwq3go.jpeg\" data-blurred=\"true\"\/><\/p>\n<blockquote><p>\u041b\u0438\u0447\u043d\u043e \u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e \u0442\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0432 \u0431\u043e\u043b\u044c\u0448\u0435\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435. \u0418\u0434\u0435\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u0445 \u043f\u043e\u0441\u0430\u0434\u043e\u0447\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435. \u041f\u043e \u043c\u0435\u0440\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u044b \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0433\u0447\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u043c\u0435\u0441\u0442\u0430 \u043f\u043e\u0434 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0440\u0435\u0434\u0438 \u043c\u0435\u043d\u044c\u0448\u0435\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u043f\u0443\u0441\u0442\u044b\u0445.<\/p><\/blockquote>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0438\u043f\u0430\u044f\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432 USB-UART, \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u044f \u043a\u043b\u044e\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u043a\u0440\u0443\u0436\u043e\u0447\u0435\u043a \u043d\u0430 \u0448\u0435\u043b\u043a\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \u043f\u043b\u0430\u0442\u044b \u0438 \u043c\u043e\u0434\u0443\u043b\u044f.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/uw\/sg\/59\/uwsg59f3mmkbnvts-hmuipc6lfc.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/uw\/sg\/59\/uwsg59f3mmkbnvts-hmuipc6lfc.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u044d\u0442\u0430\u043f \u2014 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441\u0431\u0440\u043e\u0441\u0430, \u0446\u0430\u043d\u0433\u043e\u0432\u043e\u0433\u043e \u0440\u0430\u0437\u044a\u0451\u043c\u0430 \u043f\u043e\u0434 \u043a\u0432\u0430\u0440\u0446\u0435\u0432\u044b\u0439 \u0440\u0435\u0437\u043e\u043d\u0430\u0442\u043e\u0440 \u0438 \u043f\u044f\u0442\u0438 \u043a\u0435\u0440\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u043d\u0434\u0435\u043d\u0441\u0430\u0442\u043e\u0440\u043e\u0432, \u0442\u0440\u0438 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0436\u0430\u0442 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u043c\u0438 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u0438 \u0438\u043c\u0435\u044e\u0442 \u0451\u043c\u043a\u043e\u0441\u0442\u044c 100 \u043d\u0430\u043d\u043e\u0444\u0430\u0440\u0430\u0434. \u0414\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043e\u043d\u0434\u0435\u043d\u0441\u0430\u0442\u043e\u0440\u0430 \u043f\u043e 22 \u043f\u0438\u043a\u043e\u0444\u0430\u0440\u0430\u0434\u044b \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b \u0432 \u043e\u0431\u0432\u044f\u0437\u043a\u0435 \u043a\u0432\u0430\u0440\u0446\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/pp\/hm\/lc\/pphmlc8_nmnclitrdeayw9umbzq.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/pp\/hm\/lc\/pphmlc8_nmnclitrdeayw9umbzq.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0417\u0430\u0442\u0435\u043c \u043f\u0430\u044f\u0435\u043c \u043a\u0440\u043e\u0432\u0430\u0442\u043a\u0443 \u043f\u043e\u0434 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u044f \u043e \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0438 \u043a\u043b\u044e\u0447\u0430.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/ap\/qm\/3c\/apqm3cf90cvovduawlflgwcmtda.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/ap\/qm\/3c\/apqm3cf90cvovduawlflgwcmtda.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441\u0442\u0430\u0451\u0442 \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0440\u0430\u0437\u044a\u0451\u043c\u0430 \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0438\u0441\u0445\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u0438\u0449\u0430\u043b\u043a\u0438, \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043b\u0438\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043a\u043e\u043d\u0434\u0435\u043d\u0441\u0430\u0442\u043e\u0440\u0430 \u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432. <\/p>\n<blockquote><p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043a\u0440\u043e\u043c\u0435 \u0440\u0430\u0437\u044a\u0451\u043c\u0430, \u0438\u043c\u0435\u044e\u0442 \u043f\u043e\u043b\u044f\u0440\u043d\u043e\u0441\u0442\u044c. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u0437 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u0432\u0432\u0435\u0440\u0445 \u043d\u043e\u0433\u0430\u043c\u0438.<\/p><\/blockquote>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/15\/yq\/6i\/15yq6ipfxpyu-7kiy6o2jdu-xy4.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/15\/yq\/6i\/15yq6ipfxpyu-7kiy6o2jdu-xy4.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0421\u0431\u043e\u0440\u043a\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u0410\u0440\u0434\u0443\u0438\u043d\u043e \u0431\u043b\u0438\u0437\u0438\u0442\u0441\u044f \u043a \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044e, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u044a\u0451\u043c\u044b \u0434\u043b\u044f \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0448\u0438\u043b\u0434\u043e\u0432.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/om\/5r\/ay\/om5rayc38sa6nn6gfxloxf1im9q.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/om\/5r\/ay\/om5rayc38sa6nn6gfxloxf1im9q.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043f\u0430\u044f\u0435\u043c \u0440\u0430\u0437\u044a\u0451\u043c USB-B \u0438 \u0442\u0440\u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438. \u041e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043f\u0430\u043d\u0435\u043b\u044c\u043a\u0438 \u043a\u0432\u0430\u0440\u0446 \u0438 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/ib\/wu\/if\/ibwuifpryhjomwftolsirbnnoiw.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/ib\/wu\/if\/ibwuifpryhjomwftolsirbnnoiw.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u043d\u0430\u0431\u043e\u0440\u0430 \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438 \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442 \u0437\u0430\u043f\u0430\u0441\u043d\u043e\u0439 \u043a\u0432\u0430\u0440\u0446, \u043e\u0434\u0438\u043d \u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 \u043d\u0430 10 \u043a\u0438\u043b\u043e\u043e\u043c \u0438 \u0434\u0432\u0430 \u043d\u0430 1 \u043a\u0438\u043b\u043e\u043e\u043c. \u0412\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u044c \u0432 \u043f\u043e\u0434\u0430\u0440\u043e\u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u0438\u0445 \u0445\u043e\u0434\u043e\u0432\u044b\u0445 \u043d\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0441\u0445\u043e\u0434\u0443\u044e\u0442\u0441\u044f \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e!<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/am\/kf\/0b\/amkf0bp2tnmllibnq-5jerv0mlm.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/am\/kf\/0b\/amkf0bp2tnmllibnq-5jerv0mlm.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043f\u043e\u0434\u0430\u0447\u0438 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043f\u043e USB-\u043a\u0430\u0431\u0435\u043b\u044e \u043f\u043b\u0430\u0442\u0430 \u0432\u0435\u0441\u0435\u043b\u043e \u0437\u0430\u043c\u0438\u0433\u0430\u043b\u0430 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c. \u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0432 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u0448\u0438\u0442 \u0441\u043a\u0435\u0442\u0447\u0435\u043c \u00abBlink a LED\u00bb, \u0447\u0442\u043e \u0432 \u043c\u0438\u0440\u0435 \u0410\u0440\u0434\u0443\u0438\u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043e\u043c \u00abHello, world!\u00bb \u2014 \u00ab\u041f\u0440\u0438\u0432\u0435\u0442, \u043c\u0438\u0440!\u00bb. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/m7\/gm\/ij\/m7gmijfq3bilnaod3l6afdmtawk.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/m7\/gm\/ij\/m7gmijfq3bilnaod3l6afdmtawk.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443, \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440. \u0414\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e USB \u043f\u043e\u0432\u0435\u0440\u0431\u0430\u043d\u043a\u0430 \u0438\u043b\u0438 \u0431\u043b\u043e\u043a\u0430 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435\u043c 5 \u0432\u043e\u043b\u044c\u0442.<\/p>\n<blockquote><p>\u041e\u0442\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 OPEN-SMART UNO R3, \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e Arduino Uno, \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d.<\/p><\/blockquote>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u0427\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0410\u0440\u0434\u0443\u0438\u043d\u043e?<\/font><\/h2>\n<p>  \u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0430 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u043b\u0430\u0442\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0441\u043a\u0435\u0442\u0447, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 <a href=\"https:\/\/github.com\/sfambach\/arduino\/tree\/master\/boards\/OpenSmartUnoR3\">\u0421\u0442\u0435\u0444\u0430\u043d\u043e\u043c \u0424\u0430\u043c\u0431\u0430\u0445\u043e\u043c<\/a>.<\/p>\n<pre><code class=\"cpp\">#include \"OpenSmartUnoR3.h\"  void setup() {   Board.init(true); }  void loop() {   Board.loop();  }<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u044d\u0442\u043e\u0442 \u0441\u043a\u0435\u0442\u0447 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u043b\u0430\u0442\u0443 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0438\u0437 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<pre><code class=\"cpp\">#ifndef OpenSmartUnoR3_h #define OpenSmartUnoR3_h #include \"EasyBuzzer.h\"  #define BUZZER 6  class OpenSmartUnoR3 {    protected:    bool _test;    EasyBuzzerClass eb;    public:     enum SWITCH {       SW1 = 2,       SW2 = 3,       SW3 = 4     };      enum LED {       LED1 = 7,       LED2 = 8,       LED3 = 13     };      void init(bool test = false) {       _test = test;       pinMode(LED1, OUTPUT);       pinMode(LED2, OUTPUT);       pinMode(LED3, OUTPUT);       pinMode(BUZZER, OUTPUT);        pinMode(SW1, INPUT_PULLUP);       pinMode(SW2, INPUT_PULLUP);       pinMode(SW3, INPUT_PULLUP);     }      void loop() {       if (_test) {           setLED(LED1, getSwitch(SW1));           setLED(LED2, getSwitch(SW2));           setLED(LED3, getSwitch(SW3));            if(getSwitch(SW1) &amp;&amp; getSwitch(SW2)){             eb.beep(1000);           }else {             eb.stopBeep();           }       }     }      bool getSwitch(SWITCH sw) {         return !digitalRead(sw);     }      static void setLED(LED selected, bool status) {         digitalWrite(selected, status);     }  };<\/code><\/pre>\n<p>  \u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u043a \u043a\u0430\u043a\u0438\u043c \u0432\u044b\u0432\u043e\u0434\u0430\u043c \u0410\u0440\u0434\u0443\u0438\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a\u043d\u043e\u043f\u043a\u0438 \u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b, \u0438 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0432 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0446\u0438\u043a\u043b\u0435. \u0421\u043a\u0435\u0442\u0447 \u0437\u0430\u0436\u0438\u0433\u0430\u0435\u0442 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b \u0441 \u043d\u043e\u043c\u0435\u0440\u0430\u043c\u0438, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043d\u043e\u043c\u0435\u0440\u0430\u043c \u043d\u0430\u0436\u0430\u0442\u044b\u0445 \u043a\u043d\u043e\u043f\u043e\u043a. \u0415\u0441\u043b\u0438 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u043d\u0430\u0436\u0430\u0442\u044c \u0432\u0442\u043e\u0440\u0443\u044e \u0438 \u0442\u0440\u0435\u0442\u044c\u044e \u043a\u043d\u043e\u043f\u043a\u0438, \u0437\u0430\u043f\u0438\u0449\u0438\u0442 \u0437\u0443\u043c\u043c\u0435\u0440, \u043f\u0440\u044f\u043c\u043e \u043a\u0430\u043a \u0432 <a href=\"https:\/\/habr.com\/ru\/companies\/ruvds\/articles\/759104\/\">\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435 \u0434\u043b\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430\u0445<\/a>. \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0443\u043c\u043c\u0435\u0440\u043e\u043c \u0430\u0432\u0442\u043e\u0440 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 <a href=\"https:\/\/github.com\/evert-arias\/EasyBuzzer\">EasyBuzzer<\/a>.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0438\u0434\u0435\u043e<\/font><\/h2>\n<p>  <\/p>\n<div class=\"oembed\">\n<div class=\"tm-iframe_temp\" data-src=\"https:\/\/embedd.srv.habr.com\/iframe\/65ff6093aeb5569d7b56f31c\" data-style=\"\" id=\"65ff6093aeb5569d7b56f31c\" width=\"\"><\/div>\n<\/div>\n<p>  \u0418\u0442\u0430\u043a, \u043c\u044b \u0443\u0431\u0435\u0434\u0438\u043b\u0438\u0441\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0435\u0439 \u043f\u043b\u0430\u0442\u044b. \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0431\u043e\u043b\u0435\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043a \u0441\u0432\u0435\u0436\u0435\u0441\u043e\u0431\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 <b><font color=\"#3AC1EF\">Rich Shield Two<\/font><\/b> \u043e\u0442 \u0442\u043e\u0433\u043e \u0436\u0435 OPEN-SMART.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0437\u0430\u0440\u044f\u0434\u0430 \u0431\u0430\u0442\u0430\u0440\u0435\u0438<\/font><\/h2>\n<p>  \u042d\u0442\u043e\u0442 \u0448\u0438\u043b\u0434 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u044b\u0439 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u0439 \u0432 \u0432\u0438\u0434\u0435 \u0431\u0430\u0442\u0430\u0440\u0435\u0439\u043a\u0438 \u0441 \u0434\u0435\u0441\u044f\u0442\u044c\u044e \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0440\u0430\u0437\u043d\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432 \u2014 \u0430\u043b\u043e\u0433\u043e, \u044f\u043d\u0442\u0430\u0440\u043d\u043e\u0433\u043e, \u0438\u0437\u0443\u043c\u0440\u0443\u0434\u043d\u043e\u0433\u043e \u0438 \u043b\u0430\u0437\u0443\u0440\u043d\u043e\u0433\u043e.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/ug\/gm\/ik\/uggmikbq6nz822eyjibbvvoxpmi.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/ug\/gm\/ik\/uggmikbq6nz822eyjibbvvoxpmi.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430 <b><font color=\"#3AC1EF\">TM1651<\/font><\/b> \u2014 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 \u0441 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u043a\u043e\u0439 \u044f\u0440\u043a\u043e\u0441\u0442\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0438 \u0434\u0432\u0443\u0445\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tm\/mg\/sj\/tmmgsjkbktio8p-wybn4ctwzj1e.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tm\/mg\/sj\/tmmgsjkbktio8p-wybn4ctwzj1e.png\"\/><\/p>\n<p>  \u0421\u043a\u0435\u0442\u0447 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u0438 \u0438\u043c\u0438\u0442\u0438\u0440\u0443\u0435\u0442 \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0437\u0430\u0440\u044f\u0434\u0430 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430.<\/p>\n<pre><code class=\"cpp\">#include \"TM1651.h\" #define CLK 10 \/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c, \u043a\u0443\u0434\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432\u044b\u0432\u043e\u0434\u044b TM1651  #define DIO 11 TM1651 batteryDisplay(CLK,DIO); void setup() {   batteryDisplay.init();   batteryDisplay.set(BRIGHTEST);\/\/BRIGHT_TYPICAL = 2,BRIGHT_DARKEST = 0,BRIGHTEST = 7;   batteryDisplay.frame(FRAME_ON); } void loop() {   charging(); }  void charging() {   for(uint8_t level = 0; level &lt; 8; level ++)   {     batteryDisplay.displayLevel(level); delay(500);   } }<\/code><\/pre>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Battery Display.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">TM1651.h<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\/\/  Author:Fred.Chu \/\/  Date:14 August, 2014 \/\/ \/\/  Applicable Module: \/\/                     Battery Display v1.0 \/\/ \/\/  This library is free software; you can redistribute it and\/or \/\/  modify it under the terms of the GNU Lesser General Public \/\/  License as published by the Free Software Foundation; either \/\/  version 2.1 of the License, or (at your option) any later version. \/\/ \/\/  This library is distributed in the hope that it will be useful, \/\/  but WITHOUT ANY WARRANTY; without even the implied warranty of \/\/  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU \/\/  Lesser General Public License for more details. \/\/ \/\/  You should have received a copy of the GNU Lesser General Public \/\/  License along with this library; if not, write to the Free Software \/\/  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA \/\/ \/\/  Modified record: \/\/ \/*******************************************************************************\/  #ifndef TM1651_H #define TM1651_H #include &lt;inttypes.h> #include &lt;Arduino.h> \/\/************definitions for TM1651********************* #define ADDR_AUTO  0x40 #define ADDR_FIXED 0x44  #define STARTADDR  0xc0  \/**** definitions for the frame of the battery display *******\/ #define FRAME_ON   1 #define FRAME_OFF  0 \/**************definitions for brightness***********************\/ #define  BRIGHT_DARKEST 0 #define  BRIGHT_TYPICAL 2 #define  BRIGHTEST      7  class TM1651 {   public: uint8_t Cmd_SetData; uint8_t Cmd_SetAddr; uint8_t Cmd_DispCtrl; TM1651(uint8_t, uint8_t); void init(); void writeByte(int8_t wr_data);\/\/write 8bit data to tm1651 void start(void);\/\/send start bits void stop(void); \/\/send stop bits void displayLevel(uint8_t Level); void frame(boolean FrameFlag); void clearDisplay(void); void set(uint8_t = BRIGHT_TYPICAL,uint8_t = 0x40,uint8_t = 0xc0);\/\/To take effect the next time it displays.   private: uint8_t Clkpin; uint8_t Datapin; void bitDelay(); }; #endif<\/code><\/pre>\n<\/div><\/div>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">TM1651.cpp<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">\/\/  Author:Fred.Chu \/\/  Date:14 August, 2014 \/\/ \/\/  Applicable Module: \/\/                     Battery Display v1.0 \/\/ \/\/  This library is free software; you can redistribute it and\/or \/\/  modify it under the terms of the GNU Lesser General Public \/\/  License as published by the Free Software Foundation; either \/\/  version 2.1 of the License, or (at your option) any later version. \/\/ \/\/  This library is distributed in the hope that it will be useful, \/\/  but WITHOUT ANY WARRANTY; without even the implied warranty of \/\/  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU \/\/  Lesser General Public License for more details. \/\/ \/\/  You should have received a copy of the GNU Lesser General Public \/\/  License along with this library; if not, write to the Free Software \/\/  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA \/\/ \/\/  Modified record: \/\/ \/*******************************************************************************\/ #include \"TM1651.h\" #include &lt;Arduino.h> static int8_t LevelTab[] = {0x00,0x40,0x60,0x70,0x78,0x7c,0x7e,0x7f};\/\/Level 0~7  TM1651::TM1651(uint8_t Clk, uint8_t Data) {   Clkpin = Clk;   Datapin = Data;   pinMode(Clkpin,OUTPUT);   pinMode(Datapin,OUTPUT); }  void TM1651::init() {   set(BRIGHT_TYPICAL);   clearDisplay(); }  void TM1651::writeByte(int8_t wr_data) {  uint8_t data = wr_data;   \/\/ 8 Data Bits  for(uint8_t i = 0; i &lt; 8; i++) {    \/\/ CLK low    pinMode(Clkpin, OUTPUT);    bitDelay();     \/\/ Set data bit    if (data &amp; 0x01)  pinMode(Datapin, INPUT);    else  pinMode(Datapin, OUTPUT);     bitDelay();     \/\/ CLK high    pinMode(Clkpin, INPUT);    bitDelay();    data = data >> 1;  }   \/\/ Wait for acknowledge  \/\/ CLK to zero  pinMode(Clkpin, OUTPUT);  pinMode(Datapin, INPUT);  bitDelay();   \/\/ CLK to high  pinMode(Clkpin, INPUT);  bitDelay();  uint8_t ack = digitalRead(Datapin);  if (ack == 0)    pinMode(Datapin, OUTPUT);    bitDelay();  pinMode(Clkpin, OUTPUT);  bitDelay();    } \/\/send start signal to TM1651 void TM1651::start(void) { pinMode(Datapin, OUTPUT);  bitDelay(); }  \/\/End of transmission void TM1651::stop(void) {   pinMode(Datapin, OUTPUT);   bitDelay();   pinMode(Clkpin, INPUT);   bitDelay();   pinMode(Datapin, INPUT);   bitDelay();    } \/\/****************************************** void TM1651::displayLevel(uint8_t Level) {   if(Level > 7)return;\/\/Level should be 0~7   start();          \/\/start signal sent to TM1651 from MCU   writeByte(ADDR_FIXED);\/\/   stop();           \/\/   start();          \/\/   writeByte(0xc0);\/\/   writeByte(LevelTab[Level]);\/\/   stop();            \/\/   start();          \/\/   writeByte(Cmd_DispCtrl);\/\/   stop();           \/\/ }  void TM1651::frame(boolean FrameFlag) {   int8_t SegData;   if (FrameFlag == 1) SegData = 0x40;   else SegData = 0x00;   start();          \/\/start signal sent to TM1651 from MCU   writeByte(ADDR_AUTO);\/\/   stop();           \/\/   start();          \/\/   writeByte(0xc1);\/\/   for(uint8_t i=0;i &lt; 3;i ++)   {     writeByte(SegData);        \/\/   }   stop();           \/\/   start();          \/\/   writeByte(Cmd_DispCtrl);\/\/   stop();           \/\/ }  void TM1651::clearDisplay(void) {   displayLevel(0);   frame(FRAME_OFF); } \/\/To take effect the next time it displays. void TM1651::set(uint8_t brightness,uint8_t SetData,uint8_t SetAddr) {   Cmd_SetData = SetData;   Cmd_SetAddr = SetAddr;   Cmd_DispCtrl = 0x88 + brightness;\/\/Set the brightness and it takes effect the next time it displays. }  void TM1651::bitDelay() { delayMicroseconds(50); }<\/code><\/pre>\n<\/div><\/div>\n<p>  <\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438<\/font><\/h2>\n<p>  \u041d\u0430 \u043f\u043b\u0430\u0442\u0435 \u0448\u0438\u043b\u0434\u0430 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 <a href=\"https:\/\/habr.com\/ru\/companies\/ruvds\/articles\/791210\/\">\u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d\u043d\u044b\u0439 \u043f\u0440\u0435\u0434\u0443\u0441\u0438\u043b\u0438\u0442\u0435\u043b\u044c<\/a> \u0438 \u043c\u0438\u043d\u0438\u0430\u0442\u044e\u0440\u043d\u044b\u0439 \u044d\u043b\u0435\u043a\u0442\u0440\u0435\u0442\u043d\u044b\u0439 \u043c\u0438\u043a\u0440\u043e\u0444\u043e\u043d. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/4u\/hr\/w_\/4uhrw_pxrd8wtbn2mvelattlzn0.png\" data-src=\"https:\/\/habrastorage.org\/webt\/4u\/hr\/w_\/4uhrw_pxrd8wtbn2mvelattlzn0.png\"\/><\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u0438 \u0441\u043a\u0435\u0442\u0447 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438 \u0437\u0432\u0443\u043a\u0430. \u041e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0441\u044e \u0442\u0443 \u0436\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u0432\u0445\u043e\u0434\u0430 \u04102, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442 \u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u043c\u0443 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0443.<\/p>\n<pre><code class=\"cpp\">#include \"TM1651.h\"  #define CLK 10 \/\/ \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c, \u043a\u0443\u0434\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0432\u044b\u0432\u043e\u0434\u044b TM1651        #define DIO 11 TM1651 batteryDisplay(CLK,DIO);  #define SOUND_PIN A2 #define MAX_SENSORVALUE 1000 #define MIN_SENSORVALUE 8  void setup() {     batteryDisplay.init();     batteryDisplay.set(BRIGHTEST);\/\/BRIGHT_TYPICAL = 2,BRIGHT_DARKEST = 0,BRIGHTEST = 7; } void loop() { int sensorValue = analogRead(SOUND_PIN);  int level = map(sensorValue, 0, MAX_SENSORVALUE, 0, MIN_SENSORVALUE);  batteryDisplay.displayLevel(level); }<\/code><\/pre>\n<h2><font color=\"#3AC1EF\">\u258d \u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430<\/font><\/h2>\n<p>  \u0414\u0432\u0435 \u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u044b\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b 8&#215;8 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0434\u043d\u043e\u0439 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b <b><font color=\"#3AC1EF\">HT16K33<\/font><\/b>. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/y2\/oz\/-c\/y2oz-cqx0pzrkx0li3mczuyk3zq.png\" data-src=\"https:\/\/habrastorage.org\/webt\/y2\/oz\/-c\/y2oz-cqx0pzrkx0li3mczuyk3zq.png\"\/><\/p>\n<p>  \u041a\u0430\u043a \u0438 TM1651, \u043e\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 \u0441\u043e \u0441\u043a\u0430\u043d\u0435\u0440\u043e\u043c \u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044b \u0438 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c I\u00b2C, \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0434\u0432\u0438\u043d\u0443\u0442\u044b\u0439.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/_h\/c7\/uf\/_hc7ufpx4l0antpnjuuvt2iufyg.png\" data-src=\"https:\/\/habrastorage.org\/webt\/_h\/c7\/uf\/_hc7ufpx4l0antpnjuuvt2iufyg.png\"\/><\/p>\n<p>  \u0413\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Adafruit \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u0443\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u0443 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u0438\u0433\u0443\u0440\u044b, \u0442\u0435\u043a\u0441\u0442 \u0438 \u0440\u0430\u0441\u0442\u0440\u043e\u0432\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"cpp\">#include &lt;Wire.h> #include &lt;Adafruit_GFX.h> #include \"Adafruit_LEDBackpack.h\" #include &lt;Adafruit_NeoPixel.h>  #define PIN A3 #define NUM 4 Adafruit_NeoPixel rgb = Adafruit_NeoPixel(NUM, PIN, NEO_GRB + NEO_KHZ800);  Adafruit_8x16matrix matrix = Adafruit_8x16matrix();  void setup() {   rgb.begin();   rgb.clear();   rgb.show();   matrix.begin(0x70);  \/\/ I\u00b2C \u0430\u0434\u0440\u0435\u0441 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 HT16K33 }  static const uint8_t PROGMEM   smile_bmp[] =   { B00111100,     B01000010,     B10100101,     B10000001,     B10100101,     B10011001,     B01000010,     B00111100 },   neutral_bmp[] =   { B00111100,     B01000010,     B10100101,     B10000001,     B10111101,     B10000001,     B01000010,     B00111100 },   frown_bmp[] =   { B00111100,     B01000010,     B10100101,     B10000001,     B10011001,     B10100101,     B01000010,     B00111100 };  void loop() {      matrix.clear();   matrix.drawBitmap(0, 0, smile_bmp, 8, 8, LED_ON);   matrix.writeDisplay();   delay(500);      matrix.clear();   matrix.drawBitmap(0, 8, neutral_bmp, 8, 8, LED_ON);   matrix.writeDisplay();   delay(500);    matrix.clear();   matrix.drawBitmap(0, 0, frown_bmp, 8, 8, LED_ON);   matrix.writeDisplay();   delay(500);    matrix.clear();      \/\/ \u043e\u0447\u0438\u0449\u0430\u0435\u043c \u0434\u0438\u0441\u043f\u043b\u0435\u0439   matrix.drawPixel(0, 0, LED_ON); \/\/ \u0440\u0438\u0441\u0443\u0435\u043c \u043f\u0438\u043a\u0441\u0435\u043b\u044c \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u043c \u0431\u0443\u0444\u0435\u0440\u0435     matrix.writeDisplay();  \/\/ \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0434\u0438\u0441\u043f\u043b\u0435\u0439   delay(500);    matrix.clear();   matrix.drawLine(0,0, 7,15, LED_ON);   matrix.writeDisplay();     delay(500);    matrix.clear();   matrix.drawRect(0,0, 8,16, LED_ON);   matrix.fillRect(2,2, 4,12, LED_ON);   matrix.writeDisplay();     delay(500);    matrix.clear();   matrix.drawCircle(3,8, 3, LED_ON);   matrix.writeDisplay();     delay(500);    matrix.setTextSize(1);   matrix.setTextWrap(false);     matrix.setTextColor(LED_ON);   matrix.setRotation(1);   for (int8_t x=7; x>=-69; x--) {     matrix.clear();     matrix.setCursor(x,0);     matrix.print(\"RUVDS @ Habr\");     matrix.writeDisplay();     delay(100);   }   delay(2000);   matrix.setRotation(0); }<\/code><\/pre>\n<h2><font color=\"#3AC1EF\">\u258d \u042d\u043d\u043a\u043e\u0434\u0435\u0440<\/font><\/h2>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u0435 \u0431\u043e\u0433\u0430\u0442\u0441\u0442\u0432\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0448\u0438\u043b\u0434\u0430 \u043d\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f. \u0412 \u0440\u0430\u0441\u043f\u043e\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u0430 \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u043e\u043c\u0435\u0442\u0440\u0430 DS18B20, \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a \u0438 \u043d\u0430\u0436\u0438\u043c\u043d\u043e\u0439 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u044d\u043d\u043a\u043e\u0434\u0435\u0440.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/dq\/na\/w1\/dqnaw1zd_sfofnkprvopabwgex4.png\" data-src=\"https:\/\/habrastorage.org\/webt\/dq\/na\/w1\/dqnaw1zd_sfofnkprvopabwgex4.png\"\/><\/p>\n<p>  \u0412\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0440\u0443\u0447\u043a\u0438 \u044d\u043d\u043a\u043e\u0434\u0435\u0440\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0443\u0433\u043e\u043b \u043d\u0430\u043a\u043b\u043e\u043d\u0430 \u043b\u0438\u043d\u0438\u0438 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/gm\/xe\/vg\/gmxevgvmyyufanut4pvbasw0xie.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/gm\/xe\/vg\/gmxevgvmyyufanut4pvbasw0xie.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0410 \u0435\u0441\u043b\u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u044d\u0442\u0443 \u0440\u0443\u0447\u043a\u0443, \u0442\u043e \u044d\u043a\u0440\u0430\u043d \u043f\u043e\u0433\u0430\u0441\u043d\u0435\u0442 \u0434\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0435\u0451 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430.<\/p>\n<pre><code class=\"cpp\">#include &lt;Wire.h> #include &lt;Adafruit_GFX.h> #include \"Adafruit_LEDBackpack.h\" #include &lt;RotaryEncoder.h> #include &lt;Adafruit_NeoPixel.h>  #define PIN A3 #define NUM 4 Adafruit_NeoPixel rgb = Adafruit_NeoPixel(NUM, PIN, NEO_GRB + NEO_KHZ800); #define encoder_button 4 RotaryEncoder encoder(3, 2);  #define CLOCKWISE 1 #define ANTI_CLOCKWISE -0  Adafruit_8x16matrix matrix = Adafruit_8x16matrix(); void rotatePointer(uint8_t,uint8_t);  void setup() {   rgb.begin();   rgb.clear();   rgb.show();   pinMode(encoder_button,INPUT);   matrix.begin(0x70);     matrix.setRotation(1);   matrix.drawLine(0,3, 15,4, LED_ON);   matrix.writeDisplay();  }  void loop() {   static int pos = 0;   if(digitalRead(encoder_button)==1)   {     delay(10);     if(digitalRead(encoder_button)==1)     {        matrix.clear();        matrix.writeDisplay();       }    }   encoder.tick();   int newPos = encoder.getPosition();   uint8_t pointerDirection;   if (pos != newPos) {     RotaryEncoder::Direction currentDirection = encoder.getDirection(); if (currentDirection == RotaryEncoder::Direction::COUNTERCLOCKWISE) {           pointerDirection = ANTI_CLOCKWISE;         } else pointerDirection = CLOCKWISE;     rotatePointer(pointerDirection,1); rotatePointer(pointerDirection,1);     pos = newPos;   } \/\/ if }  int8_t x1=0; int8_t x2=15; int8_t y1=3; int8_t y2=4; void rotatePointer(uint8_t direction, uint8_t steps) {     if(direction==CLOCKWISE){   if(x1==0 &amp;&amp; y1>0)y1 -= steps;   else if(y1==0 &amp;&amp; x1&lt;15) x1 += steps;   else if(x1==15 &amp;&amp; y1&lt;7) y1 += steps;   else if(y1==7 &amp;&amp; x1>0) x1 -= steps;    if(x2==0 &amp;&amp; y2>0)y2 -= steps;   else if(y2==0 &amp;&amp; x2&lt;15) x2 += steps;   else if(x2==15 &amp;&amp; y2&lt;7) y2 += steps;   else if(y2==7 &amp;&amp; x2>0) x2 -= steps; } else{ if(x1==0 &amp;&amp; y1&lt;7)y1 += steps;   else if(y1==7 &amp;&amp; x1&lt;15) x1 += steps;   else if(x1==15 &amp;&amp; y1>0) y1 -= steps;   else if(y1==0 &amp;&amp; x1>0) x1 -= steps;    if(x2==0 &amp;&amp; y2&lt;7)y2 += steps;   else if(y2==7 &amp;&amp; x2&lt;15) x2 += steps;   else if(x2==15 &amp;&amp; y2>0) y2 -= steps;   else if(y2==0 &amp;&amp; x2>0) x2 -= steps; }   matrix.clear();   matrix.drawLine(x1,y1, x2,y2, LED_ON);   matrix.writeDisplay();   } <\/code><\/pre>\n<h2><font color=\"#3AC1EF\">\u258d \u0414\u0436\u043e\u0439\u0441\u0442\u0438\u043a<\/font><\/h2>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0434\u0432\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u0430, \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0435\u0433\u0443\u043d\u043a\u043e\u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e-\u0446\u0438\u0444\u0440\u043e\u0432\u044b\u043c\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0432\u0443\u0445 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0439 \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u0432 \u0447\u0438\u0441\u043b\u0430, \u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0449\u0438\u0435 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b \u043f\u043e \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u044f\u043c. <\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/zc\/xq\/uk\/zcxqukbbn2vp7ntc_4wb_kvums8.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/zc\/xq\/uk\/zcxqukbbn2vp7ntc_4wb_kvums8.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0441\u043a\u0435\u0442\u0447 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442 \u043f\u043e \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u043c\u0443 \u044d\u043a\u0440\u0430\u043d\u0443 \u0441\u0432\u0435\u0442\u044f\u0449\u0443\u044e\u0441\u044f \u0442\u043e\u0447\u043a\u0443 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0441 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0430.<\/p>\n<pre><code class=\"cpp\">#include &lt;OS_SingleJoystick.h> #include &lt;Wire.h> #include &lt;Adafruit_GFX.h> #include \"Adafruit_LEDBackpack.h\" #include &lt;Adafruit_NeoPixel.h>  #define PIN A3 #define NUM 4 Adafruit_NeoPixel rgb = Adafruit_NeoPixel(NUM, PIN, NEO_GRB + NEO_KHZ800);  Adafruit_8x16matrix matrix = Adafruit_8x16matrix(); #define SW_PIN 0xff \/\/ \u0414\u0436\u043e\u0439\u0441\u0442\u0438\u043a \u043d\u0435 \u043d\u0430\u0436\u0438\u043c\u043d\u043e\u0439. #define JOYSTCK_X A0 #define JOYSTCK_Y A1  SingleJoystick joystick(JOYSTCK_X, JOYSTCK_Y);  uint8_t coordinate_x = 7; uint8_t coordinate_y = 3; void setup() {   rgb.begin();   rgb.clear();   rgb.show();   matrix.begin(0x70);     matrix.setRotation(1);   matrix.clear();       matrix.drawPixel(coordinate_x, coordinate_y, LED_ON);     matrix.writeDisplay();     }  void loop() {   joystickControlLED();   delay(100);  }  void joystickControlLED() { if(joystick.isChange())   { int x,y;      x=joystick.nowX;     y=joystick.nowY; uint8_t operation;     operation = joystick.multipleRead();      switch (operation) {       case MOVE_UP: if(coordinate_y>0) coordinate_y -= 1;  break;       case MOVE_DOWN: if(coordinate_y&lt;7) coordinate_y += 1;  break;       case MOVE_RIGHT: if(coordinate_x&lt;15) coordinate_x += 1; break;       case MOVE_LEFT:    if(coordinate_x>0) coordinate_x -= 1;     break;       default:        break;     }     matrix.clear();         matrix.drawPixel(coordinate_x, coordinate_y, LED_ON);       matrix.writeDisplay();   } }<\/code><\/pre>\n<h2><font color=\"#3AC1EF\">\u258d \u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0439 \u0442\u0435\u0440\u043c\u043e\u043c\u0435\u0442\u0440<\/font><\/h2>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/0a\/kp\/pi\/0akppivdwqrxogbuhnkr3060efc.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/0a\/kp\/pi\/0akppivdwqrxogbuhnkr3060efc.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u0410 \u044d\u0442\u043e\u0442 \u0441\u043a\u0435\u0442\u0447 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043d\u0430 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u0434\u0438\u0441\u043f\u043b\u0435\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0435\u0451 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0442\u043e\u043b\u0431\u0447\u0430\u0442\u043e\u043c \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0435.<\/p>\n<pre><code class=\"cpp\">#include &lt;OneWire.h> #include &lt;Wire.h> #include &lt;Adafruit_GFX.h> #include \"Adafruit_LEDBackpack.h\" #include \"TM1651.h\" #include &lt;Adafruit_NeoPixel.h>  #define PIN A3 #define NUM 4 Adafruit_NeoPixel rgb = Adafruit_NeoPixel(NUM, PIN, NEO_GRB + NEO_KHZ800);  #define CLK 10     #define DIO 11 TM1651 batteryDisplay(CLK,DIO); OneWire  ds(5);   Adafruit_8x16matrix matrix = Adafruit_8x16matrix(); uint8_t level = 2; int8_t temp0; void setup() {   rgb.begin();   rgb.clear();   rgb.show();   matrix.begin(0x70);     matrix.setRotation(1);   batteryDisplay.init();   batteryDisplay.set(BRIGHTEST);\/\/BRIGHT_TYPICAL = 2,BRIGHT_DARKEST = 0,BRIGHTEST = 7;   temp0 = readTemp();   batteryDisplay.displayLevel(level); } void loop() {   int8_t celsius;   celsius = readTemp();   displayTemp(celsius);   batteryDisplay.displayLevel(level+celsius-temp0); } int8_t readTemp() { byte data[12];   float celsius;   ds.reset();   ds.skip();   ds.write(0x44, 0);         delay(750);        ds.reset();   ds.skip();   ds.write(0xBE);            for (unsigned char i = 0; i &lt; 9; i++) {            data[i] = ds.read();   }      int16_t raw = (data[1] &lt;&lt; 8) | data[0];   byte cfg = (data[4] &amp; 0x60);   if (cfg == 0x00) raw = raw &amp; ~7;    else if (cfg == 0x20) raw = raw &amp; ~3;    else if (cfg == 0x40) raw = raw &amp; ~1;    celsius = (float)raw \/ 16.0;   return celsius; } void displayTemp(int8_t temp) { matrix.clear();     matrix.setCursor(0,0);     matrix.print(temp); matrix.print('c');     matrix.writeDisplay(); }<\/code><\/pre>\n<h2><font color=\"#3AC1EF\">\u258d \u0410\u0434\u0440\u0435\u0441\u0443\u0435\u043c\u044b\u0435 RGB \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b<\/font><\/h2>\n<p>  \u0418 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u043f\u043e\u0438\u0433\u0440\u0430\u0435\u043c \u0441 \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u0443\u043c\u043d\u044b\u043c\u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438, \u0432\u043d\u0443\u0442\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0442\u0440\u0438 \u0441\u0432\u0435\u0442\u043e\u0438\u0437\u043b\u0443\u0447\u0430\u044e\u0449\u0438\u0445 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u0430 \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/rd\/fa\/fc\/rdfafct8yu0xppzt3yvkosy-lja.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/rd\/fa\/fc\/rdfafct8yu0xppzt3yvkosy-lja.jpeg\" data-blurred=\"true\"\/><\/p>\n<p>  \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u0436\u0438\u0433\u0430\u0442\u044c \u0432\u0441\u044e \u043b\u0438\u043d\u0435\u0439\u043a\u0443 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0446\u0432\u0435\u0442\u0430\u043c\u0438, \u0447\u0435\u0440\u0435\u0434\u0443\u044f \u044d\u0442\u043e \u0441 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u043c \u0436\u0451\u043b\u0442\u044b\u0445 \u0431\u0435\u0433\u0443\u0449\u0438\u0445 \u043e\u0433\u043d\u0435\u0439.<\/p>\n<pre><code class=\"cpp\">#include &lt;Adafruit_NeoPixel.h>#define PIN A3 #define NUM 4 Adafruit_NeoPixel rgb = Adafruit_NeoPixel(NUM, PIN, NEO_GRB + NEO_KHZ800); #define LEFT_TO_RIGHT 0 #define RIGHT_TO_LEFT 1  void setup() {   rgb.begin();   rgb.clear();   rgb.show(); }  void loop() {  rgb.setBrightness(40);   colorWipe(rgb.Color(100, 100, 100), 0); \/\/ \u0411\u0435\u043b\u044b\u0439   delay(600);   colorWipe(rgb.Color(50, 0, 0), 0); \/\/ \u041a\u0440\u0430\u0441\u043d\u044b\u0439   delay(600);   colorWipe(rgb.Color(0, 50, 0), 0); \/\/ \u0417\u0435\u043b\u0451\u043d\u044b\u0439   delay(600);   colorWipe(rgb.Color(0, 0, 50), 0); \/\/ \u0421\u0438\u043d\u0438\u0439   delay(600);   colorWipe(rgb.Color(0, 0, 0), 0); \/\/ \u0427\u0451\u0440\u043d\u044b\u0439   delay(600);   runLED(0xffff00, LEFT_TO_RIGHT); \/\/ \u0416\u0451\u043b\u0442\u044b\u0439   delay(600);   colorWipe(rgb.Color(0, 0, 0), 0); \/\/ \u0427\u0451\u0440\u043d\u044b\u0439   delay(600);   runLED(0xffff00, RIGHT_TO_LEFT);\/\/ \u0416\u0451\u043b\u0442\u044b\u0439   delay(600); }  \/\/ \u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0438\u043a\u0441\u0435\u043b\u0438 \u0446\u0432\u0435\u0442\u043e\u043c \u043e\u0434\u0438\u043d \u0437\u0430 \u0434\u0440\u0443\u0433\u0438\u043c void colorWipe(uint32_t c, uint8_t wait) {   for(uint16_t i=0; i&lt;NUM; i++) {       rgb.setPixelColor(i, c);   }   rgb.show(); } void runLED(uint32_t c,  uint8_t direction) {   if(direction==LEFT_TO_RIGHT)      for(uint8_t i=0; i&lt;NUM; i++) {       rgb.setPixelColor(i, c);   rgb.show();       delay(150);     }   else      for(uint8_t i=NUM; i>0; i--) {       rgb.setPixelColor(i-1, c);   rgb.show();       delay(150);     } }  void theaterChase(uint32_t c, uint8_t wait) {   for (int j=0; j&lt;10; j++) {       for (int q=0; q &lt; 3; q++) {       for (int i=0; i &lt; rgb.numPixels(); i=i+3) {         rgb.setPixelColor(i+q, c);    \/\/ \u0437\u0430\u0436\u0438\u0433\u0430\u0435\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u044c       }       rgb.show();            delay(wait);            for (int i=0; i &lt; rgb.numPixels(); i=i+3) {         rgb.setPixelColor(i+q, 0);        \/\/ \u0433\u0430\u0441\u0438\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0440\u0435\u0442\u0438\u0439 \u043f\u0438\u043a\u0441\u0435\u043b\u044c       }     }   } }<\/code><\/pre>\n<h2><font color=\"#3AC1EF\">\u258d \u041d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0438 \u0432\u044b\u0432\u043e\u0434\u044b<\/font><\/h2>\n<p>  \u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u0432\u0438\u0434\u0435\u043e, \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u043d\u043e\u0432\u043e\u0433\u043e \u0441\u043a\u0435\u0442\u0447\u0430 \u0442\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043d\u0451\u043c \u043d\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b, \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0432 \u0442\u043e\u043c \u0436\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043d\u0430\u0445\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u0434\u043e \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0442\u0430\u0440\u043e\u0433\u043e \u0441\u043a\u0435\u0442\u0447\u0430. <\/p>\n<p>  \u041d\u0430\u0436\u0430\u0442\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441\u0431\u0440\u043e\u0441\u0430 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u043d\u0430 \u043d\u0438\u0445 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0432\u043b\u0438\u044f\u0435\u0442, \u0438 \u00ab\u043b\u0438\u0448\u043d\u0438\u0435\u00bb \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b \u0433\u0430\u0441\u043d\u0443\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u044b. \u0422\u0430\u043a \u0438 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c, \u0432\u0435\u0434\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e, \u0438 \u043b\u0438\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u0431\u0440\u043e\u0441\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443, \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0430.<\/p>\n<p>  \u041d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0441\u0432\u043e\u0438 \u0438\u0434\u0435\u0438 \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0410\u0440\u0434\u0443\u0438\u043d\u043e-\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0439 \u043f\u043b\u0430\u0442\u044b \u0441 \u0442\u0440\u0435\u043c\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438 \u0438 \u0442\u0440\u0435\u043c\u044f \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u043e \u0441\u0435\u0431\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u0441\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0438 \u0441 Rich Shield Two.<\/p>\n<blockquote><p><b><font color=\"#3AC1EF\"><a href=\"https:\/\/t.me\/ruvds_community\">Telegram-\u043a\u0430\u043d\u0430\u043b \u0441\u043e \u0441\u043a\u0438\u0434\u043a\u0430\u043c\u0438, \u0440\u043e\u0437\u044b\u0433\u0440\u044b\u0448\u0430\u043c\u0438 \u043f\u0440\u0438\u0437\u043e\u0432 \u0438 \u043d\u043e\u0432\u043e\u0441\u0442\u044f\u043c\u0438 IT ? <\/a><\/font><\/b><\/p><\/blockquote>\n<p><a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=%20Lunathecat&amp;utm_content=payaem_arduino-sovmestimyj_kontroller_i_igraem_s_interesnejshim_shildom\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/jx\/md\/ye\/jxmdyendyev6uxwdkpnkdl77zac.png\" data-src=\"https:\/\/habrastorage.org\/webt\/jx\/md\/ye\/jxmdyendyev6uxwdkpnkdl77zac.png\"\/><\/a><\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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\/articles\/802457\/\"> https:\/\/habr.com\/ru\/articles\/802457\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/companies\/ruvds\/articles\/802457\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/5r\/nq\/wt\/5rnqwt5riromgnzj7ipxqolo1t8.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/5r\/nq\/wt\/5rnqwt5riromgnzj7ipxqolo1t8.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440! \u0412\u0430\u0441 \u0442\u043e\u0436\u0435 \u043e\u0433\u043e\u0440\u0447\u0430\u043b\u043e, \u0447\u0442\u043e PLS-\u0440\u0430\u0437\u044a\u0451\u043c\u044b \u043f\u043b\u0430\u0442 <b><font color=\"#3AC1EF\">Arduino Uno<\/font><\/b> \u0438 <b><font color=\"#3AC1EF\">Mega<\/font><\/b> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0431\u0435\u0437 \u0441\u043e\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0441\u0435\u0442\u043a\u0438 \u0441 \u0448\u0430\u0433\u043e\u043c 2.54 \u043c\u043c, \u043e\u0442\u0447\u0435\u0433\u043e \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0448\u0438\u043b\u0434 \u043d\u0430 \u0431\u0430\u0437\u0435 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043c\u0430\u043a\u0435\u0442\u043a\u0438 \u043f\u043e\u0434 \u043f\u0430\u0439\u043a\u0443?<\/p>\n<p>  \u0410 \u0435\u0449\u0451 \u043e\u0431\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0430 \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044b\u0445 \u043f\u043b\u0430\u0442\u0430\u0445 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043a\u043d\u043e\u043f\u043e\u043a, \u043a\u0440\u043e\u043c\u0435 \u0441\u0431\u0440\u043e\u0441\u0430, \u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 \u0435\u0441\u0442\u044c, \u043d\u043e \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0451\u043d\u043d\u044b\u0445 \u043a \u043b\u0438\u043d\u0438\u044f\u043c Tx \u0438 Rx, \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435 \u0441\u043a\u0435\u0442\u0447\u0430 \u0438 \u043e\u0431\u043c\u0435\u043d\u0435 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043e\u043c. \u0422\u043e \u0435\u0441\u0442\u044c, \u0431\u0435\u0437 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u043f\u043e\u0447\u0442\u0438 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0441\u043e\u0431\u0435\u0440\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 Arduino Uno \u0441 \u0442\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u043c\u0438 \u043a GPIO \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438 \u0438 \u0442\u0440\u0435\u043c\u044f \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438, \u043d\u0435 \u0441\u0447\u0438\u0442\u0430\u044f \u0441\u0431\u0440\u043e\u0441\u0430. \u0410 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u044a\u0451\u043c\u043e\u0432 \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0442\u0435\u0440\u044f\u0442\u044c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0441 \u0448\u0438\u043b\u0434\u0430\u043c\u0438.  <\/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-371658","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371658","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=371658"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371658\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=371658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=371658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=371658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}