{"id":53715,"date":"2018-11-29T22:16:34","date_gmt":"2018-11-29T16:16:34","guid":{"rendered":"http:\/\/rcl-radio.ru\/?p=53715"},"modified":"2022-01-11T17:27:36","modified_gmt":"2022-01-11T11:27:36","slug":"%d0%b7%d0%b0%d0%bf%d0%b8%d1%81%d1%8c-string-%d0%b2-%d1%8d%d0%bd%d0%b5%d1%80%d0%b3%d0%be%d0%bd%d0%b5%d0%b7%d0%b0%d0%b2%d0%b8%d1%81%d0%b8%d0%bc%d1%83%d1%8e-%d0%bf%d0%b0%d0%bc%d1%8f%d1%82%d1%8c-eeprom","status":"publish","type":"post","link":"http:\/\/rcl-radio.ru\/?p=53715","title":{"rendered":"\u0417\u0430\u043f\u0438\u0441\u044c String \u0432 \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c EEPROM"},"content":{"rendered":"<p><strong>EEPROM.put()\u00a0<\/strong>\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432 \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c EEPROM, \u0438\u043d\u0430\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 1 \u0431\u0430\u0439\u0442, \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<strong>EEPROM.put()<\/strong>.<\/p>\n<p>\u041f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 EEPROM \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 1 \u0431\u0430\u0439\u0442, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0441\u0447\u0435\u0442 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c, \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00a0<strong>sizeof()<\/strong>. \u0414\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00a0<strong>EEPROM.get()<\/strong>, \u0434\u043b\u044f \u043d\u0435\u0435 \u0442\u0430\u043a \u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439\u00a0<strong>sizeof()<\/strong>\u00a0 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u043e\u0447\u043d\u044b\u0445 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043f\u0440\u0438 \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>\u0414\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 <strong>String<\/strong> \u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 <strong>char<\/strong>, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0437\u0430\u043f\u0438\u0441\u044c.<\/p>\n<div id=\"marketWidget\"><\/div>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre class=\"actionscript\" style=\"font-family: monospace; font-size: 11px;\"><span style=\"color: #808080; font-style: italic;\">#include &lt;EEPROM.h&gt;<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">String<\/span> str = <span style=\"color: #ff0000;\">\"Arduino IDE\"<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ 11 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 + 1<\/span>\r\n<span style=\"color: #0066cc;\">String<\/span> str1 = <span style=\"color: #ff0000;\">\"Arduino UNO\"<\/span>;<span style=\"color: #808080; font-style: italic;\">\/\/ 11 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 + 1<\/span>\r\nchar ch<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">12<\/span><span style=\"color: #66cc66;\">]<\/span>,ch1<span style=\"color: #66cc66;\">[<\/span><span style=\"color: #cc66cc;\">12<\/span><span style=\"color: #66cc66;\">]<\/span>;\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> setup<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">begin<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">9600<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  str.<span style=\"color: #006600;\">toCharArray<\/span><span style=\"color: #66cc66;\">(<\/span>ch, <span style=\"color: #cc66cc;\">20<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441har array<\/span>\r\n  str1.<span style=\"color: #006600;\">toCharArray<\/span><span style=\"color: #66cc66;\">(<\/span>ch1, <span style=\"color: #cc66cc;\">20<\/span><span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441har array<\/span>\r\n  EEPROM.<span style=\"color: #006600;\">put<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>, ch<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0437\u0430\u043f\u0438\u0441\u044c \u0432 EEPROM<\/span>\r\n  EEPROM.<span style=\"color: #006600;\">put<\/span><span style=\"color: #66cc66;\">(<\/span>sizeof<span style=\"color: #66cc66;\">(<\/span>ch<span style=\"color: #66cc66;\">)<\/span>, ch1<span style=\"color: #66cc66;\">)<\/span>; <span style=\"color: #808080; font-style: italic;\">\/\/ \u0437\u0430\u043f\u0438\u0441\u044c \u0432 EEPROM<\/span>\r\n<span style=\"color: #66cc66;\">}<\/span>\r\n\u00a0\r\n<span style=\"color: #0066cc;\">void<\/span> loop<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #66cc66;\">)<\/span> <span style=\"color: #66cc66;\">{<\/span>\r\n  Serial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span>EEPROM.<span style=\"color: #0066cc;\">get<\/span><span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">0<\/span>, ch<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  Serial.<span style=\"color: #006600;\">println<\/span><span style=\"color: #66cc66;\">(<\/span>EEPROM.<span style=\"color: #0066cc;\">get<\/span><span style=\"color: #66cc66;\">(<\/span>sizeof<span style=\"color: #66cc66;\">(<\/span>ch<span style=\"color: #66cc66;\">)<\/span>, ch1<span style=\"color: #66cc66;\">)<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n  delay<span style=\"color: #66cc66;\">(<\/span><span style=\"color: #cc66cc;\">10000<\/span><span style=\"color: #66cc66;\">)<\/span>;\r\n<span style=\"color: #66cc66;\">}<\/span><\/pre>\n<p><a href=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/11\/643268912.png\" class=\"highslide-image\" onclick=\"return hs.expand(this);\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-53716\" src=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/11\/643268912.png\" alt=\"\" width=\"253\" height=\"213\" srcset=\"http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/11\/643268912.png 253w, http:\/\/rcl-radio.ru\/wp-content\/uploads\/2018\/11\/643268912-200x168.png 200w\" sizes=\"auto, (max-width: 253px) 100vw, 253px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>EEPROM.put()\u00a0\u00a0\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0438\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432 \u044d\u043d\u0435\u0440\u0433\u043e\u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u0443\u044e \u043f\u0430\u043c\u044f\u0442\u044c EEPROM, \u0438\u043d\u0430\u0447\u0435 \u0433\u043e\u0432\u043e\u0440\u044f \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 1 \u0431\u0430\u0439\u0442, \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0EEPROM.put(). \u041f\u0440\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 EEPROM \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 1 \u0431\u0430\u0439\u0442, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0441\u0447\u0435\u0442 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0438\u0441\u044c, \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00a0sizeof(). \u0414\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00a0EEPROM.get(), \u0434\u043b\u044f \u043d\u0435\u0435 \u0442\u0430\u043a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":53716,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[239],"tags":[],"class_list":["post-53715","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino"],"views":6854,"_links":{"self":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/53715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=53715"}],"version-history":[{"count":2,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/53715\/revisions"}],"predecessor-version":[{"id":111466,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/posts\/53715\/revisions\/111466"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=\/wp\/v2\/media\/53716"}],"wp:attachment":[{"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=53715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=53715"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/rcl-radio.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=53715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}