{"id":283275,"date":"2016-12-29T22:30:03","date_gmt":"2016-12-29T19:30:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=283275"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=283275","title":{"rendered":"Ambilight \u0434\u043b\u044f World of Tanks \u2014 \u041d\u043e\u0432\u043e\u0433\u043e\u0434\u043d\u044f\u044f \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0430 ;)"},"content":{"rendered":"<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0438\u0434\u0435\u043e<br \/>  \u0412\u0438\u0434\u0435\u043e \u043a\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0438 \u0442\u0440\u044f\u0441\u0435\u0442\u0441\u044f \u0438\u0437 \u0437\u0430 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u043e\u0434\u043d\u043e\u0439 \u0440\u0443\u043a\u043e\u0439 \u0441\u043d\u0438\u043c\u0430\u044e, \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u044b\u0442\u0430\u044e\u0441\u044c \u0438\u0433\u0440\u0430\u0442\u044c.  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 75.0019%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/D8Tr7JS8ejE?rel=0&amp;showinfo=1\" frameborder=\"0\" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\" style=\"top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  \u0412 \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0432\u0441\u0435 \u0432\u044b\u0448\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0438\u043d\u0433\u0440\u0435\u0434\u0438\u0435\u043d\u0442\u044b:<br \/>  1. Arduino \u2014 \u043a\u0430\u043a\u0430\u044f \u0435\u0441\u0442\u044c.<br \/>  2. \u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b WS2812B (\u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u043a\u043e\u043b\u044c\u0446\u043e \u2014 \u043a\u0443\u043f\u0438\u043b \u0434\u0430\u0432\u043d\u043e, \u0441\u0435\u0439\u0447\u0430\u0441 \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c) <br \/>  3. <a href=\"https:\/\/yadi.sk\/d\/ECwrCAsJ35pD6K\">\u041c\u043e\u0434 \u0434\u043b\u044f \u0442\u0430\u043d\u043a\u043e\u0432<\/a><br \/>  \u041c\u043e\u0434 \u0434\u043b\u044f \u043c\u043e\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0442\u043e\u0432\u0430\u0440\u0438\u0449 <a href=\"http:\/\/www.koreanrandom.com\/forum\/user\/16412-kotyarko-o\/\">Kotyarko_O<\/a> \u0441 \u0444\u043e\u0440\u0443\u043c\u0430 koreanrandom, \u0437\u0430 \u0447\u0442\u043e \u0435\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e. \u0412 \u0430\u0440\u0445\u0438\u0432\u0435 \u0441 \u043c\u043e\u0434\u043e\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u044b \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438<br \/>  4. <a href=\"https:\/\/yadi.sk\/d\/dAxq5Zga35pFS7\">\u041f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u041f\u041a.<\/a> \u2014 \u0432 \u0430\u0440\u0445\u0438\u0432\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043f\u0430\u043f\u043a\u0435 bin<\/p>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u0441\u0435 \u044d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e, \u043a \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0443 \u043f\u0440\u0438\u043a\u043b\u0435\u0438\u043b \u043d\u0430 \u0434\u0432\u0443\u0445\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0439 \u0441\u043a\u043e\u0442\u0447.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/f04\/b7b\/565\/f04b7b565ded415497d61b33db098ba9.jpg\" alt=\"image\"\/><br \/>  \u041d\u041e! \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u043c\u0438\u043d\u0438\u043c\u0443\u043c.<br \/>  \u0417\u0430 \u043a\u043e\u0434 \u043f\u0440\u043e\u0448\u0443 \u0441\u0442\u0440\u043e\u0433\u043e \u043d\u0435 \u0441\u0443\u0434\u0438\u0442\u044c, \u043e\u043d \u043a\u0440\u0438\u0432\u043e\u0439 \u043a\u043e\u0441\u043e\u0439 \ud83d\ude42 \u042f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0435\u0440 \ud83d\ude42 \u041a\u043e\u043c\u0443 \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434 \u0441\u0435\u0431\u044f \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u043e.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434 \u0430\u0440\u0434\u0443\u0438\u043d\u043e<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code>#include &lt;Adafruit_NeoPixel.h&gt; #ifdef __AVR__   #include &lt;avr\/power.h&gt; #endif #define PIN            6 #define NUMPIXELS      8 Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); String ser; int red = 0; int green =0; void setup() {   pixels.begin(); \/\/ This initializes the NeoPixel library.     Serial.begin(9600);     while (!Serial) {     ; \/\/ wait for port to be ready   }   Serial.setTimeout(100); }  void loop() {   if (Serial.available() &gt; 0)    {     ser = Serial.readString();     if (ser != &quot;end&quot;)     {       green = ser.toInt()*2;       red = green-100;       for(int i=0;i&lt;NUMPIXELS;i++)       {         pixels.setPixelColor(i, pixels.Color(red,green,0));       }       pixels.show();     }     else     {      for(int i=0;i&lt;NUMPIXELS;i++)       {         pixels.setPixelColor(i, pixels.Color(0,0,0));       }       pixels.show();      }   } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f \u041f\u041a, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 C#<\/b><\/p>\n<div class=\"spoiler_text\">   private void button1_Click(object sender, EventArgs e)<br \/>   {<br \/>   timer1.Enabled = true;<br \/>   }<\/p>\n<p>  private void timer1_Tick(object sender, EventArgs e)<br \/>   {<br \/>   XmlDocument doc = new XmlDocument();<br \/>   SerialPort serialPort1 = new SerialPort();<br \/>   doc.Load(@\u00abC:\\World_of_Tanks\\res_mods\\0.9.17.0.1\\scripts\\client\\gui\\mods\\mod_ArduinoHP.xml\u00bb);<br \/>   string maxHealth = doc.DocumentElement.ChildNodes[0].InnerText;<br \/>   string currentHealth = doc.DocumentElement.ChildNodes[1].InnerText;<br \/>   string healthProgress = doc.DocumentElement.ChildNodes[2].InnerText;<br \/>   serialPort1.PortName = \u00abCOM13\u00bb; \/\/\u0437\u0430\u0434\u0430\u0435\u043c \u0438\u043c\u044f COM-\u043f\u043e\u0440\u0442\u0430, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 Arduino<br \/>   serialPort1.Open(); \/\/\u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c COM-\u043f\u043e\u0440\u0442<\/p>\n<p>  if (healthProgress != &quot;&quot;)<br \/>   {<br \/>   serialPort1.Write(healthProgress);<br \/>   }<br \/>   else<br \/>   serialPort1.Write(\u00abend\u00bb);<br \/>   serialPort1.Close(); \/\/\u0437\u0430\u043a\u0440\u044b\u0432\u0430\u0435\u043c COM-\u043f\u043e\u0440\u0442<br \/>   }  <\/div>\n<\/div>\n<p>  \u041d\u0443 \u0432\u043e\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438 \u0432\u0441\u0435. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c. \u041c\u043e\u0434 \u0434\u043b\u044f \u0442\u0430\u043d\u043a\u043e\u0432 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0432 xml \u0444\u0430\u0439\u043b \u0432\u0441\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u041f\u041a \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0447\u0438\u0442\u0430\u0435\u0442 xml \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0432\u0441\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0430\u0440\u0434\u0443\u0438\u043d\u0435, \u0442\u0430 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0446\u0432\u0435\u0442\u043e\u043c. <br \/>  P.S. \u0412\u0441\u0435 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u0434\u043e\u0434\u0435\u043b\u0430\u0442\u044c, \u0434\u043e\u043f\u0438\u043b\u0438\u0442\u044c, \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c\u2026 \u041d\u043e \u0443\u0436\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043f\u0430\u0442\u044c \ud83d\ude42<br \/>  P.P.S \u0412\u0441\u0435\u0445 \u0441 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u044e\u0449\u0438\u043c!<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:\/\/geektimes.ru\/post\/284214\/\"> https:\/\/geektimes.ru\/post\/284214\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0438\u0434\u0435\u043e<br \/>  \u0412\u0438\u0434\u0435\u043e \u043a\u0430\u0447\u0430\u0435\u0442\u0441\u044f \u0438 \u0442\u0440\u044f\u0441\u0435\u0442\u0441\u044f \u0438\u0437 \u0437\u0430 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u043e\u0434\u043d\u043e\u0439 \u0440\u0443\u043a\u043e\u0439 \u0441\u043d\u0438\u043c\u0430\u044e, \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u044b\u0442\u0430\u044e\u0441\u044c \u0438\u0433\u0440\u0430\u0442\u044c.  <\/p>\n<div class=\"oembed\">\n<div>\n<div style=\"left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 75.0019%;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/D8Tr7JS8ejE?rel=0&amp;showinfo=1\" frameborder=\"0\" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\" style=\"top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;\"><\/iframe><\/div>\n<\/div>\n<\/div>\n<p>  \u0412 \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u0438 \u0432\u0441\u0435 \u0432\u044b\u0448\u043b\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e.   <\/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-283275","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283275","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=283275"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/283275\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=283275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=283275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=283275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}