{"id":328849,"date":"2022-01-31T15:00:37","date_gmt":"2022-01-31T15:00:37","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=328849"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=328849","title":{"rendered":"<span>Kincony KC868-A4: \u0443\u043b\u044c\u0442\u0438\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0433\u0430\u0439\u0434. \u0427\u0430\u0441\u0442\u044c 2. \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/647119\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/cg\/lv\/yj\/cglvyjzalnxceo5dixfaf1tgef4.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/cg\/lv\/yj\/cglvyjzalnxceo5dixfaf1tgef4.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0443\u043b\u044c\u0442\u0438\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0433\u0430\u0439\u0434 \u043f\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 Kincony KC868-A4, \u043d\u0430\u0447\u0430\u0442\u044b\u0439 \u0432 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/646923\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0440\u0430\u0441\u043f\u0438\u043d\u043e\u0432\u043a\u0443 KC868-A4 \u0438 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 (\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432) \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u043c\u044b \u0441 \u0440\u0430\u0441\u043f\u0438\u043d\u043e\u0432\u043a\u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f ESP32-S \u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043a \u043d\u0435\u043c\u0443 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Kincony.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u0420\u0430\u0441\u043f\u0438\u043d\u043e\u0432\u043a\u0430 KC868-A4<\/font><\/h2>\n<p>  \u041c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 ESP32 \u0432\u0441\u0435\u043c \u0445\u043e\u0440\u043e\u0448, \u043d\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0432\u0440\u043e\u0436\u0434\u0451\u043d\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u2014 \u043a\u0440\u0430\u0439\u043d\u0435 \u043c\u0430\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0445 GPIO \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432. \u0418 \u043a\u0430\u0436\u0434\u044b\u0439, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043d\u0430 ESP32 \u0438\u043b\u0438 \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u0432\u043e\u0451\u043c \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0440\u0430\u0437\u0432\u0438\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0435\u0448\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443.<\/p>\n<p>  \u041f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u0435\u043b\u0438 \u043f\u043e\u0440\u0442\u043e\u0432, \u043b\u0438\u0431\u043e \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043a\u0430\u043a-\u0442\u043e \u00ab\u0432\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0435\u0432\u043c\u0435\u0449\u0430\u0435\u043c\u043e\u0435\u00bb \u0438 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043a\u0440\u043e\u0445\u0430\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f GPIO \u0438 \u043e\u0442\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0442\u0435\u0445 \u0438\u043b\u0438 \u0438\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043d\u0430 \u043f\u043b\u0430\u0442\u0443.<\/p>\n<p>  \u0418\u043d\u0436\u0435\u043d\u0435\u0440\u044b \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Kincony \u0442\u0430\u043a \u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u2014 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0438\u0441\u044c \u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0438\u0437, \u043d\u0430 \u0438\u0445 \u0432\u0437\u0433\u043b\u044f\u0434, \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 (\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432), \u043a\u0443\u0434\u0430 \u0432\u043e\u0448\u043b\u0438:<\/p>\n<ul>\n<li>4 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0432\u0445\u043e\u0434\u0430<\/li>\n<li>4 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0445 \u0432\u0445\u043e\u0434\u0430<\/li>\n<li>2 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0445 \u0432\u044b\u0445\u043e\u0434\u0430<\/li>\n<li>4 \u0440\u0435\u043b\u0435<\/li>\n<li>\u0414\u0430\u0442\u0447\u0438\u043a(\u0438) \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b\/\u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438<\/li>\n<li>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 RS232<\/li>\n<li>\u041c\u043e\u0434\u0443\u043b\u0438 (R\/T) 433 \u041c\u0413\u0446<\/li>\n<li>\u0418\u043d\u0444\u0440\u0430\u043a\u0440\u0430\u0441\u043d\u044b\u0435 (IR) \u043c\u043e\u0434\u0443\u043b\u0438 (R\/T)<\/li>\n<li>\u041f\u0438\u0449\u0430\u043b\u043a\u0430 (buzzer)<\/li>\n<\/ul>\n<p>  \u042d\u0442\u043e\u0442 \u043d\u0430\u0431\u043e\u0440 \u0437\u0430\u0431\u0440\u0430\u043b \u0432\u0441\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0435 GPIO \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 ESP32, \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0431\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u043b \u0431\u044b \u043b\u044e\u0431\u043e\u043c\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443.<\/p>\n<p>  \u041d\u043e \u0433\u043b\u044f\u0434\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u044b Kincony \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0438 \u043d\u0430 \u043f\u043b\u0430\u0442\u0443 KC868-A4, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0443 \u043d\u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u0431\u0430\u043b\u0430\u043d\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u0446\u0435\u043b\u0435\u0439 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432. <\/p>\n<p>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0441\u0432\u043e\u044e \u0434\u0435\u0442\u0430\u043b\u044c \u0438\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u043a KC868-A4, \u0442\u043e \u0431\u0435\u0437 \u043f\u0430\u044f\u043b\u044c\u043d\u0438\u043a\u0430 \u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0443 \u0432\u0430\u0441 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u2014 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0445 \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f GPIO \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0442.<\/p>\n<p>  \u0421 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0438\u0434\u0435\u043e\u043b\u043e\u0433\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0438 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0432\u043e\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u2014 \u0432\u044b \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0442\u043e\u0442 \u043d\u0430\u0431\u043e\u0440 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0441\u043e\u0447\u0438\u043d\u0435\u043d\u0438\u0435 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u043e\u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Kincony \u043d\u0430 \u0442\u0435\u043c\u0443 \u00ab\u041a\u0430\u043a \u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b GPIO \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b ESP32\u00bb, \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u043c\u043d\u043e\u0439 \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0412 \u0431\u043b\u0438\u0436\u043d\u0438\u0445 \u043a \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0430\u0445 \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043b\u0438\u043d\u0438\u0439 \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439 \u0438\u0437 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u044b (\u0441\u043c. \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e), \u0430 \u0432 \u0434\u0430\u043b\u044c\u043d\u0438\u0445 \u2014 \u0432\u0445\u043e\u0434\u044b \u0438 \u0432\u044b\u0445\u043e\u0434\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 KC868-A4.<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/lk\/lm\/5o\/lklm5olqztwlmev9bsx1c17u01y.png\"\/><\/p>\n<p>  \u0412 \u0446\u0435\u043b\u043e\u043c \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u0430 GPIO \u044f \u0431\u044b \u043d\u0430\u0437\u0432\u0430\u043b \u0442\u043e, \u0447\u0442\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0434\u0440\u0443\u0433 \u0434\u0440\u0443\u0433\u0443.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c Kincony KC868-A4 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u044f, \u0442\u043e \u044f \u0431\u044b \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0438\u0437\u0431\u0430\u0432\u0438\u043b\u0441\u044f \u043e\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043d\u0430 433 \u041c\u0413\u0446, \u043a\u0430\u043a \u0430\u0440\u0445\u0430\u0438\u0447\u043d\u043e\u0433\u043e, \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u0447\u0435\u0433\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e, \u0442\u0438\u043f\u0430 nRF24 \u0438\u043b\u0438 LoRa, \u0432\u044b\u0432\u0435\u043b \u0431\u044b \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e I2C \u0438 SPI \u0438 \u043f\u043e\u0432\u0435\u0441\u0438\u043b \u0431\u044b \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u0432\u0445\u043e\u0434\u044b\/\u0432\u044b\u0445\u043e\u0434\u044b \u043d\u0430 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u0435\u043b\u0438 \u043f\u043e\u0440\u0442\u043e\u0432. \u0410 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0431\u044b \u0431\u043b\u043e\u043a \u0447\u0430\u0441\u043e\u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u0432\u044b\u0432\u0435\u043b \u0431\u043b\u043e\u043a \u0440\u0435\u043b\u0435 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430 DIN-\u0440\u0435\u0439\u043a\u0443. \u041d\u043e \u0442\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u0431\u044b\u043b \u0431\u044b \u0443\u0436\u0435 \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043f\u0443\u0441\u0442\u0438\u043c\u0441\u044f \u0441 \u043d\u0435\u0431\u0435\u0441 \u043d\u0430 \u0437\u0435\u043c\u043b\u044e \u0438 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0440\u0430\u0437\u0431\u043e\u0440 Kincony KC868-A4.<\/p>\n<p>  \u0421 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c GPIO \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u043e\u0432 ESP32 \u0432\u0441\u0451 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0438 \u0442\u0435\u043f\u0435\u0440\u044c, \u0432\u043e\u043e\u0440\u0443\u0436\u0438\u0432\u0448\u0438\u0441\u044c \u044d\u0442\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 Kincony KC868-A4 \u0438 \u043d\u0430\u0447\u043d\u0451\u043c \u043c\u044b \u0441 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u0430\u044f \u0441\u0440\u0435\u0434\u0430 \u0434\u043b\u044f KC868-A4<\/font><\/h2>\n<p>  \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 Kincony KC868-A4 \u043c\u043e\u0436\u043d\u043e \u0432 \u043b\u044e\u0431\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u0440\u0435\u0434\u0435 \u2014 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0430\u0448\u0443 \u043b\u044e\u0431\u0438\u043c\u0443\u044e IDE, \u044f \u0436\u0435 \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u044b Arduino 1.8.5. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u043a\u0432\u0430\u043b\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0440\u0430\u0431\u043e\u0442\u043e\u0439 \u0432 Arduino IDE \u0438 \u0443\u043c\u0435\u0435\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 ESP32.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Kincony KC868-A4, \u0438\u0437 \u0432\u0441\u0435\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u00abNodeMCU-32S\u00bb. \u042d\u0442\u043e \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e \u043d\u0430\u043c\u0435\u043a\u0430\u0435\u0442 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e Kincony KC868-A4 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u043e\u0439 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0438\u0444\u0435\u0440\u0438\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 NodeMCU-32S.<\/p>\n<p><img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/wb\/jd\/fc\/wbjdfcm1wrxkuqsuthwn5xu7jy0.png\"\/><\/p>\n<p>  \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432\u0438\u0434\u043d\u044b \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0435, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0443 \u0441\u0435\u0431\u044f \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 (\u043a\u0440\u043e\u043c\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u043f\u043e\u0440\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u0432\u043e\u0438\u043c). \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0440\u0430\u0437\u0431\u043e\u0440\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 Kincony KC868-A4.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043b\u0435 KC868-A4<\/font><\/h2>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u043c\u044b \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0441 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043b\u0435, \u043a\u0430\u043a \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0438 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432. \u0420\u0435\u043b\u0435, \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0438\u0434\u043d\u043e \u043d\u0430 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0439 \u0441\u0445\u0435\u043c\u0435 \u0440\u0430\u0441\u043f\u0438\u043d\u043e\u0432\u043a\u0438, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a <b>GPIO 2<\/b>, <b>15<\/b>, <b>5<\/b>, <b>4<\/b>. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043b\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 Kincony KC868-A4 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u043a\u0435\u0442\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0440\u0435\u043b\u0435, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u044d\u0444\u0444\u0435\u043a\u0442 \u00ab\u0431\u0435\u0433\u0443\u0449\u0435\u0433\u043e \u043e\u0433\u043d\u044f\u00bb.<\/p>\n<pre><code class=\"java\">\/*   Kincony KC868-A4   Relays example *\/  byte pins[] = {2, 15, 5, 4}; byte pos = 0;  void setup() {   Serial.begin(115200);   Serial.println(F(\"Start Kincony KC868-A4 Relays example...\"));    pinMode(pins[0], OUTPUT);   pinMode(pins[1], OUTPUT);   pinMode(pins[2], OUTPUT);   pinMode(pins[3], OUTPUT); }  void clear() {   digitalWrite(pins[0], LOW);   digitalWrite(pins[1], LOW);   digitalWrite(pins[2], LOW);   digitalWrite(pins[3], LOW); }  void change(byte n) {   clear();   digitalWrite(pins[n], HIGH); }  void loop() {   change(pos);   Serial.print(F(\"ON Relay #\")); Serial.println(pos);   delay(10000);   pos++;   if (pos > 3) {pos = 0;} } <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u043e\u0433\u043b\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043b\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 Kincony KC868-A4. \u0412\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0432\u043e\u0434\u0430 \u0432 Serial \u043d\u0430\u0448\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u0441\u043a\u0435\u0442\u0447\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/vc\/bx\/lq\/vcbxlqzgs6ssioayvqrj1enxfao.png\"\/><\/p>\n<h2><font color=\"#3AC1EF\">\u258d Buzzer \u0438 Tone<\/font><\/h2>\n<p>  \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u043e\u0442\u043c\u0435\u0442\u0438\u043b \u0440\u0430\u043d\u0435\u0435, \u043f\u043b\u0430\u0442\u0430 Kincony KC868-A4 \u0441\u043d\u0430\u0431\u0436\u0435\u043d\u0430 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0432 \u0432\u0438\u0434\u0435 \u043f\u044c\u0435\u0437\u043e\u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438\u0437\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0435 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f\u0445 (\u0430\u0432\u0430\u0440\u0438\u044f, \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0438 \u0442.\u00a0\u0434.) \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \u0412\u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0438\u0449\u0430\u043b\u043a\u043e\u0439.<\/p>\n<pre><code class=\"java\">\/*   Kincony KC868-A4   Buzzer example *\/  #define BUZZER_PIN 18  void setup() {   Serial.begin(115200);   Serial.println(F(\"Start Kincony KC868-A4 Buzzer example...\"));        pinMode(BUZZER_PIN, OUTPUT); }  void loop() {   digitalWrite(BUZZER_PIN, HIGH); delay(500);   digitalWrite(BUZZER_PIN, LOW);  delay(500); } <\/code><\/pre>\n<p>  \u0412\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043a \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 \u043f\u0440\u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043d\u043e \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043d\u043e\u0432\u0443\u044e \u043e\u043a\u0440\u0430\u0441\u043a\u0443 \u0437\u0432\u0443\u0447\u0430\u043d\u0438\u044f, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0438\u043f \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0441\u0432\u043e\u0438\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c \u0437\u0432\u0443\u043a\u043e\u043c (\u043c\u0435\u043b\u043e\u0434\u0438\u0435\u0439). \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u043e\u043d\u043e\u0432 \u043f\u0440\u0438 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0438.<\/p>\n<pre><code class=\"java\">\/*   Kincony KC868-A4   Buzzer Tone example *\/  #define BUZZER_PIN 18 const int TONE_PWM_CHANNEL = 0;  void setup() {   Serial.begin(115200);   Serial.println(F(\"Start Kincony KC868-A4 Buzzer Tone example...\"));      ledcAttachPin(BUZZER_PIN, TONE_PWM_CHANNEL); }  void loop() {   ledcWriteNote(TONE_PWM_CHANNEL, NOTE_C, 4); delay(500);   ledcWriteNote(TONE_PWM_CHANNEL, NOTE_D, 4); delay(500);   ledcWriteNote(TONE_PWM_CHANNEL, NOTE_E, 4); delay(500);   ledcWriteNote(TONE_PWM_CHANNEL, NOTE_F, 4); delay(500);   ledcWriteNote(TONE_PWM_CHANNEL, NOTE_G, 4); delay(500);   ledcWriteNote(TONE_PWM_CHANNEL, NOTE_A, 4); delay(500);   ledcWriteNote(TONE_PWM_CHANNEL, NOTE_B, 4); delay(500);   ledcWriteNote(TONE_PWM_CHANNEL, NOTE_C, 5); delay(500); } <\/code><\/pre>\n<h2><font color=\"#3AC1EF\">\u258d DAC<\/font><\/h2>\n<p>  Kincony KC868-A4 \u0441\u043d\u0430\u0431\u0436\u0451\u043d \u0434\u0432\u0443\u043c\u044f \u0446\u0438\u0444\u0440\u043e-\u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u043c\u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438 (DAC), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 \u043e\u0442 0 \u0434\u043e 10 \u0432\u043e\u043b\u044c\u0442. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043f\u0440\u0438\u043c\u0435\u0440 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f 5 \u0432\u043e\u043b\u044c\u0442 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 DAC1 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/p>\n<pre><code class=\"java\">\/*   Kincony KC868-A4   DAC example *\/  #define DAC1 26 #define DAC2 25  void setup() {   Serial.begin(115200);   Serial.println(F(\"Start Kincony KC868-A4 DAC example...\"));      int value = 127; \/\/ 255 = 10V   dacWrite(DAC1, value); }  void loop() {  } <\/code><\/pre>\n<p>  \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u2014 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f DAC, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f (\u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438\u0445) \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432. \u0414\u0430\u043b\u0435\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0438\u043b\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 DAC1.<\/p>\n<pre><code class=\"java\">\/*   Kincony KC868-A4   DAC Saw example *\/  #define DAC1 26 #define DAC2 25  byte value = 0;  void setup() {   Serial.begin(115200);   Serial.println(F(\"Start Kincony KC868-A4 DAC Saw example...\")); }  void saw() {   value++; }  void loop() {   dacWrite(DAC1, value);   saw(); } <\/code><\/pre>\n<p>  \u041d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c Kincony KC868-A4 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043b\u044e\u0431\u043e\u0439 \u0444\u043e\u0440\u043c\u044b.<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/w1\/et\/pm\/w1etpm1-nyjtfus9zdybfyahvic.png\"\/><\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u0426\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u0432\u0445\u043e\u0434\u044b<\/font><\/h2>\n<p>  \u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 Kincony KC868-A4 \u0438\u043c\u0435\u0435\u0442 4 \u043e\u043f\u0442\u043e\u0440\u0430\u0437\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0432\u0445\u043e\u0434\u0430 \u00ab\u0441\u0443\u0445\u043e\u0439 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043d\u0430 <b>GPIO 36<\/b>, <b>39<\/b>, <b>27<\/b> \u0438 <b>14<\/b>. \u041e\u0431\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0432\u0445\u043e\u0434\u043e\u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0438 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 digitalRead() \u2014 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0438\u0437 \u0432\u0445\u043e\u0434\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 \u0438 \u0434\u0430\u043b\u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0435\u0433\u043e \u0432 \u043a\u043e\u0434\u0435 \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u044e.<\/p>\n<pre><code class=\"java\">\/*   Kincony KC868-A4   Digital Input example *\/  #define INPUT_PIN1 36 #define INPUT_PIN2 39 #define INPUT_PIN3 27 #define INPUT_PIN4 14  void setup() {   Serial.begin(115200);   Serial.println(F(\"Start Kincony KC868-A4 Digital Input example...\"));   pinMode(INPUT_PIN1, INPUT); }  void loop() {   Serial.println(digitalRead(INPUT_PIN1));   delay(10); } <\/code><\/pre>\n<h2><font color=\"#3AC1EF\">\u258d \u0410\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0435 \u0432\u0445\u043e\u0434\u044b<\/font><\/h2>\n<p>  Kincony KC868-A4 \u0438\u043c\u0435\u0435\u0442 4 \u00ab\u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0445\u00bb \u0432\u0445\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043d\u0430 <b>GPIO 32<\/b>, <b>33<\/b>, <b>34<\/b> \u0438 <b>35<\/b>. \u041a\u0430\u043a \u0443\u0436\u0435 \u0431\u044b\u043b\u043e \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043e \u0432 \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0434\u043b\u044f \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 0\u20135 \u0412 \u0438 4-20 \u043c\u0410 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u0430\u0441\u043a\u0430\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442 2 \u0432\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f (GPIO 32 \u0438 33) \u0438 2 \u0432\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0442\u043e\u043a\u0430 (GPI 34 \u0438 35). \u0412 \u043a\u043e\u0434\u0435 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043e\u0431\u043e\u0438\u043c\u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u043d\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u043e\u043d\u0430 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 analogRead() \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c 4096.<\/p>\n<pre><code class=\"java\">\/*   Kincony KC868-A4   Analog Input example *\/  #define ANALOG_PIN1 32 \/\/ INA1 0-5V #define ANALOG_PIN2 33 \/\/ INA2 0-5V #define ANALOG_PIN3 34 \/\/ INA3 4-20 mA #define ANALOG_PIN4 35 \/\/ INA4 4-20 mA  int value1 = 0;  void setup() {   Serial.begin(115200);   Serial.println(F(\"Start Kincony KC868-A4 Analog Input example...\"));   pinMode(ANALOG_PIN1, INPUT); }  void loop() {   value1 = analogRead(ANALOG_PIN1); \/\/ 0-4096   delay(1000);   Serial.printf(\"Value on pin %d = %d\\n\", ANALOG_PIN1, value1); } <\/code><\/pre>\n<h2><font color=\"#3AC1EF\">\u258d \u0414\u0430\u0442\u0447\u0438\u043a\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0438 \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438<\/font><\/h2>\n<p>  Kincony KC868-A4 \u0438\u043c\u0435\u0435\u0442 \u043a\u043e\u043b\u043e\u0434\u043a\u0443 <b>3V<\/b>, <b>S<\/b>, <b>GND<\/b> \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b DS18B20. \u041a \u044d\u0442\u043e\u0439 \u043a\u043e\u043b\u043e\u0434\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0435\u0442\u044c \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432 DS18B20, \u0434\u0430\u0442\u0447\u0438\u043a \u0432\u043b\u0430\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0434\u0430\u0442\u0447\u0438\u043a, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043f\u043e \u0442\u0438\u043f\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f. \u041d\u0443\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u043f\u043b\u0430\u0442\u0435 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043f\u043e\u0434\u0442\u044f\u0436\u043a\u0430 \u043b\u0438\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044e \u043f\u0438\u0442\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u0442\u0447\u0438\u043a\u0430\u043c\u0438 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b DS18B20 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <a href=\"https:\/\/github.com\/matmunk\/DS18B20\">DS18B20<\/a> \u0438 <a href=\"https:\/\/github.com\/PaulStoffregen\/OneWire\">OneWire<\/a>. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043a\u043e\u0434 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u0430\u0442\u0447\u0438\u043a\u0430 DS18B20, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u043e\u0433\u043e \u043a \u043f\u043b\u0430\u0442\u0435 KC868-A4.<\/p>\n<pre><code class=\"java\">\/*   Kincony KC868-A4   DS18B20 example *\/  #include &lt;DS18B20.h>  #define  LOW_ALARM 30 #define HIGH_ALARM 40  DS18B20 ds(13);  void setup() {   Serial.begin(115200);   Serial.println(F(\"Start Kincony KC868-A4 DS18B20 example...\"));      ds.doConversion();   while (ds.selectNext()) {     ds.setAlarms(LOW_ALARM, HIGH_ALARM);   } }  void loop() {   ds.doConversion();    while (ds.selectNextAlarm()) {     Serial.print(\"Alarm Low: \");   Serial.print(ds.getAlarmLow());  Serial.println(\" \u00b0C\");     Serial.print(\"Alarm High: \");  Serial.print(ds.getAlarmHigh()); Serial.println(\" \u00b0C\");     Serial.print(\"Temperature: \"); Serial.print(ds.getTempC());     Serial.println(\" \u00b0C\\n\");   }    delay(2000); } <\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0440\u043e\u0433\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b\u0445\u043e\u0434\u0430 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432 Serial \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435.<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/aa\/19\/sn\/aa19snv81270suevyfcm0lm2lmq.png\"\/><\/p>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 DS18B20 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b DS18B20 \u043d\u0430 \u0432\u0441\u0435 \u0441\u043b\u0443\u0447\u0430\u0438 \u0436\u0438\u0437\u043d\u0438 \u2014 \u0432\u044b \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u041f\u0440\u0438\u0451\u043c\u043d\u0438\u043a \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a \u043d\u0430 433 \u041c\u0413\u0446<\/font><\/h2>\n<p>  \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0437\u043d\u0430\u0435\u0442\u0435, \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 Kincony KC868-A4 \u0432\u0445\u043e\u0434\u044f\u0442 \u043c\u043e\u0434\u0443\u043b\u0438 \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a\u0430 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u043d\u0430 433 \u041c\u0413\u0446. \u042d\u0442\u0438 \u043c\u043e\u0434\u0443\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u0438\u043a\u043e\u0439 \u0438 \u043f\u0440\u0438\u0451\u043c\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0434\u0430\u0442\u0447\u0438\u043a\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d 433 \u041c\u0413\u0446 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0441\u0432\u043e\u0438\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432.<\/p>\n<p>  \u041f\u0440\u0438\u0451\u043c\u043d\u0438\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043d\u0430 <b>GPIO 19<\/b> \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a \u043d\u0430 <b>GPIO 21<\/b>. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u0438 \u043f\u0440\u0438\u0451\u043c\u043e\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 <a href=\"https:\/\/github.com\/sui77\/rc-switch\">RC-Switch<\/a>. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u044b\u043b\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0445 \u043a\u043e\u043c\u0430\u043d\u0434 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u044b\u043c \u043c\u043e\u0434\u0443\u043b\u0435\u043c \u043d\u0430 433 \u041c\u0413\u0446 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 Kincony KC868-A4.<\/p>\n<pre><code class=\"java\">\/*   Kincony KC868-A4   433 Transmit example  *\/  #include &lt;RCSwitch.h> RCSwitch mySwitch = RCSwitch();  #define DELAY_MS 500  void setup() {   Serial.begin(115200);   Serial.println(F(\"Start Kincony KC868-A4 433 Transmit example...\"));      mySwitch.enableTransmit(digitalPinToInterrupt(21)); }  void loop() {   mySwitch.switchOn (\"11111\", \"00010\");      delay(DELAY_MS);   mySwitch.switchOff(\"11111\", \"00010\");      delay(DELAY_MS);   mySwitch.send(5393, 24);                   delay(DELAY_MS);   mySwitch.send(\"000000000001010100010001\"); delay(DELAY_MS);   mySwitch.sendTriState(\"00000FFF0F0F\");     delay(DELAY_MS);  } <\/code><\/pre>\n<p>  \u041d\u0430\u0433\u043b\u044f\u0434\u043d\u0430\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0435\u0442\u0447\u0430 \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 SDRSharp. \u0412\u0438\u0434\u043d\u044b \u043f\u043e\u0441\u044b\u043b\u043a\u0438 \u0432 \u044d\u0444\u0438\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u043a\u0430\u0436\u0434\u044b\u0435 500 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/zt\/8v\/jh\/zt8vjhr5etovj6zigoeyutjlcwy.png\"\/><\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u0438\u0451\u043c\u0430 (GPIO 19) \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 433 \u041c\u0413\u0446, \u0438\u0434\u0443\u0449\u0438\u0435 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 RC-Switch.<\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u0418\u043d\u0444\u0440\u0430\u043a\u0440\u0430\u0441\u043d\u044b\u0435 (IR) \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a<\/font><\/h2>\n<p>  \u0417\u0430\u0432\u0435\u0440\u0448\u0438\u043c \u043c\u044b \u043e\u0431\u0437\u043e\u0440 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 Kincony KC868-A4 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a\u043e\u043c (<b>GPIO 23<\/b>, IRD) \u0438 \u0438\u0437\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u0435\u043c (<b>GPIO 22<\/b>, IRS) \u0438\u043d\u0444\u0440\u0430\u043a\u0440\u0430\u0441\u043d\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u0438 \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0439 \u0442\u0435\u0445\u043d\u0438\u043a\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043d\u0444\u0440\u0430\u043a\u0440\u0430\u0441\u043d\u044b\u0435 \u043f\u0443\u043b\u044c\u0442\u044b \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u0430\u043a \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0434\u044b \u043e\u0442 \u0432\u0430\u0448\u0438\u0445 \u043f\u0443\u043b\u044c\u0442\u043e\u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0438\u0445 (\u043a\u043e\u0434\u044b) \u0432 \u044d\u0444\u0438\u0440 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0438\u043c \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0438\u043d\u0444\u0440\u0430\u043a\u0440\u0430\u0441\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a\u043e\u043c \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 Arduino-<a href=\"https:\/\/github.com\/Arduino-IRremote\/Arduino-IRremote\">IRremote<\/a>. \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u0435\u0451 \u043e\u0441\u043d\u043e\u0432\u0435. \u0412 \u044d\u0442\u043e\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u043c \u0441\u043a\u0435\u0442\u0447\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438\u043d\u0444\u0440\u0430\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b \u043e\u0442 \u0431\u044b\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0443\u043b\u044c\u0442\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u0438\u0433\u043d\u0430\u043b (\u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0441\u0438\u0433\u043d\u0430\u043b\u0430, \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0438 \u043a\u043e\u0434 \u043d\u0430\u0436\u0430\u0442\u043e\u0439 \u043a\u043b\u0430\u0432\u0438\u0448\u0438), \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u044b\u043b\u0430\u0442\u044c \u0432 \u044d\u0444\u0438\u0440 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b, \u043d\u0430\u0436\u0438\u043c\u0430\u044f \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043b\u0430\u0432\u0438\u0448\u0443 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 Kincony KC868-A4.<\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<ul>\n<li>IR \u043f\u0440\u0438\u0451\u043c\u043d\u0438\u043a: GPIO 23<\/li>\n<li>IR \u0438\u0437\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044c: GPIO 22<\/li>\n<li>\u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430: GPIO 0<\/li>\n<li>STATUS_PIN \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043a\u0435\u0442\u0447\u0435 \u0434\u043b\u044f \u0438\u043d\u0434\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043d\u043e \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 Kincony KC868-A4 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435 GPIO ESP32 (\u0438 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043d\u044f\u0442 GPIO2), \u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434 (D2) \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u043d\u0430 (\u0443\u0441\u043b\u043e\u0432\u043d\u043e) \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u043f\u0438\u043d D12.<\/li>\n<\/ul>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441\u043a\u0435\u0442\u0447\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 2 \u0444\u0430\u0439\u043b\u0430: \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 (ir_example.ino) \u0438 \u0444\u0430\u0439\u043b \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 (PinDefinitionsAndMore.h). \u0412 \u0444\u0430\u0439\u043b\u0435 PinDefinitionsAndMore.h \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u043e\u043c\u0435\u0440\u0430 GPIO \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0440\u0430\u0441\u043f\u0438\u043d\u043e\u0432\u043a\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 Kincony KC868-A4 (\u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u044b \u0442\u0440\u0435\u043c\u044f \u0432\u043e\u0441\u043a\u043b\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u043a\u0430\u043c\u0438).<\/p>\n<pre><code class=\"java\">#define LED_BUILTIN 12 \/\/ !!! #define IR_RECEIVE_PIN       23  \/\/ !!! #define IR_SEND_PIN          22  \/\/ !!! #define APPLICATION_PIN      0   \/\/ !!! <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0444\u0430\u0439\u043b\u0430 PinDefinitionsAndMore.h<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\/*  *  PinDefinitionsAndMore.h  *  *  Contains pin definitions for IRremote examples for various platforms  *  as well as definitions for feedback LED and tone() and includes  *  *  Copyright (C) 2021  Armin Joachimsmeyer  *  armin.joachimsmeyer@gmail.com  *  *  This file is part of IRremote https:\/\/github.com\/Arduino-IRremote\/Arduino-IRremote.  *  *  Arduino-IRremote is free software: you can redistribute it and\/or modify  *  it under the terms of the GNU General Public License as published by  *  the Free Software Foundation, either version 3 of the License, or  *  (at your option) any later version.  *  *  This program 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 General Public License for more details.  *  *  You should have received a copy of the GNU General Public License  *  along with this program.  If not, see &lt;http:\/\/www.gnu.org\/licenses\/gpl.html>.  *  *\/  \/*  * Pin mapping table for different platforms  *  * Platform     IR input    IR output   Tone  * -----------------------------------------  * DEFAULT\/AVR  2           3           4  * ATtinyX5     0           4           3  * ATtiny167    9           8           5 \/\/ Digispark pro number schema  * ATtiny167    3           2           7  * ATtiny3217   10          11          3 \/\/ TinyCore schema  * ATtiny1604   2           PA5\/3       %  * SAMD21       3           4           5  * ESP8266      14 \/\/ D5    12 \/\/ D6    %  * ESP32        15          4           27  * BluePill     PA6         PA7         PA3  * APOLLO3      11          12          5  *\/  #define LED_BUILTIN 12 \/\/ !!!   \/\/#define _IR_MEASURE_TIMING \/\/ For debugging purposes. \/\/ #if defined(ESP8266) #define FEEDBACK_LED_IS_ACTIVE_LOW \/\/ The LED on my board (D4) is active LOW #define IR_RECEIVE_PIN          14 \/\/ D5 #define IR_RECEIVE_PIN_STRING   \"D5\" #define IR_SEND_PIN             12 \/\/ D6 - D4\/pin 2 is internal LED #define IR_SEND_PIN_STRING      \"D6\" #define _IR_TIMING_TEST_PIN     13 \/\/ D7 #define APPLICATION_PIN          0 \/\/ D3  #define tone(...) void()      \/\/ tone() inhibits receive timer #define noTone(a) void() #define TONE_PIN                42 \/\/ Dummy for examples using it   #elif defined(ESP32) #include &lt;Arduino.h> #define TONE_LEDC_CHANNEL        1  \/\/ Using channel 1 makes tone() independent of receiving timer -> No need to stop receiving timer. void tone(uint8_t _pin, unsigned int frequency){     ledcAttachPin(_pin, TONE_LEDC_CHANNEL);     ledcWriteTone(TONE_LEDC_CHANNEL, frequency); } void tone(uint8_t _pin, unsigned int frequency, unsigned long duration){     ledcAttachPin(_pin, TONE_LEDC_CHANNEL);     ledcWriteTone(TONE_LEDC_CHANNEL, frequency);     delay(duration);     ledcWriteTone(TONE_LEDC_CHANNEL, 0); } void noTone(uint8_t _pin){     ledcWriteTone(TONE_LEDC_CHANNEL, 0); } #define IR_RECEIVE_PIN       23  \/\/ !!! #define IR_SEND_PIN          22  \/\/ !!! #define TONE_PIN                27  \/\/ D27 25 &amp; 26 are DAC0 and 1 #define APPLICATION_PIN      0   \/\/ !!!   #elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_STM32F1) \/\/ BluePill in 2 flavors \/\/ Timer 3 blocks PA6, PA7, PB0, PB1 for use by Servo or tone() #define IR_RECEIVE_PIN          PA6 #define IR_RECEIVE_PIN_STRING   \"PA6\" #define IR_SEND_PIN             PA7 #define IR_SEND_PIN_STRING      \"PA7\" #define TONE_PIN                PA3 #define _IR_TIMING_TEST_PIN      PA5 #define APPLICATION_PIN         PA2  #elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) #include \"ATtinySerialOut.hpp\" \/\/ Available as Arduino library \"ATtinySerialOut\". saves 370 bytes program space and 38 bytes RAM for digistump core #define IR_RECEIVE_PIN  0 #define IR_SEND_PIN     4 \/\/ Pin 2 is serial output with ATtinySerialOut. Pin 1 is internal LED and Pin3 is USB+ with pullup on Digispark board. #define TONE_PIN        3 #define _IR_TIMING_TEST_PIN 3  #elif defined(__AVR_ATtiny87__) || defined(__AVR_ATtiny167__) #include \"ATtinySerialOut.hpp\" \/\/ Available as Arduino library \"ATtinySerialOut\" \/\/ For ATtiny167 Pins PB6 and PA3 are usable as interrupt source. #  if defined(ARDUINO_AVR_DIGISPARKPRO) #define IR_RECEIVE_PIN   9 \/\/ PA3 - on Digispark board labeled as pin 9 \/\/#define IR_RECEIVE_PIN  14 \/\/ PB6 \/ INT0 is connected to USB+ on DigisparkPro boards #define IR_SEND_PIN      8 \/\/ PA2 - on Digispark board labeled as pin 8 #define TONE_PIN         5 \/\/ PA7 #define _IR_TIMING_TEST_PIN 10 \/\/ PA4 #  else #define IR_RECEIVE_PIN  3 #define IR_SEND_PIN     2 #define TONE_PIN        7 #  endif  #elif defined(__AVR_ATtiny88__) \/\/ MH-ET Tiny88 board #include \"ATtinySerialOut.hpp\" \/\/ Available as Arduino library \"ATtinySerialOut\". Saves 128 bytes program space \/\/ Pin 6 is TX pin 7 is RX #define IR_RECEIVE_PIN   3 \/\/ INT1 #define IR_SEND_PIN      4 #define TONE_PIN         9 #define _IR_TIMING_TEST_PIN 8  #elif defined(__AVR_ATtiny3217__) #define IR_RECEIVE_PIN  10 #define IR_SEND_PIN     11 #define TONE_PIN         3 #define APPLICATION_PIN  5  #elif defined(__AVR_ATtiny1604__) #define IR_RECEIVE_PIN   2 \/\/ To be compatible with interrupt example, pin 2 is chosen here. #define IR_SEND_PIN      3 #define APPLICATION_PIN  5  #define tone(...) void()      \/\/ Define as void, since TCB0_INT_vect is also used by tone() #define noTone(a) void() #define TONE_PIN        42 \/\/ Dummy for examples using it  #  elif defined(__AVR_ATmega1284__) || defined(__AVR_ATmega1284P__) \\ || defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) \\ || defined(__AVR_ATmega324P__) || defined(__AVR_ATmega324A__) \\ || defined(__AVR_ATmega324PA__) || defined(__AVR_ATmega164A__) \\ || defined(__AVR_ATmega164P__) || defined(__AVR_ATmega32__) \\ || defined(__AVR_ATmega16__) || defined(__AVR_ATmega8535__) \\ || defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__) \\ || defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__) \\ || defined(__AVR_ATmega8515__) || defined(__AVR_ATmega162__) #define IR_RECEIVE_PIN      2 #define IR_SEND_PIN        13 #define TONE_PIN            4 #define APPLICATION_PIN     5 #define ALTERNATIVE_IR_FEEDBACK_LED_PIN 6 \/\/ E.g. used for examples which use LED_BUILDIN for example output. #define _IR_TIMING_TEST_PIN  7  #elif defined(ARDUINO_ARCH_APOLLO3) #define IR_RECEIVE_PIN  11 #define IR_SEND_PIN     12 #define TONE_PIN         5  #elif defined(ARDUINO_ARCH_MBED) \/\/ Arduino Nano 33 BLE #define IR_RECEIVE_PIN      2 #define IR_SEND_PIN         3 #define TONE_PIN            4 #define APPLICATION_PIN     5 #define ALTERNATIVE_IR_FEEDBACK_LED_PIN 6 \/\/ E.g. used for examples which use LED_BUILDIN for example output. #define _IR_TIMING_TEST_PIN  7  #elif defined(TEENSYDUINO) #define IR_RECEIVE_PIN      2 #define IR_SEND_PIN         3 #define TONE_PIN            4 #define APPLICATION_PIN     5 #define ALTERNATIVE_IR_FEEDBACK_LED_PIN 6 \/\/ E.g. used for examples which use LED_BUILDIN for example output. #define _IR_TIMING_TEST_PIN  7  #elif defined(__AVR__) \/\/ Default as for ATmega328 like on Uno, Nano etc. #define IR_RECEIVE_PIN      2 \/\/ To be compatible with interrupt example, pin 2 is chosen here. #define IR_SEND_PIN         3 #define TONE_PIN            4 #define APPLICATION_PIN     5 #define ALTERNATIVE_IR_FEEDBACK_LED_PIN 6 \/\/ E.g. used for examples which use LED_BUILDIN for example output. #define _IR_TIMING_TEST_PIN  7  #elif defined(ARDUINO_ARCH_SAMD) || defined(ARDUINO_ARCH_SAM) #define IR_RECEIVE_PIN      2 #define IR_SEND_PIN         3 #define TONE_PIN            4 #define APPLICATION_PIN     5 #define ALTERNATIVE_IR_FEEDBACK_LED_PIN 6 \/\/ E.g. used for examples which use LED_BUILDIN for example output. #define _IR_TIMING_TEST_PIN  7  \/\/ On the Zero and others we switch explicitly to SerialUSB #define Serial SerialUSB  \/\/ Definitions for the Chinese SAMD21 M0-Mini clone, which has no led connected to D13\/PA17. \/\/ Attention!!! D2 and D4 are switched on these boards!!! \/\/ If you connect the LED, it is on pin 24\/PB11. In this case activate the next two lines. \/\/#undef LED_BUILTIN \/\/#define LED_BUILTIN 24 \/\/ PB11 \/\/ As an alternative you can choose pin 25, it is the RX-LED pin (PB03), but active low.In this case activate the next 3 lines. \/\/#undef LED_BUILTIN \/\/#define LED_BUILTIN 25 \/\/ PB03 \/\/#define FEEDBACK_LED_IS_ACTIVE_LOW \/\/ The RX LED on the M0-Mini is active LOW  #elif defined (NRF51) \/\/ BBC micro:bit #define IR_RECEIVE_PIN      2 #define IR_SEND_PIN         3 #define APPLICATION_PIN     1 #define _IR_TIMING_TEST_PIN  4  #define tone(...) void()    \/\/ no tone() available #define noTone(a) void() #define TONE_PIN           42 \/\/ Dummy for examples using it  #else #warning Board \/ CPU is not detected using pre-processor symbols -> using default values, which may not fit. Please extend PinDefinitionsAndMore.h. \/\/ Default valued for unidentified boards #define IR_RECEIVE_PIN      2 #define IR_SEND_PIN         3 #define TONE_PIN            4 #define APPLICATION_PIN     5 #define ALTERNATIVE_IR_FEEDBACK_LED_PIN 6 \/\/ E.g. used for examples which use LED_BUILDIN for example output. #define _IR_TIMING_TEST_PIN  7 #endif \/\/ defined(ESP8266)  #if !defined (FLASHEND) #define FLASHEND 0xFFFF \/\/ Dummy value for platforms where FLASHEND is not defined #endif \/*  * Helper macro for getting a macro definition as string  *\/ #define STR_HELPER(x) #x #define STR(x) STR_HELPER(x) <\/code><\/pre>\n<\/p><\/div>\n<\/p><\/div>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u0444\u0430\u0439\u043b\u0430 ir_example.ino<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\/*   Kincony KC868-A4   IR example   * ReceiveAndSend.cpp  *   *  * Record and play back last received IR signal at button press.  * The logic is:  * If the button is pressed, send the IR code.  * If an IR code is received, record it.  *  * An example for simultaneous receiving and sending is in the UnitTest example.  *  * An IR detector\/demodulator must be connected to the input IR_RECEIVE_PIN.  *  * A button must be connected between the input SEND_BUTTON_PIN and ground.  * A visible LED can be connected to STATUS_PIN to provide status.  *  * Initially coded 2009 Ken Shirriff http:\/\/www.righto.com  *  *  This file is part of Arduino-IRremote https:\/\/github.com\/Arduino-IRremote\/Arduino-IRremote.  *  *\/ #include &lt;Arduino.h>  \/*  * Define macros for input and output pin etc.  *\/ #include \"PinDefinitionsAndMore.h\"  \/\/#define EXCLUDE_EXOTIC_PROTOCOLS \/\/ saves around 900 bytes program space  #include &lt;IRremote.hpp>  int SEND_BUTTON_PIN = APPLICATION_PIN; int STATUS_PIN = LED_BUILTIN;  int DELAY_BETWEEN_REPEAT = 50;  \/\/ On the Zero and others we switch explicitly to SerialUSB #if defined(ARDUINO_ARCH_SAMD) #define Serial SerialUSB #endif  struct storedIRDataStruct { \/\/ Storage for the recorded code   IRData receivedIRData;   \/\/ extensions for sendRaw   uint8_t rawCode[RAW_BUFFER_LENGTH]; \/\/ durations if raw   uint8_t rawCodeLength;              \/\/ length of code } sStoredIRData;  int lastButtonState;  void storeCode(IRData *aIRReceivedData); void sendCode(storedIRDataStruct *aIRDataToSend);  void setup() {   Serial.begin(115200);   Serial.println(F(\"Start Kincony KC868-A4 IR example...\"));      \/\/ Just to know which program is running on my Arduino   \/\/Serial.println(F(\"START \" __FILE__ \" from \" __DATE__ \"\\r\\nUsing library version \" VERSION_IRREMOTE));    IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK); \/\/ Start the receiver, enable feedback LED, take LED feedback pin from the internal boards definition   IrSender.begin(IR_SEND_PIN, ENABLE_LED_FEEDBACK); \/\/ Specify send pin and enable feedback LED at default feedback LED pin    pinMode(STATUS_PIN, OUTPUT);    \/*   Serial.print(F(\"Ready to receive IR signals of protocols: \"));   printActiveIRProtocols (&amp;Serial);   Serial.print(F(\"at pin \"));      #if defined(ARDUINO_ARCH_STM32) || defined(ESP8266)   Serial.println(IR_RECEIVE_PIN_STRING); #else   Serial.println(IR_RECEIVE_PIN); #endif    Serial.print(F(\"Ready to send IR signals at pin \")); #if defined(ARDUINO_ARCH_STM32) || defined(ESP8266)   Serial.println(IR_SEND_PIN_STRING); #else   Serial.print(IR_SEND_PIN); #endif        Serial.print(F(\" on press of button at pin \"));   Serial.println(SEND_BUTTON_PIN);    Serial.print(F(\"LED_BUILTIN: \")); Serial.println(LED_BUILTIN);   Serial.print(F(\"STATUS_PIN: \")); Serial.println(STATUS_PIN);   Serial.print(F(\"TONE_PIN: \")); Serial.println(TONE_PIN);   Serial.print(F(\"IR_RECEIVE_PIN: \")); Serial.println(IR_RECEIVE_PIN);   Serial.print(F(\"IR_SEND_PIN: \")); Serial.println(IR_SEND_PIN);   Serial.print(F(\"APPLICATION_PIN: \")); Serial.println(APPLICATION_PIN);   *\/  } \/\/ setup  \/\/ Stores the code for later playback in sStoredIRData  void storeCode(IRData *aIRReceivedData) {   if (aIRReceivedData->flags &amp; IRDATA_FLAGS_IS_REPEAT)      {Serial.println(F(\"Ignore repeat\")); return;}   if (aIRReceivedData->flags &amp; IRDATA_FLAGS_IS_AUTO_REPEAT) {Serial.println(F(\"Ignore autorepeat\")); return;}   if (aIRReceivedData->flags &amp; IRDATA_FLAGS_PARITY_FAILED)  {Serial.println(F(\"Ignore parity error\")); return;}    sStoredIRData.receivedIRData = *aIRReceivedData; \/\/ Copy decoded data    if (sStoredIRData.receivedIRData.protocol == UNKNOWN) {     Serial.print(F(\"Received unknown code and store \"));     Serial.print(IrReceiver.decodedIRData.rawDataPtr->rawlen - 1);     Serial.println(F(\" timing entries as raw \"));          IrReceiver.printIRResultRawFormatted(&amp;Serial, true); \/\/ output the results in RAW format          sStoredIRData.rawCodeLength = IrReceiver.decodedIRData.rawDataPtr->rawlen - 1;     IrReceiver.compensateAndStoreIRResultInArray(sStoredIRData.rawCode); \/\/ store current raw data in dedicated array for later usage   } else {     IrReceiver.printIRResultShort(&amp;Serial);     sStoredIRData.receivedIRData.flags = 0; \/\/ clear flags -esp. repeat- for later sending     Serial.println();   } } \/\/ storeCode( )  void sendCode(storedIRDataStruct *aIRDataToSend) {   if (aIRDataToSend->receivedIRData.protocol == UNKNOWN) { \/\/ raw     IrSender.sendRaw(aIRDataToSend->rawCode, aIRDataToSend->rawCodeLength, 38); \/\/ 38 KHz     Serial.print(F(\"Sent raw \"));     Serial.print(aIRDataToSend->rawCodeLength);     Serial.println(F(\" marks or spaces\"));   } else {     IrSender.write(&amp;aIRDataToSend->receivedIRData, NO_REPEATS); \/\/ write func switch for different protocols     Serial.print(F(\"Sent: \"));     printIRResultShort(&amp;Serial, &amp;aIRDataToSend->receivedIRData);   } }  void loop() {   int buttonState = digitalRead(SEND_BUTTON_PIN); \/\/ active LOW    if (lastButtonState == LOW &amp;&amp; buttonState == HIGH) {     Serial.println(F(\"Button released\"));     IrReceiver.start(); \/\/ re-enable receiver   }    \/\/ Check for static button state    if (buttonState == LOW) {     IrReceiver.stop();          \/\/ Button pressed send stored data or repeat     Serial.println(F(\"Button pressed, now sending\"));     digitalWrite(STATUS_PIN, HIGH);     if (lastButtonState == buttonState) {       sStoredIRData.receivedIRData.flags = IRDATA_FLAGS_IS_REPEAT;     }     sendCode(&amp;sStoredIRData);     digitalWrite(STATUS_PIN, LOW);     delay(DELAY_BETWEEN_REPEAT); \/\/ Wait a bit between retransmissions   } else if (IrReceiver.available()) { \/\/ Button is not pressed, check for incoming data     storeCode(IrReceiver.read());     IrReceiver.resume();   }    lastButtonState = buttonState; } \/\/ loop <\/code><\/pre>\n<p>  <\/div>\n<\/p><\/div>\n<p>  \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0435\u0442\u0447\u0430: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c IR \u0441\u0438\u0433\u043d\u0430\u043b \u043e\u0442 \u043f\u0443\u043b\u044c\u0442\u0430 \u0438 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u043c \u0432 \u044d\u0444\u0438\u0440 (\u0434\u0443\u0431\u043b\u0438\u0440\u0443\u0435\u043c), \u043d\u0430\u0436\u0438\u043c\u0430\u044f \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00abUSER\u00bb \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 Kincony KC868-A4.<\/p>\n<p>  <img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/pm\/qs\/ug\/pmqsug_y_jp3-ders6ugyaqktpw.png\"\/><\/p>\n<h2><font color=\"#3AC1EF\">\u258d \u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/font><\/h2>\n<p>  \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0446\u0438\u043a\u043b\u0430 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u00ab\u0430\u0442\u043e\u043c\u0430\u0440\u043d\u044b\u0435\u00bb \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430 Kincony KC868-A4. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u2014 \u0432\u0441\u0451 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u043e \u00ab\u043e\u0442 \u0438 \u0434\u043e\u00bb: \u0444\u043e\u0442\u043e, \u0441\u0445\u0435\u043c\u044b, \u0440\u0430\u0441\u043f\u0438\u043d\u043e\u0432\u043a\u0430, \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u0434\u0430, \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u044b, \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0438 \u0442.\u00a0\u0434. <\/p>\n<p>  \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0441 KC868-A4, \u0442\u0430\u043a\u0438\u0435, \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 Wi-Fi \u0447\u0430\u0441\u0442\u044c\u044e \u0438 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u0447\u0435\u0440\u0435\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043c\u0435\u0441\u0441\u0435\u043d\u0434\u0436\u0435\u0440\u043e\u0432 Telegram \u0438\/\u0438\u043b\u0438 Whatsapp.<\/p>\n<p>  <a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=smart_alex&amp;utm_content=kincony_kc868-a4:_ultimativnyj_gajd._chast_2._programmirovanie_komponentov\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" data-src=\"https:\/\/habrastorage.org\/webt\/ou\/g5\/kh\/oug5kh6sjydt9llengsiebnp40w.png\"\/><\/a><\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/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\/company\/ruvds\/blog\/647119\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/647119\/<\/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_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\"><a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/647119\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/webt\/cg\/lv\/yj\/cglvyjzalnxceo5dixfaf1tgef4.jpeg\" data-src=\"https:\/\/habrastorage.org\/webt\/cg\/lv\/yj\/cglvyjzalnxceo5dixfaf1tgef4.jpeg\" data-blurred=\"true\"\/><\/a><\/p>\n<p>  \u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0443\u043b\u044c\u0442\u0438\u043c\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0433\u0430\u0439\u0434 \u043f\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0443 Kincony KC868-A4, \u043d\u0430\u0447\u0430\u0442\u044b\u0439 \u0432 <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/646923\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u0440\u0430\u0441\u043f\u0438\u043d\u043e\u0432\u043a\u0443 KC868-A4 \u0438 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 (\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u043e\u0432) \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430. \u0412\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u043c \u0440\u0430\u0431\u043e\u0447\u0438\u043c \u043a\u043e\u0434\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u043c\u044b \u0441 \u0440\u0430\u0441\u043f\u0438\u043d\u043e\u0432\u043a\u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f ESP32-S \u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u043a \u043d\u0435\u043c\u0443 \u0438\u043d\u0436\u0435\u043d\u0435\u0440\u0430\u043c\u0438 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 Kincony.  <\/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-328849","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328849","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=328849"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328849\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}