{"id":261746,"date":"2015-07-17T17:28:02","date_gmt":"2015-07-17T13:28:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=261746"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=261746","title":{"rendered":"\u041b\u0430\u0437\u0435\u0440\u043d\u0430\u044f \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f Arduino \u043a\u043e\u0434\u043e\u043c \u041c\u043e\u0440\u0437\u0435"},"content":{"rendered":"<p> \t\t\u041f\u043e\u0447\u0435\u043c\u0443 \u043b\u0430\u0437\u0435\u0440\u043d\u044b\u0439 \u043b\u0443\u0447, \u0430 \u043d\u0435 \u0440\u0430\u0434\u0438\u043e\u0441\u0432\u044f\u0437\u044c? \u0420\u0430\u0434\u0438 \u0444\u0430\u043d\u0430. \u0421 \u0446\u0435\u043b\u044c\u044e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0441\u0442\u0438, \u0440\u0430\u0434\u0438\u043e\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0432\u0441\u0435 \u043a\u043e\u043c\u0443 \u043d\u0435 \u043b\u0435\u043d\u044c, \u0430 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u043f\u044b\u0448\u043a\u0438 \u0441\u0432\u0435\u0442\u0430 \u043d\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u044e\u0442\u0441\u044f, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0442\u044c \u0432 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043b\u0443\u0447\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043c, \u0433\u0434\u0435 \u0440\u0430\u0434\u0438\u043e\u0441\u0432\u044f\u0437\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0438\u0437-\u0437\u0430 \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043c\u0435\u0445.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f:  <\/p>\n<ul>\n<li>2 Arduino;<\/li>\n<li>1 \u0424\u043e\u0442\u043e\u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 (\u0438\u043b\u0438 LDR) VT90N \u2014 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0432\u0435\u0442\u0430 \u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430 \u043d\u0435\u0433\u043e. \u0412 \u043f\u043e\u043b\u043d\u043e\u0439 \u0442\u0435\u043c\u043d\u043e\u0442\u0435 \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0441\u043e\u0442\u043d\u0438 \u043a\u0438\u043b\u043e\u043e\u043c, \u0430 \u043f\u043e \u043c\u0435\u0440\u0435 \u0440\u043e\u0441\u0442\u0430 \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043a\u0438\u043b\u043e\u043e\u043c:\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/05b\/026\/e1a\/05b026e1a35945969cf62c199a5fce75.jpg\"\/><\/li>\n<li>1 \u043b\u0430\u0437\u0435\u0440\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c KY-008:\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6eb\/538\/558\/6eb538558e264c02b3d92fa6dc866fc2.jpg\"\/><\/li>\n<li>2 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u044f: 220 \u041e\u043c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a\u0430,10 \u043a\u041e\u043c \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4>\u041f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a<\/h4>\n<p>  \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0441\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0432 \u0410\u0440\u0434\u0443\u0438\u043d\u0435 (Blink), \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u043e\u0440\u0433\u0430\u0442\u044c \u043a\u043e\u0434 \u041c\u043e\u0440\u0437\u0435 \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c, \u043d\u043e \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043d\u0430 \u043c\u0435\u0442\u0440\u043e\u0432\u044b\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u0430\u0437\u0435\u0440\u043e\u043c. \u041b\u0430\u0437\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u043b\u0438 \u0438\u0437 \u043b\u0430\u0437\u0435\u0440\u043d\u043e\u0439 \u0443\u043a\u0430\u0437\u043a\u0438 \u0438\u043b\u0438 \u043a\u0443\u043f\u0438\u0442\u044c \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0410\u0440\u0434\u0443\u0438\u043d\u043e \u0441 3 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3df\/e66\/8ab\/3dfe668abd054b41b8432255a7f31300.png\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043b\u0430\u0437\u0435\u0440\u0430 \u043a \u0410\u0440\u0434\u0443\u0438\u043d\u043e:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/33c\/854\/e7e\/33c854e7eb8c46f2b5a5ef37630cb3af.png\"\/><\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a KY-008 part \u043d\u0435 \u043d\u0430\u0448\u043b\u0430\u0441\u044c \u0432 fritzing \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c RGB \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434, \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0432 \u043d\u043e\u0433\u0438 S \u0438 \u201c-\u201c, S \u043f\u0438\u043d \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043a 13 \u043d\u043e\u0433\u0435, \u043c\u0438\u043d\u0443\u0441 \u043a GND (\u0437\u0435\u043c\u043b\u0435).<\/p>\n<p>  \u0414\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043a\u043e\u0434\u043e\u043c \u041c\u043e\u0440\u0437\u0435 \u2014 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0443\u043a\u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0434\u043b\u0438\u043d\u043d\u044b\u0445 (\u00ab\u0442\u0438\u0440\u0435\u00bb) \u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u0438\u0445 (\u00ab\u0442\u043e\u0447\u043a\u0430\u00bb) \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u043a\u043e\u0434\u043e\u043c \u041c\u043e\u0440\u0437\u0435 \u043d\u0435\u0442 \u043a\u043e\u0440\u0440\u0435\u043a\u0446\u0438\u0438 \u043e\u0448\u0438\u0431\u043e\u043a, \u043d\u043e \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0438 \u0431\u0435\u0437 \u043d\u0435\u0435. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0437\u043d\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432.<\/p>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u0441\u043a\u0435\u0442\u0447\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u043e\u0440\u0437\u044f\u043d\u043a\u0430, 13 \u043d\u043e\u0433\u0430 (\u043a\u0430\u043a \u0434\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 blink.ino \u0441\u043a\u0435\u0442\u0447\u0435\u0439 \u043c\u043e\u0440\u0433\u0430\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c), \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 (24 \u0441\u043b\u043e\u0432 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443), 3 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 1 \u0434\u043b\u044f beep \u0437\u0432\u0443\u043a\u043e\u0432\u043e\u0433\u043e \u0441\u0438\u0433\u043d\u0430\u043b\u0430 \u0438 0 \u0434\u043b\u044f PTT (\u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043f\u0438\u043d\u0430 \u0432 HIGH \u0438 LOW). \u0415\u0441\u043b\u0438 \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0432 \u043a\u043e\u0434 Morse.cpp \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u043c \u0447\u0442\u043e \u0434\u043b\u044f \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 1 \u2013 beep \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u0437\u0430\u043f\u0438\u0441\u044c \u043d\u0430 \u043f\u0438\u043d:<\/p>\n<p>  analogWrite(_pin, 128);<br \/>   delay(_dashlen);<br \/>   analogWrite(_pin, 0);<br \/>   delay(_dotlen);<br \/>  \u0430 \u0434\u043b\u044f 0 \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0446\u0438\u0444\u0440\u043e\u0432\u043e\u0439 \u0432\u044b\u0445\u043e\u0434<br \/>  digitalWrite(_pin, HIGH);<br \/>   delay(_dashlen);<br \/>   digitalWrite(_pin, LOW);<br \/>   delay(_dotlen);<\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u0434: Morse morse(13, 24, 0);<\/p>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043a\u0435\u0442\u0447\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 <a href=\"http:\/\/reversemidastouch.com\/code\/morse.zip\">morze.zip<\/a> \u0430\u0432\u0442\u043e\u0440\u0430 Erik Linder. \u0421\u043a\u0435\u0442\u0447 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0441\u043a\u0435\u0442\u0447 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>\/\/ Author Erik Linder \/\/ Released 2011 under GNU GPLv3 \/\/ \/\/ Usage: morse( &lt;pin number&gt;, &lt;speed WPM&gt;, &lt;1=beep, 0=PTT&gt; ) \/\/        sendmsg( &quot;&lt;text-to-send&gt;&quot; ) \/\/  #include &lt;Morse.h&gt;  \/\/ Use pin 13 (built-in LED of Arduino 2009) Morse morse(13, 24, 1);  void setup() {  }  void loop() {   morse.sendmsg(&quot;HELLO WORLD!&quot;);   delay (2000); }  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0430\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u043a\u0435\u0442\u0447, \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0433\u043e\u0442\u043e\u0432\u0430 \u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h4>\u041f\u0440\u0438\u0435\u043c\u043d\u0438\u043a<\/h4>\n<p>  \u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0441\u0445\u0435\u043c\u0443 \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0430, \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e, \u0444\u043e\u0442\u043e\u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 \u043e\u0434\u043d\u0430 \u043d\u043e\u0433\u0430 \u0441 5V \u0432\u0442\u043e\u0440\u0430\u044f \u043d\u043e\u0433\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u043f\u043e\u0440\u0442 A0, \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 10 \u043a\u041e\u043c \u2014 \u043e\u0434\u043d\u0430 \u043d\u043e\u0433\u0430 GND (\u00ab\u0437\u0435\u043c\u043b\u044f\u00bb), \u0432\u0442\u043e\u0440\u0430\u044f \u043d\u043e\u0433\u0430 A0:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6b2\/2cb\/e73\/6b22cbe733bc41e9821bfaaa24405180.png\"\/><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0441\u043a\u0435\u0442\u0447 \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>int LDR_Pin = A0; \/\/analog pin 0 int led = 13;  \/\/ 10k between GND and A0 \/\/ LDR between 5V and A0  #define MORSE_EMPTY   0 \/\/ \u042d\u0442\u0438\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0438 \u0438 \u0442\u0438\u0440\u0435. #define MORSE_DOT     '*' #define MORSE_DOT2     '+' #define MORSE_TIRE    '-' \/\/ \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0430\u0437\u0431\u0443\u043a\u0438 \u041c\u043e\u0440\u0437\u0435 (\u0432 \u0442\u043e\u0447\u043a\u0430\u0445 \u0438 \u0442\u0438\u0440\u0435) #define MAX_MORSE_SYMBOL_LENGTH  8 char* morseSymbol[MAX_MORSE_SYMBOL_LENGTH]; unsigned int morseSymbolLen; char* newMorseSignal; \/\/ \u041d\u043e\u0432\u044b\u0439 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b - \u0442\u043e\u0447\u043a\u0430 \u0438\u043b\u0438 \u0442\u0438\u0440\u0435.  \/\/ \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043a\u043e\u0434\u043e\u0432 \u041c\u043e\u0440\u0437\u0435. N-\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 n-\u043d\u043e\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0443 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0438. char* code[] = {   &quot;*-&quot;,&quot;-***&quot;,&quot;*--&quot;,&quot;--*&quot;,&quot;-**&quot;,&quot;*&quot;,&quot;***-&quot;,&quot;--**&quot;,&quot;**&quot;,&quot;*---&quot;,   &quot;-*-&quot;,&quot;*-**&quot;,&quot;--&quot;,&quot;-*&quot;,&quot;---&quot;,&quot;*--*&quot;,&quot;*-*&quot;,&quot;***&quot;,&quot;-&quot;,&quot;**-&quot;,   &quot;**-*&quot;,&quot;****&quot;,&quot;-*-*&quot;,&quot;---*&quot;,&quot;----&quot;,&quot;--*-&quot;,&quot;-*--&quot;,&quot;-**-&quot;,&quot;**-**&quot;,&quot;**--&quot;,   &quot;*-*-&quot;,   &quot;*----&quot;,&quot;**---&quot;,&quot;***--&quot;,&quot;****-&quot;,&quot;*****&quot;,&quot;-****&quot;,&quot;--***&quot;,&quot;---**&quot;,&quot;----*&quot;,&quot;-----&quot;,   &quot;......&quot;,&quot;*-*-*-&quot;,&quot;---***&quot;,&quot;-*-*-&quot;,&quot;-*--*-&quot;,&quot;*----*&quot;,&quot;*-**-*&quot;,&quot;-****-&quot;,&quot;-**-*&quot;,&quot;**--**&quot;,&quot;--**--&quot;,   &quot;-***-&quot;,&quot;********&quot;,&quot;*--*-*&quot;,&quot;**-*-&quot;,   &quot;&quot; };  \/\/ \u041a\u0438\u0440\u0438\u043b\u043b\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430. char* layoutCyrillic[] = {   &quot;\u0430&quot;,&quot;\u0431&quot;,&quot;\u0432&quot;,&quot;\u0433&quot;,&quot;\u0434&quot;,&quot;\u0435&quot;,&quot;\u0436&quot;,&quot;\u0437&quot;,&quot;\u0438&quot;,&quot;\u0439&quot;,   &quot;\u043a&quot;,&quot;\u043b&quot;,&quot;\u043c&quot;,&quot;\u043d&quot;,&quot;\u043e&quot;,&quot;\u043f&quot;,&quot;\u0440&quot;,&quot;\u0441&quot;,&quot;\u0442&quot;,&quot;\u0443&quot;,   &quot;\u0444&quot;,&quot;\u0445&quot;,&quot;\u0446&quot;,&quot;\u0447&quot;,&quot;\u0448&quot;,&quot;\u0449&quot;,&quot;\u044b&quot;,&quot;\u044c&quot;,&quot;\u044d&quot;,&quot;\u044e&quot;,   &quot;\u044f&quot;,   &quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;0&quot;,   &quot;.&quot;,&quot;,&quot;,&quot;:&quot;,&quot;;&quot;,&quot;(&quot;,&quot;\\'&quot;,&quot;\\&quot;&quot;,&quot;-&quot;,&quot;\/&quot;,&quot;?&quot;,&quot;!&quot;,   &quot; *DELIMITER* &quot;,&quot; *ERR* &quot;,&quot;@&quot;,&quot; *END* &quot;,   &quot;&quot;   }; \/\/ \u041b\u0430\u0442\u0438\u043d\u0441\u043a\u0430\u044f \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430. char* layoutLatin[] = {   &quot;a&quot;,&quot;b&quot;,&quot;w&quot;,&quot;g&quot;,&quot;d&quot;,&quot;e&quot;,&quot;v&quot;,&quot;z&quot;,&quot;i&quot;,&quot;j&quot;,   &quot;k&quot;,&quot;l&quot;,&quot;m&quot;,&quot;n&quot;,&quot;o&quot;,&quot;p&quot;,&quot;r&quot;,&quot;s&quot;,&quot;t&quot;,&quot;u&quot;,   &quot;f&quot;,&quot;h&quot;,&quot;c&quot;,&quot;\u00f6&quot;,&quot;ch&quot;,&quot;q&quot;,&quot;y&quot;,&quot;x&quot;,&quot;\u00e9&quot;,&quot;\u00fc&quot;,   &quot;\u00e4&quot;,   &quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;0&quot;,   &quot;.&quot;,&quot;,&quot;,&quot;:&quot;,&quot;;&quot;,&quot;(&quot;,&quot;\\'&quot;,&quot;\\&quot;&quot;,&quot;-&quot;,&quot;\/&quot;,&quot;?&quot;,&quot;!&quot;,   &quot; *DELIMITER* &quot;,&quot; *ERR* &quot;,&quot;@&quot;,&quot; *END* &quot;,   &quot;&quot; };  char** currentLayout; char** newLayout;   void setup(){   Serial.begin(9600);   pinMode(led, OUTPUT);      morseSymbolLen = 0;      newMorseSignal = MORSE_EMPTY;    } int counter_high = 0; int counter_low = 0; int i; void loop(){    int LDRReading = analogRead(LDR_Pin);    if (LDRReading &gt;= 800){   counter_high++ ;    if ( counter_low &gt; 0 ){   \/\/  Serial.print(&quot;Low\\t&quot;);  \/\/   Serial.print(counter_low); \/\/     Serial.print(&quot;\\n&quot;);    }    if ( counter_low &gt; 1200) {     \/\/  for (i = 0; i&lt; morseSymbolLen; i++) {          \/\/ Serial.print( currentLayout[i]);     \/\/ }     sendMorseSymbol();     morseSymbolLen=0;       Serial.println();     \/\/currentLayout[0]=&quot; &quot;;     \/\/currentLayout[1]=&quot; &quot;;     \/\/currentLayout[2]=&quot; &quot;;     \/\/currentLayout[3]=&quot; &quot;;     \/\/currentLayout[4]=&quot; &quot;;     \/\/currentLayout[5]=&quot; &quot;;     \/\/currentLayout[6]=&quot; &quot;;     \/\/currentLayout[7]=&quot; &quot;;     \/\/currentLayout[8]=&quot; &quot;;     \/\/morseSymbolLen=0;   }      counter_low=0;      digitalWrite(led, HIGH);       } else { \/\/   Serial.print(&quot;.&quot;);   counter_low++;   if ( counter_high &gt; 0 ){ \/\/      Serial.print(&quot;High\\t&quot;);   \/\/   Serial.print(counter_high);    }   if ( (counter_high &lt; 1200 ) &&( counter_high &gt;350)){ \/\/      Serial.print(counter_high);     Serial.print(&quot;.&quot;);     newMorseSignal=&quot;*&quot;;     morseSymbol[morseSymbolLen++] = newMorseSignal;    \/\/ currentLayout[morseSymbolLen]=&quot;.&quot;;    \/\/ morseSymbolLen=morseSymbolLen+1;   }   if ( counter_high &gt; 1200 ){  \/\/         Serial.print(counter_high);         Serial.print(&quot;-&quot;);         newMorseSignal=&quot;-&quot;;         morseSymbol[morseSymbolLen++] = newMorseSignal;        \/\/ currentLayout[morseSymbolLen]=&quot;-&quot;;        \/\/     morseSymbolLen=morseSymbolLen+1;   }        counter_high=0;       digitalWrite(led, LOW);    }    } void sendMorseSymbol() {   boolean est;   int i, j;   est=-1;   if (morseSymbolLen &lt; 1) {     return;   }       Serial.print(morseSymbolLen);           \/\/ \u0421\u0438\u043c\u0432\u043e\u043b \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043a\u043e\u0434\u043e\u0432 \u041c\u043e\u0440\u0437\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0443.       \/\/  \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440.     String str1;     String strm;     str1=&quot;&quot;;     for (i=0;i&lt;morseSymbolLen;i++){        str1=str1+morseSymbol[i];     }    \/\/  Serial.print(code[6]);                               for (i=0;i&lt;56;i++){       String str2(code[i]);                  if (str1.compareTo(str2)==0){         \/\/Serial.print(str1);        \/\/ Serial.print(&quot;est&quot;);        Serial.print(str2);        est=true;       break;       }        }       if (est!=-1){       Serial.print(layoutLatin[i]);           }       morseSymbolLen = 0;       return;     }  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h4>\u041f\u0440\u0438\u0435\u043c\u043d\u0438\u043a \u0441 LCD \u044d\u043a\u0440\u0430\u043d\u043e\u043c<\/h4>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432 COM \u043f\u043e\u0440\u0442, \u044d\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0437\u0434\u043e\u0440\u043e\u0432\u043e, \u043d\u043e \u043d\u0435 \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c 2 \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u0441 I2C \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/8e5\/3dd\/4c7\/8e53dd4c7059440abee90955dbd20ae0.png\"\/><\/p>\n<p>  \u0414\u043b\u044f \u044d\u043a\u0440\u0430\u043d\u0430 SDA \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u043d\u043e\u0433\u0443 arduino UNO A5, SCL \u2013 A4, VCC \u044d\u043a\u0440\u0430\u043d\u0430 \u043a 5V, GND \u043a GND:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/7e8\/5ab\/bf9\/7e85abbf931d4cfcb14cfef89ac948f4.jpg\"\/><\/p>\n<p>  \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0441\u043a\u0435\u0442\u0447\u0435 \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0430 receiver.ino \u0441\u0442\u0440\u043e\u043a\u0438 \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0435 \u0437\u0430 \u0432\u044b\u0432\u043e\u0434 \u043d\u0430 2 \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0439 LCD \u044d\u043a\u0440\u0430\u043d. \u041c\u043e\u0436\u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0439\u0442\u0438 \u0432 \u043f\u043e\u043b\u0435 \u0441 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u043e\u043c \u0438 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u044f\u043c\u043e \u0441 LCD \u044d\u043a\u0440\u0430\u043d\u0430.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0441\u043a\u0435\u0442\u0447 \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0430 \u0441 LCD \u044d\u043a\u0440\u0430\u043d\u043e\u043c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include &lt;LCD.h&gt; #include &lt;LiquidCrystal_I2C.h&gt;  #include &lt;Wire.h&gt; \/\/ Define I2C Address where the PCF8574* is #define I2C_ADDR    0x27    \/\/ Define LCD Pins #define BACKLIGHT_PIN     3 #define En_pin  2 #define Rw_pin  1 #define Rs_pin  0 #define D4_pin  4 #define D5_pin  5 #define D6_pin  6 #define D7_pin  7   \/\/ Initialize LiquadCrystal with pin setup LiquidCrystal_I2C lcd(I2C_ADDR,En_pin,Rw_pin,Rs_pin,D4_pin,D5_pin,D6_pin,D7_pin);   int pos_lcd,pos_lcd2;     int LDR_Pin = A0; \/\/analog pin 0 int led = 13;  \/\/ 10k between GND and A0 \/\/ LDR between 5V and A0  \/\/ \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0444\u043e\u0442\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 #define LEVEL_LDR    800  #define MORSE_EMPTY   0  \/\/ \u042d\u0442\u0438\u043c\u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c\u0438 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0442\u043e\u0447\u043a\u0438 \u0438 \u0442\u0438\u0440\u0435. #define MORSE_DOT     '*' #define MORSE_DASH    '-'     \/\/\u0414\u043b\u0438\u043d\u0430 \u0442\u043e\u0447\u043a\u0438 \u0438 \u0442\u0438\u0440\u0435 \u0434\u043b\u044f 24 \u0441\u043b\u043e\u0432 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 (wpm) = 150 \u043c\u0441 \u0438 700 \u043c\u0441,   \/\/ \u0414\u043b\u044f 12 wpm = 700 \u0438 1200  #define MORSE_TIME_DOT 150 #define MORSE_TIME_DASH 700  \/\/ \u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u0438\u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u0430\u0437\u0431\u0443\u043a\u0438 \u041c\u043e\u0440\u0437\u0435 (\u0432 \u0442\u043e\u0447\u043a\u0430\u0445 \u0438 \u0442\u0438\u0440\u0435) #define MAX_MORSE_SYMBOL_LENGTH  8 char* morseSymbol[MAX_MORSE_SYMBOL_LENGTH]; unsigned int morseSymbolLen; char* newMorseSignal; \/\/ \u041d\u043e\u0432\u044b\u0439 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0441\u0438\u0433\u043d\u0430\u043b - \u0442\u043e\u0447\u043a\u0430 \u0438\u043b\u0438 \u0442\u0438\u0440\u0435.  \/\/ \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043a\u043e\u0434\u043e\u0432 \u041c\u043e\u0440\u0437\u0435. N-\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 n-\u043d\u043e\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0443 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0438. char* code[] = {   &quot;*-&quot;,&quot;-***&quot;,&quot;*--&quot;,&quot;--*&quot;,&quot;-**&quot;,&quot;*&quot;,&quot;***-&quot;,&quot;--**&quot;,&quot;**&quot;,&quot;*---&quot;,   &quot;-*-&quot;,&quot;*-**&quot;,&quot;--&quot;,&quot;-*&quot;,&quot;---&quot;,&quot;*--*&quot;,&quot;*-*&quot;,&quot;***&quot;,&quot;-&quot;,&quot;**-&quot;,   &quot;**-*&quot;,&quot;****&quot;,&quot;-*-*&quot;,&quot;---*&quot;,&quot;----&quot;,&quot;--*-&quot;,&quot;-*--&quot;,&quot;-**-&quot;,&quot;**-**&quot;,&quot;**--&quot;,   &quot;*-*-&quot;,   &quot;*----&quot;,&quot;**---&quot;,&quot;***--&quot;,&quot;****-&quot;,&quot;*****&quot;,&quot;-****&quot;,&quot;--***&quot;,&quot;---**&quot;,&quot;----*&quot;,&quot;-----&quot;,   &quot;......&quot;,&quot;*-*-*-&quot;,&quot;---***&quot;,&quot;-*-*-&quot;,&quot;-*--*-&quot;,&quot;*----*&quot;,&quot;*-**-*&quot;,&quot;-****-&quot;,&quot;-**-*&quot;,&quot;**--**&quot;,&quot;--**--&quot;,   &quot;-***-&quot;,&quot;********&quot;,&quot;*--*-*&quot;,&quot;**-*-&quot;,   &quot;&quot; };  \/\/ \u041a\u0438\u0440\u0438\u043b\u043b\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430. char* layoutCyrillic[] = {   &quot;\u0430&quot;,&quot;\u0431&quot;,&quot;\u0432&quot;,&quot;\u0433&quot;,&quot;\u0434&quot;,&quot;\u0435&quot;,&quot;\u0436&quot;,&quot;\u0437&quot;,&quot;\u0438&quot;,&quot;\u0439&quot;,   &quot;\u043a&quot;,&quot;\u043b&quot;,&quot;\u043c&quot;,&quot;\u043d&quot;,&quot;\u043e&quot;,&quot;\u043f&quot;,&quot;\u0440&quot;,&quot;\u0441&quot;,&quot;\u0442&quot;,&quot;\u0443&quot;,   &quot;\u0444&quot;,&quot;\u0445&quot;,&quot;\u0446&quot;,&quot;\u0447&quot;,&quot;\u0448&quot;,&quot;\u0449&quot;,&quot;\u044b&quot;,&quot;\u044c&quot;,&quot;\u044d&quot;,&quot;\u044e&quot;,   &quot;\u044f&quot;,   &quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;0&quot;,   &quot;.&quot;,&quot;,&quot;,&quot;:&quot;,&quot;;&quot;,&quot;(&quot;,&quot;\\'&quot;,&quot;\\&quot;&quot;,&quot;-&quot;,&quot;\/&quot;,&quot;?&quot;,&quot;!&quot;,   &quot; *DELIMITER* &quot;,&quot; *ERR* &quot;,&quot;@&quot;,&quot; *END* &quot;,   &quot;&quot;   }; \/\/ \u041b\u0430\u0442\u0438\u043d\u0441\u043a\u0430\u044f \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0430. char* layoutLatin[] = {   &quot;a&quot;,&quot;b&quot;,&quot;w&quot;,&quot;g&quot;,&quot;d&quot;,&quot;e&quot;,&quot;v&quot;,&quot;z&quot;,&quot;i&quot;,&quot;j&quot;,   &quot;k&quot;,&quot;l&quot;,&quot;m&quot;,&quot;n&quot;,&quot;o&quot;,&quot;p&quot;,&quot;r&quot;,&quot;s&quot;,&quot;t&quot;,&quot;u&quot;,   &quot;f&quot;,&quot;h&quot;,&quot;c&quot;,&quot;\u00f6&quot;,&quot;ch&quot;,&quot;q&quot;,&quot;y&quot;,&quot;x&quot;,&quot;\u00e9&quot;,&quot;\u00fc&quot;,   &quot;\u00e4&quot;,   &quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;7&quot;,&quot;8&quot;,&quot;9&quot;,&quot;0&quot;,   &quot;.&quot;,&quot;,&quot;,&quot;:&quot;,&quot;;&quot;,&quot;(&quot;,&quot;\\'&quot;,&quot;\\&quot;&quot;,&quot;-&quot;,&quot;\/&quot;,&quot;?&quot;,&quot;!&quot;,   &quot; *DELIMITER* &quot;,&quot; *ERR* &quot;,&quot;@&quot;,&quot; *END* &quot;,   &quot;&quot; };    void setup(){   Serial.begin(9600);      pos_lcd=0;   lcd.begin (16,2);     \/\/ Switch on the backlight   lcd.setBacklightPin(BACKLIGHT_PIN,POSITIVE);   lcd.setBacklight(HIGH);     \/\/ Reset cursor to home   lcd.home ();                      \/\/ Print Hello World  \/\/ lcd.print(&quot;GOTOV priem&quot;);             pinMode(led, OUTPUT);      morseSymbolLen = 0;      newMorseSignal = MORSE_EMPTY;    } int counter_high = 0; int counter_low = 0; int i; void loop(){    int LDRReading = analogRead(LDR_Pin);    if (LDRReading &gt;= LEVEL_LDR){   counter_high++ ;     if ( counter_low &gt; MORSE_TIME_DASH) {     sendMorseSymbol();     morseSymbolLen=0;   }       counter_low=0;      digitalWrite(led, HIGH);       } else {   counter_low++;    if ( (counter_high &lt; MORSE_TIME_DASH ) &&( counter_high &gt;MORSE_TIME_DOT)){     Serial.print(&quot;.&quot;);     newMorseSignal=&quot;*&quot;;     morseSymbol[morseSymbolLen++] = newMorseSignal;   }   if ( counter_high &gt; MORSE_TIME_DASH ){         Serial.print(&quot;-&quot;);         newMorseSignal=&quot;-&quot;;         morseSymbol[morseSymbolLen++] = newMorseSignal;    }        counter_high=0;       digitalWrite(led, LOW);    }    } void sendMorseSymbol()  {   boolean est;   int i, j;   est=-1;   if (morseSymbolLen &lt; 1)  \t{ \treturn; \t}              \/\/ \u0421\u0438\u043c\u0432\u043e\u043b \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043a\u043e\u0434\u043e\u0432 \u041c\u043e\u0440\u0437\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c\u0443 \u0441\u0438\u043c\u0432\u043e\u043b\u0443.       \/\/  \u041e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b \u043d\u0430 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440.     String str1;     str1=&quot;&quot;;     for (i=0;i&lt;morseSymbolLen;i++) \t{   \tstr1=str1+morseSymbol[i]; \t}                 for (i=0;i&lt;56;i++) \t{ \tString str2(code[i]); \tif (str1.compareTo(str2)==0) \t\t{ \t\tSerial.print(str2); \t\test=true; \t\tbreak; \t\t}        }              if (est!=-1) \t{ \tSerial.print(layoutLatin[i]);    \/\/   \u0412\u044b\u0432\u043e\u0434 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043d\u0430 LCD \u044d\u043a\u0440\u0430\u043d \tif (pos_lcd&gt;16 )  \t\t{ \t\tSerial.print(&quot;vtorayStroka&quot;); \t\tpos_lcd2=pos_lcd-17;   \t\tSerial.print(pos_lcd); \t\tlcd.setCursor(pos_lcd2,1 ); \/\/\u041f\u0438\u0448\u0435\u043c \u0432 LCD \u043d\u0430 2 \u0441\u0442\u0440\u043e\u043a \t\t} \tpos_lcd=pos_lcd+1;    \tif (pos_lcd&gt;32)  \t\t{ \t\tlcd.clear(); \t\tpos_lcd=0; \t\t} \tlcd.print(layoutLatin[i]);  \tlcd.setBacklight(HIGH);     \/\/ Backlight on \t}       morseSymbolLen = 0;       return;     }  <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<h4>\u0418\u0442\u043e\u0433\u0438<\/h4>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0443 \u043c\u0435\u043d\u044f \u043a\u0430\u043a \u0438 \u0432 \u043a\u043e\u043c\u043d\u0430\u0442\u0435 \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u043d\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0438 0,5\u20133 \u043c\u0435\u0442\u0440\u0430, \u0442\u0430\u043a \u0438 \u0432\u0435\u0447\u0435\u0440\u043e\u043c \u043d\u0430 \u0443\u043b\u0438\u0446\u0435 \u043d\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0438 7\u201314 \u043c. \u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u043e\u043a\u0430 \u043d\u0435 \u0431\u044b\u043b\u0438 \u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043d\u044b. \u041f\u0435\u0440\u0435\u0434\u0430\u0447\u0430 \u0434\u043d\u0435\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u0432\u0435\u0442\u043e\u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043d\u043e\u0439 \u0442\u0440\u0443\u0431\u044b \u0447\u0442\u043e\u0431\u044b \u043d\u0430 \u0444\u043e\u0442\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043d\u0435 \u043f\u0430\u0434\u0430\u043b \u0441\u043e\u043b\u043d\u0435\u0447\u043d\u044b\u0439 \u0438 \u0434\u043d\u0435\u0432\u043d\u043e\u0439 \u0441\u0432\u0435\u0442, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u0435\u0442 \u043e\u0442 \u043b\u0430\u0437\u0435\u0440\u0430 \u0438\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c LEVEL_LDR \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u0437\u0430 \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043a \u0441\u0432\u0435\u0442\u0443 \u0432 \u0441\u043a\u0435\u0442\u0447\u0435 \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0430.<\/p>\n<h4>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438<\/h4>\n<p>  <\/p>\n<ul>\n<li><a href=\"http:\/\/reversemidastouch.blogspot.ru\/2013\/09\/arduino-morse-code-senderreceiver-pair.html\">Arduino Morse Code Sender\/Receiver pair using lasers<\/a><\/li>\n<li><a href=\"http:\/\/habrahabr.ru\/post\/83588\/\">\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 Arduino, \u0447\u0430\u0441\u0442\u044c 2. \u041c\u043e\u0440\u0437\u0435-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430: \u0430\u043b\u044c\u0444\u0430-\u0432\u0435\u0440\u0441\u0438\u044f<\/a><\/li>\n<li><a href=\"http:\/\/habrahabr.ru\/post\/85530\/\">\u0417\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 Arduino, \u0447\u0430\u0441\u0442\u044c 3. \u041c\u043e\u0440\u0437\u0435-\u043a\u043b\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u0430: \u0431\u0435\u0442\u0430-\u0432\u0435\u0440\u0441\u0438\u044f<\/a><\/li>\n<li><a href=\"http:\/\/habrahabr.ru\/special\/microsoft\/appoftheyear\/app\/7688\/\">\u0424\u043e\u043d\u0430\u0440\u0438\u043a \u041c\u043e\u0440\u0437\u0435<\/a><\/li>\n<li><a href=\"https:\/\/cmsarduino.wordpress.com\/\">Morse Code Laser Transceiver<\/a><\/li>\n<li><a href=\"http:\/\/mad-science.wonderhowto.com\/how-to\/send-your-secret-spy-messages-wirelessly-through-light-with-diy-laser-audio-transmitter-0138974\/\">Send Your Secret Spy Messages Wirelessly Through Light with This DIY Laser Audio Transmitter<\/a><\/li>\n<li><a href=\"http:\/\/www.instructables.com\/id\/Laser-Transceiver\/?ALLSTEPS\">Laser Transceiver (laser data link)<\/a><\/li>\n<li><a href=\"http:\/\/blog.christianperone.com\/?p=2383\">Raspberry Pi &#038; Arduino: a laser pointer communication and a LDR voltage sigmoid<\/a> <\/li>\n<\/ul>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/geektimes.ru\/post\/258948\/\"> http:\/\/geektimes.ru\/post\/258948\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p> \t\t\u041f\u043e\u0447\u0435\u043c\u0443 \u043b\u0430\u0437\u0435\u0440\u043d\u044b\u0439 \u043b\u0443\u0447, \u0430 \u043d\u0435 \u0440\u0430\u0434\u0438\u043e\u0441\u0432\u044f\u0437\u044c? \u0420\u0430\u0434\u0438 \u0444\u0430\u043d\u0430. \u0421 \u0446\u0435\u043b\u044c\u044e \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u043e\u0441\u0442\u0438, \u0440\u0430\u0434\u0438\u043e\u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u044e\u0442 \u0432\u0441\u0435 \u043a\u043e\u043c\u0443 \u043d\u0435 \u043b\u0435\u043d\u044c, \u0430 \u043f\u0435\u0440\u0435\u0445\u0432\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432\u0441\u043f\u044b\u0448\u043a\u0438 \u0441\u0432\u0435\u0442\u0430 \u043d\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u044e\u0442\u0441\u044f, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0442\u044c \u0432 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043b\u0443\u0447\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043c, \u0433\u0434\u0435 \u0440\u0430\u0434\u0438\u043e\u0441\u0432\u044f\u0437\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 \u0438\u0437-\u0437\u0430 \u0441\u0438\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043c\u0435\u0445.<\/p>\n<p>  \u0414\u043b\u044f \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f:  <\/p>\n<ul>\n<li>2 Arduino;<\/li>\n<li>1 \u0424\u043e\u0442\u043e\u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 (\u0438\u043b\u0438 LDR) VT90N \u2014 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043c\u0435\u043d\u044f\u044e\u0449\u0438\u0439 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0432\u0435\u0442\u0430 \u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u043d\u0430 \u043d\u0435\u0433\u043e. \u0412 \u043f\u043e\u043b\u043d\u043e\u0439 \u0442\u0435\u043c\u043d\u043e\u0442\u0435 \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0432 \u0441\u043e\u0442\u043d\u0438 \u043a\u0438\u043b\u043e\u043e\u043c, \u0430 \u043f\u043e \u043c\u0435\u0440\u0435 \u0440\u043e\u0441\u0442\u0430 \u043e\u0441\u0432\u0435\u0449\u0451\u043d\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u0442\u0441\u044f \u0434\u043e \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043a\u0438\u043b\u043e\u043e\u043c:\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/05b\/026\/e1a\/05b026e1a35945969cf62c199a5fce75.jpg\"\/><\/li>\n<li>1 \u043b\u0430\u0437\u0435\u0440\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c KY-008:\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/6eb\/538\/558\/6eb538558e264c02b3d92fa6dc866fc2.jpg\"\/><\/li>\n<li>2 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u044f: 220 \u041e\u043c \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a\u0430,10 \u043a\u041e\u043c \u0434\u043b\u044f \u043f\u0440\u0438\u0435\u043c\u043d\u0438\u043a\u0430.<\/li>\n<\/ul>\n<p>  <\/p>\n<h4>\u041f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a<\/h4>\n<p>  \u041f\u0435\u0440\u0435\u0434\u0430\u0442\u0447\u0438\u043a \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0441\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u0432 \u0410\u0440\u0434\u0443\u0438\u043d\u0435 (Blink), \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043c\u043e\u0440\u0433\u0430\u0442\u044c \u043a\u043e\u0434 \u041c\u043e\u0440\u0437\u0435 \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u043c, \u043d\u043e \u043d\u0430 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043d\u0430 \u043c\u0435\u0442\u0440\u043e\u0432\u044b\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043b\u0430\u0437\u0435\u0440\u043e\u043c. \u041b\u0430\u0437\u0435\u0440 \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438\u043b\u0438 \u0438\u0437 \u043b\u0430\u0437\u0435\u0440\u043d\u043e\u0439 \u0443\u043a\u0430\u0437\u043a\u0438 \u0438\u043b\u0438 \u043a\u0443\u043f\u0438\u0442\u044c \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0434\u043b\u044f \u0410\u0440\u0434\u0443\u0438\u043d\u043e \u0441 3 \u043a\u043e\u043d\u0442\u0430\u043a\u0442\u0430\u043c\u0438:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/3df\/e66\/8ab\/3dfe668abd054b41b8432255a7f31300.png\"\/>  <\/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-261746","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/261746","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=261746"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/261746\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=261746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=261746"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=261746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}