{"id":192168,"date":"2013-09-01T20:20:02","date_gmt":"2013-09-01T16:20:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=192168"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=192168","title":{"rendered":"<span class=\"post_title\">\u0417\u0430\u043c\u043a\u043d\u0443\u0442\u0430\u044f \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e-\u0440\u0443\u0441\u0441\u043a\u0438<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439, \u0425\u0430\u0431\u0440! <\/p>\n<p>  \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u0430\u0434\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430, \u043e\u0431 \u0430\u043d\u0433\u043b\u0438\u0447\u0430\u043d\u0438\u043d\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 53 \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434 \u043f\u043e\u0441\u0430\u0434\u0438\u043b \u0432 \u0431\u0430\u043d\u043a\u0443 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/\u0422\u0440\u0430\u0434\u0435\u0441\u043a\u0430\u043d\u0446\u0438\u044f\"> \u0442\u0440\u0430\u0434\u0435\u0441\u043a\u0430\u043d\u0446\u0438\u044e<\/a>.\u041e\u043d \u0437\u0430\u043a\u0443\u043f\u043e\u0440\u0438\u043b \u0431\u0443\u0442\u044b\u043b\u043a\u0443 \u0438, \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0438\u0432\u0430 40 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434, \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b \u0435\u0451. \u0418\u0434\u0435\u0438 \u043f\u0440\u0438\u0448\u043b\u0430 \u0435\u043c\u0443 \u0438\u0437 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u0441\u0442\u0432\u0430. \u0418 \u043f\u043e \u0441\u0435\u0439 \u0434\u0435\u043d\u044c \u0440\u0430\u0441\u0442\u0435\u043d\u0438\u0435 \u0436\u0438\u0432\u0435\u0442, \u0440\u0430\u0441\u0442\u0435\u0442 \u0438 \u043f\u043e\u0433\u043b\u043e\u0449\u0430\u0435\u0442 \u043a\u0438\u0441\u043b\u043e\u0440\u043e\u0434. \u0422\u0440\u0430\u0434\u0435\u0441\u043a\u0430\u043d\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043b\u0430 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443: \u043f\u0440\u0438 \u0444\u043e\u0442\u043e\u0441\u0438\u043d\u0442\u0435\u0437\u0435 \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0438\u0441\u043b\u043e\u0440\u043e\u0434, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0432\u043b\u0430\u0436\u043d\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u0434\u0443\u0445\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u043e\u0441\u0443\u0434\u0430 \u0438 \u0432\u044b\u043f\u0430\u0434\u0430\u0435\u0442 \u0432\u043b\u0430\u0433\u0430, \u043e\u043f\u0430\u0432\u0448\u0438\u0435 \u043b\u0438\u0441\u0442\u044c\u044f \u043f\u0435\u0440\u0435\u0433\u043d\u0438\u0432\u0430\u044e\u0442, \u0432\u044b\u0434\u0435\u043b\u044f\u044f CO<sub>2<\/sub>. \u041d\u043e \u0434\u043b\u044f \u0444\u043e\u0442\u043e\u0441\u0438\u043d\u0442\u0435\u0437\u0430 \u043d\u0443\u0436\u0435\u043d \u0435\u0449\u0435 \u0438 \u0441\u0432\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0442\u044b\u043b\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u043e\u0434\u043e\u0434\u0432\u0438\u0433\u0430\u0442\u044c \u043a \u043e\u043a\u043d\u0443 \u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043b\u0438\u0441\u0442\u044c\u044f \u0440\u043e\u0441\u043b\u0438 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e. \u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u043d\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0442\u0435\u043d\u0438\u044f, \u0438 \u0432\u043e\u0442, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h5>\u042d\u0442\u0430\u043f \u041f\u0435\u0440\u0432\u044b\u0439<\/h5>\n<p>  \u041a\u0430\u043a \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u043e\u0441\u044c, \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0444\u043e\u0442\u043e\u0441\u0438\u043d\u0442\u0435\u0437\u0430 \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435 \u044d\u0442\u043e \u0441\u0432\u0435\u0442. \u041d\u043e \u043d\u0435 \u043b\u044e\u0431\u043e\u0439! <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/a8f\/6c5\/412\/a8f6c54126c586111bc2ee38e38338bb.jpg\" alt=\"image\"\/> <\/p>\n<p>  \u0414\u043b\u044f \u0440\u0430\u0441\u0442\u0435\u043d\u0438\u0439 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0438\u043d\u0435-\u0437\u0435\u043b\u0435\u043d\u044b\u0439 \u0438 \u0436\u0435\u043b\u0442\u043e-\u043a\u0440\u0430\u0441\u043d\u044b\u0439. \u0414\u043b\u0438\u043d\u044b \u0432\u043e\u043b\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442 400 \u0434\u043e 450 \u043c\u043a\u043c \u0438 \u043e\u0442 600 \u0434\u043e 650 \u043c\u043a\u043c. \u042f \u043f\u043e\u0448\u0435\u043b \u0432 \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u0438 \u043a\u0443\u043f\u0438\u043b 4 \u043a\u0440\u0430\u0441\u043d\u044b\u0445, 2 \u0441\u0438\u043d\u0438\u0445 \u0438 2 \u0437\u0435\u043b\u0435\u043d\u044b\u0445 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 (\u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0432 <a href=\"http:\/\/radiokot.ru\/circuit\/digital\/home\/150\/\"> \u0441\u0442\u0430\u0442\u044c\u044e<\/a> \u043d\u0430 \u0440\u0430\u0434\u0438\u043e\u043a\u043e\u0442\u0435). \u0414\u0430\u043b\u0435\u0435, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0438\u043b \u0438\u0445 \u043f\u043e\u0434 \u043a\u0440\u044b\u0448\u043a\u043e\u0439 \u0431\u0430\u043d\u043a\u0438, \u0437\u0430\u043a\u0440\u0435\u043f\u0438\u0432 \u043d\u0430 \u043a\u0430\u0440\u0442\u043e\u043d\u043a\u0435, \u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u043b \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e (\u043d\u0430 2 \u043a\u0440\u0430\u0441\u043d\u044b\u0445 1 \u0441\u0438\u043d\u0438\u0439 \u0438 1 \u0437\u0435\u043b\u0435\u043d\u044b\u0439).<br \/>  \u0422. \u043a. \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u0446\u0432\u0435\u0442\u043e\u0432 \u0441\u0432\u0435\u0447\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u044e\u0442 \u0440\u0430\u0437\u043d\u043e\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u0438\u0442\u0430\u043d\u0438\u044f, \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u044b. <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/fbb\/4b6\/375\/fbb4b63754f995035d1af3b79a09dffa.jpg\" alt=\"image\"\/>\u0412 \u043a\u0440\u044b\u0448\u043a\u0435 \u0441\u0434\u0435\u043b\u0430\u043b \u043e\u0442\u0432\u0435\u0440\u0441\u0442\u0438\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u043e\u0434\u043e\u0432 \u0438 \u0443\u043a\u0440\u0435\u043f\u0438\u043b \u043a\u0430\u0440\u0442\u043e\u043d\u043a\u0443 \u0441\u043e \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438 \u043f\u043e\u0434 \u043a\u0440\u044b\u0448\u043a\u043e\u0439, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0443\u043d\u0443\u0432 \u043f\u0440\u043e\u0432\u043e\u0434\u0430 \u0432 \u0434\u044b\u0440\u043a\u0443. \u0414\u043b\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u043e\u0442 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043c\u0438\u0440\u0430 \u0434\u044b\u0440\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043a\u043b\u0435\u0438\u0442\u044c. <\/p>\n<h5>\u042d\u0442\u0430\u043f \u0412\u0442\u043e\u0440\u043e\u0439<\/h5>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435, \u0442. \u0435. \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443, \u044f \u0443\u0436\u0435 \u0441\u0434\u0435\u043b\u0430\u043b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0445\u043e\u0436\u0443 \u043a \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f\u043c.<br \/>  <b>1.<\/b> \u0427\u0442\u043e\u0431\u044b \u0441\u0432\u0435\u0442 \u0433\u043e\u0440\u0435\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0441\u0442\u0435\u043d\u0438\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0442\u0435\u043d\u0438, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u043e\u0442\u043e\u044d\u043b\u0435\u043c\u0435\u043d\u0442. <br \/>  \u0421\u0445\u0435\u043c\u0430 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f: <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/6d4\/c4b\/e5e\/6d4c4be5ec09f8013054cd2c54ab78a0.png\"\/><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u043e\u0440\u0448\u043e\u043a \u0441\u043e\u0432\u0441\u0435\u043c \u0443\u043c\u043d\u044b\u043c, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043a \u043d\u0435\u043c\u0443 Arduino. Analog InPut \u043d\u0430 \u0441\u0445\u0435\u043c\u0435 \u2014 \u043b\u044e\u0431\u043e\u0439 \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u044b\u0439 \u0432\u0445\u043e\u0434 \u0443 Arduino. \u041d\u0430 \u0428\u0418\u041c (\u0438\u043b\u0438 PWM) \u0432\u044b\u0445\u043e\u0434 \u043f\u043e\u0432\u0435\u0441\u0438\u043c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b, \u044f\u0440\u043a\u043e\u0441\u0442\u044c \u0441\u0432\u0435\u0447\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0444\u043e\u0442\u043e\u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u0430. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u044f\u0441\u043d\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f.   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\"> int sensor =0; \/\/ \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u043a \u0430\u043d\u0430\u043b\u043e\u0433\u043e\u0432\u043e\u043c\u0443 \u0432\u0445\u043e\u0434\u0443 Arduino A0   void setup() {        Serial.begin(9600);      }   void loop() {     Serial.println(analogRead(sensor));    delay(1000); \/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u0440\u0430\u0437 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443  } <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<p>  \u0412 \u0441\u0432\u043e\u0435\u0439 \u0441\u0445\u0435\u043c\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0444\u043e\u0442\u043e\u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440 \u0438\u0437 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u0417\u041d\u0410\u0422\u041e\u041a\u0430. \u0423 \u043d\u0435\u0433\u043e \u0442\u0435\u043d\u0435\u0432\u043e\u0435 \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 120 \u043a\u041e\u043c. \u0420\u0430\u0441\u0447\u0435\u0442 \u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u0430 R1 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435: R<code>1<\/code>=V<code>in<\/code>*R<code>2<\/code>:V<code>out<\/code>-R<code>2<\/code> (\u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u043f\u043e\u043c\u043d\u044f\u0442 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439: \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u2014 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0430 \u043f\u043e\u0442\u043e\u043c \u0432\u0442\u043e\u0440\u043e\u0439 \u2014 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435). \u0422\u0430\u043a\u0436\u0435, \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043c\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u043e\u043f\u0440\u043e\u0442\u0438\u0432\u043b\u0435\u043d\u0438\u0435 \u0443 \u0444\u043e\u0442\u043e\u0440\u0435\u0437\u0438\u0441\u0442\u043e\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f <u>\u043d\u0435\u043b\u0438\u043d\u0435\u0439\u043d\u043e<\/u>.<br \/>  \u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u043c\u043e\u0435\u0433\u043e \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044f \u2014 \u043e\u043a\u043e\u043b\u043e 100 (\u043d\u0430\u0437\u043e\u0432\u0451\u043c \u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u043c\u0438 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u043c\u0438), \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u2014 \u043e\u043a\u043e\u043b\u043e 755 \u0443.\u0435.<br \/>  \u0417\u043d\u0430\u044f \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0434\u043b\u044f Arduino \u2014 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.   <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\"> int sensor = 0; \/\/ \u041f\u043e\u0442\u0435\u043d\u0446\u0438\u043e\u043c\u0435\u0442\u0440 \u043a \u04100  int ledPin = 9; \/\/\u0421\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b \u043a \u0432\u044b\u0445\u043e\u0434\u0443 9  void setup ()  {    analogReference(DEFAULT);    pinMode(ledPin, OUTPUT);    \/\/Serial.begin(9600); \u0420\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439     \/\/\u043e\u0441\u0432\u0435\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0443.\u0435. \u0432 \u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0435 \u041f\u043e\u0440\u0442\u0430.  }   void loop()  {     int val = analogRead(sensor);       val = constrain(val, 130, 755); \/\/\u0412\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438.                                    \/\/\u0415\u0441\u043b\u0438 &lt; 130, \u0442\u043e \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0432 130, \u0435\u0441\u043b\u0438 &gt; 755, \u0442\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0432 755.    int ledLevel = map(val, 130, 755, 0, 255);  \/\/\u041f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u0443.\u0435.     \/\/\u0432 8-\u0431\u0438\u0442\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0428\u0418\u041c.       analogWrite(ledPin, ledLevel);       \/\/ Serial.println(analogRead(ledLevel));  \u0420\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0439     \/\/\u043e\u0441\u0432\u0435\u0449\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u0443.\u0435. \u0432 \u041c\u043e\u043d\u0438\u0442\u043e\u0440\u0435 \u041f\u043e\u0440\u0442\u0430.  }    <\/code><\/pre>\n<\/p><\/div>\n<\/div>\n<p>  \u0422\u0430\u043a\u0436\u0435, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a \u0447\u0435\u0440\u0435\u0437 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0435 \u0412\u0445\u043e\u0434\u044b\/\u0412\u044b\u0445\u043e\u0434\u044b \u0410\u0440\u0434\u0443\u0438\u043d\u044b \u043d\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c <b>40\u043c\u0410<\/b>.<\/p>\n<p>  <b>2.<\/b> \u041a\u0430\u043a\u0438\u043c \u0431\u044b Arduino \u043d\u0435 \u0431\u044b\u043b\u043e \u0443\u043c\u043d\u044b\u043c, \u0435\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0437\u0434\u0435\u0441\u044c \u0438\u0437\u043b\u0438\u0448\u043d\u0438. \u0414\u043e\u0431\u0430\u0432\u0438\u0432 \u043a \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044e \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0442\u0440\u043e\u043d \u0438 \u0442\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432\u0441\u0435 \u0442\u043e\u0436\u0435, \u0447\u0442\u043e \u0438 \u0441 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u043c, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043c\u0435\u043d\u044c\u0448\u0435\u043c \u043e\u0431\u044a\u0435\u043c\u0435. \u0421\u0445\u0435\u043c\u0430: <br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/94d\/322\/468\/94d32246817e94d6cf6025f460baa3a3.png\"\/> <br \/>  \u0421\u0442\u0430\u0431\u0438\u043b\u0438\u0442\u0440\u043e\u043d D1 \u2014 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u0448\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 <abbr title=\"3v6\">3.6 \u0412<\/abbr>. \u0422\u0440\u0430\u043d\u0437\u0438\u0441\u0442\u043e\u0440 T1 \u2014 \u043b\u044e\u0431\u043e\u0439 NPN.<\/p>\n<p>  <b>P.S.<\/b> \u0421\u043c\u043e\u0442\u0440\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435, \u0435\u0441\u043b\u0438 \u0431\u044b \u043f\u0440\u043e\u0432\u043e\u0434\u0430 \u043d\u0435 \u0442\u043e\u0440\u0447\u0430\u043b\u0438. \u0421\u0430\u043c\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u043d\u0435\u0435, \u0435\u0441\u043b\u0438 \u043d\u0430 \u0434\u043d\u043e \u0431\u0430\u043d\u043a\u0438 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u043a\u0430\u0442\u0443\u0448\u043a\u0443 \u0438 \u043f\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0443 \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u043e\u0434\u043e\u0432 (\u043f\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0443 <a href=\"http:\/\/habrahabr.ru\/search\/?q=%D0%B1%D0%B5%D1%81%D0%BF%D1%80%D0%BE%D0%B2%D0%BE%D0%B4%D0%BD%D0%B0%D1%8F+%D0%B7%D0%B0%D1%80%D1%8F%D0%B4%D0%BA%D0%B0\">\u0431\u0435\u0441\u043f\u0440\u043e\u0432\u043e\u0434\u043d\u043e\u0439 \u0437\u0430\u0440\u044f\u0434\u043a\u0438 \u0443 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432<\/a>).<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/1eb\/cd0\/4d7\/1ebcd04d7525d3610a599b709e9dfd28.jpg\"\/><\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage3\/a47\/d41\/ef3\/a47d41ef30796ce3686cd52cac5d7c34.jpg\"\/><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432<\/b><\/p>\n<div class=\"spoiler_text\">\n<ol>\n<li> <a href=\"http:\/\/www.youtube.com\/playlist?list=PLfDmj22jP9S759DT250VVzfZs_4VnJqLa\">\u0412\u0438\u0434\u0435\u043e \u0443\u0440\u043e\u043a\u0438<\/a> \u043f\u043e Arduino \u043e\u0442 \u0414\u0436\u0435\u0440\u0435\u043c\u0438 \u0411\u043b\u0443\u043c\u0430 (Jeremy Blum) \u0432 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u0410\u043c\u043f\u0435\u0440\u043a\u0438 (amperka.ru). <\/li>\n<li> <a href=\"http:\/\/radiokot.ru\/circuit\/digital\/home\/150\/\"> \u0424\u0438\u0442\u043e\u043b\u0430\u043c\u043f\u0430<\/a><\/li>\n<\/ol>\n<p>  <\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/192168\/\"> http:\/\/habrahabr.ru\/post\/192168\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439, \u0425\u0430\u0431\u0440! <\/p>\n<p>  \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043d\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0441\u0430\u0434\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430, \u043e\u0431 \u0430\u043d\u0433\u043b\u0438\u0447\u0430\u043d\u0438\u043d\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 53 \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434 \u043f\u043e\u0441\u0430\u0434\u0438\u043b \u0432 \u0431\u0430\u043d\u043a\u0443 <a href=\"http:\/\/ru.wikipedia.org\/wiki\/\u0422\u0440\u0430\u0434\u0435\u0441\u043a\u0430\u043d\u0446\u0438\u044f\"> \u0442\u0440\u0430\u0434\u0435\u0441\u043a\u0430\u043d\u0446\u0438\u044e<\/a>.\u041e\u043d \u0437\u0430\u043a\u0443\u043f\u043e\u0440\u0438\u043b \u0431\u0443\u0442\u044b\u043b\u043a\u0443 \u0438, \u043f\u043e\u0441\u043b\u0435 \u043f\u043e\u043b\u0438\u0432\u0430 40 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434, \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u043b \u0435\u0451. \u0418\u0434\u0435\u0438 \u043f\u0440\u0438\u0448\u043b\u0430 \u0435\u043c\u0443 \u0438\u0437 \u043b\u044e\u0431\u043e\u043f\u044b\u0442\u0441\u0442\u0432\u0430. \u0418 \u043f\u043e \u0441\u0435\u0439 \u0434\u0435\u043d\u044c \u0440\u0430\u0441\u0442\u0435\u043d\u0438\u0435 \u0436\u0438\u0432\u0435\u0442, \u0440\u0430\u0441\u0442\u0435\u0442 \u0438 \u043f\u043e\u0433\u043b\u043e\u0449\u0430\u0435\u0442 \u043a\u0438\u0441\u043b\u043e\u0440\u043e\u0434. \u0422\u0440\u0430\u0434\u0435\u0441\u043a\u0430\u043d\u0446\u0438\u044f \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043b\u0430 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443: \u043f\u0440\u0438 \u0444\u043e\u0442\u043e\u0441\u0438\u043d\u0442\u0435\u0437\u0435 \u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0438\u0441\u043b\u043e\u0440\u043e\u0434, \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0443\u0432\u043b\u0430\u0436\u043d\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u0434\u0443\u0445\u0430 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u043e\u0441\u0443\u0434\u0430 \u0438 \u0432\u044b\u043f\u0430\u0434\u0430\u0435\u0442 \u0432\u043b\u0430\u0433\u0430, \u043e\u043f\u0430\u0432\u0448\u0438\u0435 \u043b\u0438\u0441\u0442\u044c\u044f \u043f\u0435\u0440\u0435\u0433\u043d\u0438\u0432\u0430\u044e\u0442, \u0432\u044b\u0434\u0435\u043b\u044f\u044f CO<sub>2<\/sub>. \u041d\u043e \u0434\u043b\u044f \u0444\u043e\u0442\u043e\u0441\u0438\u043d\u0442\u0435\u0437\u0430 \u043d\u0443\u0436\u0435\u043d \u0435\u0449\u0435 \u0438 \u0441\u0432\u0435\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0442\u044b\u043b\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043f\u043e\u0434\u043e\u0434\u0432\u0438\u0433\u0430\u0442\u044c \u043a \u043e\u043a\u043d\u0443 \u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043b\u0438\u0441\u0442\u044c\u044f \u0440\u043e\u0441\u043b\u0438 \u0440\u0430\u0432\u043d\u043e\u043c\u0435\u0440\u043d\u043e. \u042f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u0438\u043a\u0438 \u0434\u043b\u044f \u043a\u043e\u043c\u043d\u0430\u0442\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0442\u0435\u043d\u0438\u044f, \u0438 \u0432\u043e\u0442, \u0447\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c.  <\/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-192168","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/192168","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=192168"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/192168\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=192168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=192168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=192168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}