{"id":258602,"date":"2015-06-03T20:33:02","date_gmt":"2015-06-03T16:33:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=258602"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=258602","title":{"rendered":"\u041a\u043e\u043c\u043f\u0430\u0441 \u0441 \u0428\u0418\u041c \u043d\u0430 \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0435 stm32f3discovery"},"content":{"rendered":"<p>             \u0418\u0434\u0435\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0430\u0441\u0430 \u043d\u0430 stm32 \u0441 \u0428\u0418\u041c (\u0448\u0438\u0440\u043e\u043a\u043e\u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043d\u0430\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u0446\u0438\u044f) \u2014 \u0442\u0430\u043a\u0430\u044f \u0444\u0438\u0447\u0430, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c\u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0442\u0438 \u043e\u0442 \u0443\u0433\u043b\u0430 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043a\u043e\u043c\u043f\u0430\u0441\u0430. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043a\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0430\u0441 (\u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043d\u0430 \u0441\u0435\u0432\u0435\u0440).<\/p>\n<p>  \u0412\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u0432 CooCox \u2014 \u0441\u0440\u0435\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442 Eclipse (\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u043b\u044e\u0447\u043d\u0430\u044f). \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c STM32Cub MX \u2014 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0430, \u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f (\u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432 \u0442\u0430\u043a \u0438 \u043d\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0441\u044f). <\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0430\u043a\u0438\u043c \u043f\u043b\u044e\u0448\u043a\u0430\u043c\u0438, \u043a\u0430\u043a \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u043e\u043c\u0435\u0442\u0440, \u043c\u0430\u0433\u043d\u0438\u0442\u043e\u043c\u0435\u0442\u0440 (\u0434\u0430 \u0432\u0441\u0451 \u044d\u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u043c \u0447\u0438\u043f\u0435 \u043d\u0430 stm-\u043a\u0435) \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a (\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b \u0440\u0443\u0447\u043a\u0430\u043c\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430).<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0421\u0435\u043a\u0446\u0438\u044f include:<br \/>  #include \u00abstm32f30x.h\u00bb \u2014 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u0438\u043a\u0440\u043e\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c;<br \/>  #include\u00abstm32f30x_gpio.h\u00bb \u2014 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u0435\u0440\u0435\u0444\u0435\u0440\u0438\u0435\u0439 (\u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0438\u043a\u0438);<br \/>  #include\u00abstm32f30x_i2c.h\u00bb \u2014 \u0434\u043b\u044f \u043e\u0431\u043c\u0435\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043c\u0435\u0436\u0434\u0443 \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u043e\u043c\u0435\u0442\u0440\u043e\u043c-\u043c\u0430\u0433\u043d\u0435\u0442\u0440\u043e\u043c\u0435\u0442\u0440\u043e\u043c \u0438 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u043e\u0439;<br \/>  #include\u00abstm32f30x_rcc.h\u00bb \u2014 \u0434\u043b\u044f \u043f\u043e\u0434\u0430\u0447\u0438 \u043f\u0438\u0442\u0430\u043d\u0438\u044f \u043d\u0430 \u043f\u0435\u0440\u0435\u0444\u0435\u0440\u0438\u044e;<br \/>  #include\u00abstm32f3_discovery_lsm303dlhc.h\u00bb \u2014 \u043f\u043b\u044e\u0448\u043a\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u043e\u043c\u0435\u0442\u0440\u043e\u043c-\u043c\u0430\u0433\u043d\u0435\u0442\u0440\u043e\u043c\u0435\u0442\u0440\u043e\u043c;<br \/>  #include \u00abstm32f30x_exti.h\u00bb \u2014 \u043d\u0430\u0434\u043e;<br \/>  #include \u00abstm32f30x_syscfg.h\u00bb \u2014 \u0442\u043e\u0436\u0435 \u043d\u0430\u0434\u043e;<br \/>  #include &lt;stdio.h&gt; \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 C;<br \/>  #include \u00abmath.h\u00bb \u2014 \u0434\u043b\u044f \u043c\u0430\u0442. \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (\u0430\u043b\u044f sin, cos);<br \/>  #include \u00abstm32f3_discovery.h\u00bb \u2014 \u0434\u043b\u044f \u043e\u0431\u043b\u0435\u0433\u0447\u0435\u043d\u0438\u044f \u0440\u043e\u0431\u043e\u0442\u044b \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432\u0443 \u0441 \u043f\u043b\u0430\u0442\u043e\u0439;<br \/>  #include \u00abstm32f30x_tim.h\u00bb \u2014 \u0442\u0430\u0439\u043c\u0435\u0440\u044b.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043d\u0435\u0439 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0440\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u0432\u0441\u0451 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 CooCox \u2014 \u0438 \u0442\u0443\u0442-\u0442\u043e \u043d\u0430\u0447\u0430\u043b\u0438\u0441\u044c \u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>  \u0421\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 \u0430\u043b\u044f stm32f30x_gpio.h, stm32f30x_tim.h \u0432\u0441\u0451 \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0437\u0430\u0438\u0447\u043d\u043e, \u043d\u043e \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 (stm32f3_discovery_lsm303dlh\u0441 \u0438 stm32f3_discovery) \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0430\u044f \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044c. \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u0432 \u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043f\u0443\u0442\u0438 \u0438 \u043a\u0438\u0434\u0430\u0442\u044c \u0438\u0445 \u0432 \u043d\u0443\u0436\u043d\u044b\u0435 \u043f\u0430\u043f\u043a\u0438, \u0430 \u0442\u0430\u043c \u0438\u0445 \u043c\u043d\u043e\u0433\u043e \u0438 \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043a\u0430\u043a\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u0412 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 Project \u043d\u0443\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0445 \u043a\u0438\u043d\u0443\u0442\u044c \u0432 cmis_lib\/include (\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u0447\u043d\u044b\u0435). \u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0443\u0442\u044c: cmis_lib\/source (\u0441 \u2014 \u0444\u0430\u0439\u043b\u044b). \u041d\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442 \u0440\u0443\u0433\u0430\u0442\u044c\u0441\u044f. \u0427\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0443\u0437\u043f\u0430\u043a\u043e\u0438\u043b\u0441\u044f, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0434\u0432\u0443\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u0445, header \u0444\u0430\u0439\u043b\u0430\u0445:<\/p>\n<p>  #include \u00abstm32f30x.h\u00bb<br \/>  #include \u00abstm32f30x_exti.h\u00bb<br \/>  #include \u00abstm32f30x_syscfg.h\u00bb<br \/>  #include\u00abstm32f30x_gpio.h\u00bb<br \/>  #include\u00abstm32f30x_i2c.h\u00bb<br \/>  #include\u00abstm32f30x_rcc.h\u00bb<br \/>  #include\u00abstm32f30x_usart.h\u00bb<br \/>  #include\u00abstm32f30x_spi.h\u00bb<br \/>  #include\u00abstm32f30x_misc.h\u00bb <\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c\u2026<\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0434\u043d\u0435\u0439, \u043d\u043e\u0447\u0435\u0439, \u043d\u0435\u0434\u0435\u043b\u044c, \u0447\u0430\u0448\u0435\u043a \u043a\u043e\u0444\u0435 (\u0441\u043e \u0441\u043d\u0438\u043a\u0435\u0440\u0441\u0430\u043c) \u0431\u044b\u043b \u0440\u043e\u0436\u0434\u0451\u043d \u043a\u043e\u043c\u043f\u0430\u0441 (\u043c\u043e\u0436\u043d\u043e \u0438\u0434\u0442\u0438 \u0432 \u043f\u043e\u0445\u043e\u0434, \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0442\u0430\u0440\u0435\u0439\u043a\u0438 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c!), \u0441 \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0433\u043e\u0432\u043d\u043e\u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043d\u0438\u0436\u0435 \u0432 \u0432\u0438\u0434\u0443 \u0435\u0433\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430, \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 (\u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0437\u0430\u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0438\u0451 \u043a\u043e\u0434\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u043d\u0446\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435). \u041d\u0443, \u043c\u043e\u0436\u0435\u0442 \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043a\u043e\u0434\u0430 \u0434\u0430 \u0431\u0443\u0434\u0435\u0442.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u0430\u0441 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0432 \u043f\u043b\u0430\u0442\u0443 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u043e\u0439 LSM303DLHC. \u0417\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u0432\u0441\u0451 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0431\u0443\u0434\u0443\u0449\u0438\u043c \u043a\u043e\u043c\u043f\u0430\u0441\u043e\u043c: \u043c\u0430\u0433\u043d\u0435\u0442\u0440\u043e\u043c\u0435\u0442\u0440 (\u0434\u043b\u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043c\u0430\u0433\u043d\u0438\u0442\u043d\u043e\u043c \u043f\u043e\u043b\u0435) \u0438 \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u043e\u043c\u0435\u0442\u0440 (\u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u043a\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0439 \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u043d\u0430\u043a\u043b\u043e\u043d\u043e\u043c \u043f\u043b\u0430\u0442\u044b). <\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0430\u0437\u0438\u043c\u0443\u0442 \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043c\u0430\u0433\u043d\u0438\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0437\u0435\u043c\u043b\u0438 \u0438 \u043e\u0441\u044c\u044e \u0425 \u043c\u0430\u0433\u043d\u0438\u0442\u043e\u043c\u0435\u0442\u0440\u0430. \u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0430\u0437\u0438\u043c\u0443\u0442\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0435 \u043c\u0430\u0433\u043d\u0438\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432\u0434\u043e\u043b\u044c \u043e\u0441\u0435\u0439 X \u0438 Y \u043c\u0430\u0433\u043d\u0438\u0442\u043e\u043c\u0435\u0442\u0440\u0430. \u042d\u0442\u043e \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u043c\u0430\u0433\u043d\u0438\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0437\u0435\u043c\u043b\u0438 \u043d\u0430 \u043e\u0441\u0438 X \u0438 Y. \u0422\u043e\u0433\u0434\u0430 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0443\u0433\u043b\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u0443\u0440\u043e\u043a\u0438 \u0433\u0435\u043e\u043c\u0435\u0442\u0440\u0438\u0438 \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443: arctg(Y\/X), \u0433\u0434\u0435 Y \u0438 X \u2013 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u043f\u0440\u043e\u0435\u043a\u0446\u0438\u0439 \u043d\u0430 \u043e\u0441\u0438 Y \u0438 X \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. <\/p>\n<p>  \u0414\u0430\u043d\u043d\u044b\u0435 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u0434\u043b\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0440\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438. \u041a\u043e\u0433\u0434\u0430 \u043d\u0435\u0442 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0439 \u043f\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u0443\u0433\u043b\u0430\u043c. \u041d\u043e \u0440\u0443\u043a\u0430 \u0447\u0435\u043b\u043e\u0432\u043a\u0430 \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u0442\u0440\u044f\u0441\u0442\u0438\u0441\u044c \u0438 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u0440\u043e\u0432\u043d\u043e\u0439 \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e. \u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0431\u044b\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u043e\u043c\u0435\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0435\u0434\u0451\u0442 \u0443\u0447\u0451\u0442 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043a\u043b\u043e\u043d\u0430.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0435 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0438 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u043e\u0441\u0435\u0439. \u041e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0443\u0433\u043b\u044b \u043a\u0440\u0435\u043d\u0430 \u0438 \u0442\u0430\u043d\u0433\u0430\u0436\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430 \u0441\u0435\u0432\u0435\u0440 (\u0447\u0438\u0442\u0430\u0439 \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044e). \u0412\u044b\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u043c\u0430\u0433\u043d\u0435\u0442\u043e\u043c\u0435\u0442\u0440\u0430 \u0438 \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u043e\u043c\u0435\u0442\u0440\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0443\u0442\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u044b \u043d\u0438\u0436\u0435:<\/p>\n<p>  <b>\u041b\u0438\u0441\u0442\u0438\u043d\u0433 1. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u043e\u043c\u0435\u0442\u0440\u0430<\/b>  <\/p>\n<pre><code>void Demo_CompassReadAss(float *pfData) {   int16_t pnRawData[3];   uint8_t ctrlx[2];   uint8_t buffer[6], cDivider;   uint8_t i = 0;   float LSM_Acc_Sensitivity = LSM_Acc_Sensitivity_2g;     LSM303DLHC_Read(ACC_I2C_ADDRESS, LSM303DLHC_CTRL_REG4_A, ctrlx,2);\/\/\u0447\u0442\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u043e\u043c\u0435\u0442\u0440\u0430   LSM303DLHC_Read(ACC_I2C_ADDRESS, LSM303DLHC_OUT_X_L_A, buffer, 6);    if(ctrlx[1]&0x40)     cDivider=64;   else     cDivider=16;     if(!(ctrlx[0] & 0x40) || (ctrlx[1] & 0x40))   {     for(i=0; i&lt;3; i++)     {       pnRawData[i]=((int16_t)((uint16_t)buffer[2*i+1] &lt;&lt; 8) + buffer[2*i])\/cDivider;\/\/\u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 (\u043d\u0443\u0436\u043d\u043e \u0436\u0435 \u043e\u0442\u043a\u0443\u0434\u0430-\u0442\u043e \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c)     }   }   else   {     for(i=0; i&lt;3; i++)       pnRawData[i]=((int16_t)((uint16_t)buffer[2*i] &lt;&lt; 8) + buffer[2*i+1])\/cDivider;   }    LSM303DLHC_Read(ACC_I2C_ADDRESS, LSM303DLHC_CTRL_REG4_A, ctrlx,2);     if(ctrlx[1]&0x40)   {      LSM_Acc_Sensitivity = 0.25;   }   else   {       switch(ctrlx[0] & 0x30)\/\/\u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0443\u0440\u043e\u0432\u0435\u043d\u044c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b     {     case LSM303DLHC_FULLSCALE_2G:       LSM_Acc_Sensitivity = LSM_Acc_Sensitivity_2g;       break;     case LSM303DLHC_FULLSCALE_4G:       LSM_Acc_Sensitivity = LSM_Acc_Sensitivity_4g;       break;     case LSM303DLHC_FULLSCALE_8G:       LSM_Acc_Sensitivity = LSM_Acc_Sensitivity_8g;       break;     case LSM303DLHC_FULLSCALE_16G:       LSM_Acc_Sensitivity = LSM_Acc_Sensitivity_16g;       break;     }   }     for(i=0; i&lt;3; i++)   {     pfData[i]=(float)pnRawData[i]\/LSM_Acc_Sensitivity;\/\/\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0437\u0430\u043d\u043e\u0441\u0438\u043c \u0432 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432    }  }&lt;source&gt; &lt;b&gt;\u041b\u0438\u0441\u0442\u0438\u043d\u0433 2. \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0433\u043d\u0438\u0442\u043e\u043c\u0435\u0442\u0440\u0430&lt;\/b&gt; &lt;source&gt;void Demo_CompassRegMag(float *pfData) {     static int16_t buffer[3]={0};     uint8_t *ptr=buffer;     uint8_t CTRLB=0;     uint16_t Magn_Sensitivity_XY=0, Magn_Sensitivity_Z=0;     uint8_t i=0;     float fpfData[3]={0.0f};      LSM303DLHC_Read(MAG_I2C_ADDRESS, LSM303DLHC_CRB_REG_M, &CTRLB, 1);\/\/\u043e\u043f\u044f\u0442\u044c \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435     LSM303DLHC_Read(MAG_I2C_ADDRESS, LSM303DLHC_OUT_X_H_M, ptr, 1);     LSM303DLHC_Read(MAG_I2C_ADDRESS, LSM303DLHC_OUT_X_L_M, ptr+1, 1);     LSM303DLHC_Read(MAG_I2C_ADDRESS, LSM303DLHC_OUT_Y_H_M, ptr+2, 1);     LSM303DLHC_Read(MAG_I2C_ADDRESS, LSM303DLHC_OUT_Y_L_M, ptr+3, 1);     LSM303DLHC_Read(MAG_I2C_ADDRESS, LSM303DLHC_OUT_Z_H_M, ptr+4, 1);     LSM303DLHC_Read(MAG_I2C_ADDRESS, LSM303DLHC_OUT_Z_L_M, ptr+5, 1);      switch(CTRLB & 0xE0)\/\/\u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u0438\u043a\u0440\u043e\u0441\u0445\u0435\u043c\u044b       {       case LSM303DLHC_FS_1_3_GA:         Magn_Sensitivity_XY = LSM303DLHC_M_SENSITIVITY_XY_1_3Ga;         Magn_Sensitivity_Z = LSM303DLHC_M_SENSITIVITY_Z_1_3Ga;         break;       case LSM303DLHC_FS_1_9_GA:         Magn_Sensitivity_XY = LSM303DLHC_M_SENSITIVITY_XY_1_9Ga;         Magn_Sensitivity_Z = LSM303DLHC_M_SENSITIVITY_Z_1_9Ga;         break;       case LSM303DLHC_FS_2_5_GA:         Magn_Sensitivity_XY = LSM303DLHC_M_SENSITIVITY_XY_2_5Ga;         Magn_Sensitivity_Z = LSM303DLHC_M_SENSITIVITY_Z_2_5Ga;         break;       case LSM303DLHC_FS_4_0_GA:         Magn_Sensitivity_XY = LSM303DLHC_M_SENSITIVITY_XY_4Ga;         Magn_Sensitivity_Z = LSM303DLHC_M_SENSITIVITY_Z_4Ga;         break;       case LSM303DLHC_FS_4_7_GA:         Magn_Sensitivity_XY = LSM303DLHC_M_SENSITIVITY_XY_4_7Ga;         Magn_Sensitivity_Z = LSM303DLHC_M_SENSITIVITY_Z_4_7Ga;         break;       case LSM303DLHC_FS_5_6_GA:         Magn_Sensitivity_XY = LSM303DLHC_M_SENSITIVITY_XY_5_6Ga;         Magn_Sensitivity_Z = LSM303DLHC_M_SENSITIVITY_Z_5_6Ga;         break;       case LSM303DLHC_FS_8_1_GA:         Magn_Sensitivity_XY = LSM303DLHC_M_SENSITIVITY_XY_8_1Ga;         Magn_Sensitivity_Z = LSM303DLHC_M_SENSITIVITY_Z_8_1Ga;         break;       }       fpfData[0]=(((float)buffer[0])\/1000)\/Magn_Sensitivity_XY;\/\/\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0443\u0447\u0451\u0442\u043e\u043c \u0447\u0443\u0432\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438       fpfData[1]=(((float)buffer[1])\/1000)\/Magn_Sensitivity_XY;       fpfData[2]=(((float)buffer[2])\/1000)\/Magn_Sensitivity_Z;       for(i=0;i&lt;3;i++)       {      \t pfData[i]=fpfData[i]*(-1); \/\/\u0417\u0430\u043d\u043e\u0441\u0438\u043c \u0432 \u0438\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0441\u0438\u0432. \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f &quot;\u043d\u0430 \u0441\u0435\u0432\u0435\u0440&quot; \u0443\u043c\u043d\u043e\u0436\u0430\u0435\u043c \u043d\u0430 -1        } }&lt;source&gt;  \u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0443\u0433\u043b\u043e\u0432 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0440\u0430\u0441\u0447\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u044f:   fNormAcc=sqrt((AccBuffer[0]*AccBuffer[0])+(AccBuffer[1]*AccBuffer[1])+(AccBuffer[2]*AccBuffer[2]));  \u0417\u0430\u0442\u0435\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0442\u0440\u0438\u0433\u043e\u043d\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043e\u0432 \u0438 \u0441\u0438\u043d\u0443\u0441\u043e\u0432 \u0443\u0433\u043b\u043e\u0432 (\u0437\u043d\u0430\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u0438\u043d \u043a\u0430\u0442\u0435\u0442\u043e\u0432 \u0438 \u0433\u0438\u043f\u043e\u0442\u0435\u043d\u0443\u0437\u044b), \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0443\u0433\u043b\u043e\u0432 \u043a\u0440\u0435\u043d\u0430 (Roll) \u0438 \u0442\u0430\u043d\u0433\u0430\u0436\u0430 (Pitch):  fSinRoll = -AccBuffer[1]\/ fNormAcc; fCosRoll = sqrt(1.0 - (fSinRoll *fSinRoll)); fSinPitch = AccBuffer[0]\/fNormAcc; fCosPitch = sqrt(1.0 -(fSinPitch * fSinPitch)); \u041f\u043e\u0442\u043e\u043c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u0438\u0445 \u0443\u0433\u043b\u043e\u0432 \u043a\u0440\u0435\u043d\u0430 \u0438 \u0442\u0430\u043d\u0433\u0430\u0436\u0430: RollAng = acos(fCosRoll) * 180\/PI; PitchAng = acos(fCosPitch) *180\/PI;  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u043d\u0430\u043a\u0430 \u0441\u0438\u043d\u0443\u0441\u0430 \u0438 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u0431\u0430\u0432\u0438\u0442\u044c 180 \u043b\u0438\u0431\u043e 360 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0443\u0433\u043e\u043b \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u043a\u0432\u0430\u0434\u0440\u0430\u043d\u0442\u0435.  \u0417\u043d\u0430\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 \u0443\u0433\u043b\u043e\u0432 \u043a\u0440\u0435\u043d\u0430 \u0438 \u0442\u0430\u043d\u0433\u0430\u0436\u0430, \u043c\u043e\u0436\u043d\u043e \u0432\u043d\u0435\u0441\u0442\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u043f\u0440\u0430\u0432\u043a\u0438 \u0432 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u0434\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0443\u0433\u043b\u0430 \u043c\u0435\u0436\u0434\u0443 \u043e\u0441\u044c\u044e \u0425 \u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u0441\u0435\u0432\u0435\u0440. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b \u043c\u0430\u0433\u043d\u0438\u0442\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044f \u0432\u0434\u043e\u043b\u044c \u043e\u0441\u0438 \u0425 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043f\u043e\u043f\u0440\u0430\u0432\u043e\u043a:  fTitledX=MagBuffer[0]*fCosPitch+MagBuffer[2]*fSinPitch; fTitledY=MagBuffer[0]*fSinRoll*fSinPitch+MagBuffer[1]*fCosRoll-MagBuffer[1]*fSinRoll*fCosPitch;  \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0443\u0433\u043b\u0430:  HeadingValue= 180.0f - (float)((atan2f((float)fTitledY,(float)fTitledX))*180)\/PI;\/\/\u0420\u0430\u0437 \u0431\u0435\u0436\u0438\u043c \u043d\u0430 \u044e\u0433, \u0437\u043d\u0430\u0447\u0438\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c \u043d\u0430 \u0441\u0435\u0432\u0435\u0440  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u0433\u043e-\u043d\u0438\u0447\u0435\u0433\u043e. \u041f\u0435\u0440\u0432\u044b\u0439 \u044d\u0442\u0430\u043f \u043f\u043e\u0437\u0430\u0434\u0438: \u0435\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043c\u0430\u0433\u043d\u0438\u0442\u043d\u043e\u043c \u043f\u043e\u043b\u0435 \u0432 3D \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043e\u0442\u043b\u0430\u0434\u043e\u0447\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 \u0441\u043d\u0430\u0431\u0436\u0435\u043d\u0430 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043d\u044b\u043c \u0442\u0430\u0431\u043b\u043e. \u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043d\u0438\u0436\u0435.  \u0417\u0430\u0439\u043c\u0451\u043c\u0441\u044f \u0428\u0418\u041c-\u043c\u043e\u0434\u0443\u043b\u044f\u0446\u0438\u0435\u0439.   \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0439\u043c\u0435\u0440\u044b. \u041d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c  \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 (\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0443\u044e\u0449\u0438\u0435 Pin-\u044b \u0438 Pin-\u044b \u0442\u0430\u0439\u043c\u0435\u0440\u0430). \u041e\u0434\u043d\u0430\u043a\u043e. \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0435 \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430 \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043d\u0430 \u0442\u0430\u0439\u043c\u0435\u04401 (TIM1) - \u0447\u0438\u0442\u0430\u0439 datasheet, \u0442\u043e \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0435\u0441\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b \u044d\u0442\u043e\u0433\u043e \u0441\u0447\u0430\u0441\u0442\u044c\u044f \u043b\u0438\u0448\u0435\u043d\u044b \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432 \u0440\u0443\u0447\u043d\u0443\u044e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0438\u0445 \u043a Pin-\u0430\u043c \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0430, \u0438\u0431\u043e \u043a\u0430\u043d\u0430\u043b\u043e\u0432 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u0432\u0441\u0435\u0433\u043e 4, \u0430 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 - 8.  \u041b\u0435\u0437\u0435\u043c \u0432 datasheet \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u0442\u0430\u0439\u043c\u0435\u0440 (TIM3). \u0415\u0433\u043e \u043a\u0430\u043d\u0430\u043b\u044b: PC6, PC7, PC8, PC9. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u043a\u0430\u043d\u0430\u043b\u044b, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b \u0431\u0435\u0437 \u0442\u0430\u0439\u043c\u0435\u0440\u0430. \u0422\u0430\u043a\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0437 user manual. \u042d\u0442\u043e \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u044b: led4, led5, led6, led9.  \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0438\u0445 Pin-\u044b: PE8, PE10, PE12, PE15.  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u0451\u0442\u0441\u044f \u0434\u0435\u043b\u043e \u0437\u0430 \u043c\u0430\u043b\u044b\u043c: \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0435\u0434\u043d\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 Pin-\u044b \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 \u0441 Pin- \u0430\u043c\u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u0438 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b (\u0434\u043b\u044f TIM1 \u0438 TIM3):  PE8-PC6 PE10-PC7 PE12-PC8 PE15-PC9.  \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u043a\u0443\u0441\u043e\u043a \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 1. \u0442\u0430\u0439\u043c\u0435\u0440 3 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e.  &lt;source&gt;{ \t        GPIO_StructInit(&gpio2); \t\t gpio2.GPIO_Mode = GPIO_Mode_AF; \t\t gpio2.GPIO_Pin = GPIO_Pin_6 |  GPIO_Pin_7 |  GPIO_Pin_8 | GPIO_Pin_9; \t         gpio2.GPIO_Speed=GPIO_Speed_Level_1; \t         gpio2.GPIO_OType=GPIO_OType_PP; \t\t gpio2.GPIO_PuPd=GPIO_PuPd_NOPULL; \t\t RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOC,ENABLE); \t\t GPIO_Init(GPIOC,&gpio2); \t\t GPIO_PinAFConfig(GPIOC,GPIO_PinSource6,GPIO_AF_2);\/\/PC6-PE8(LD4) \t\t  GPIO_PinAFConfig(GPIOC,GPIO_PinSource7,GPIO_AF_2);\/\/PC7-PE10(LED5) \t\t  GPIO_PinAFConfig(GPIOC,GPIO_PinSource8,GPIO_AF_2);\/\/PC8-PE12(LED9) \t\t  GPIO_PinAFConfig(GPIOC,GPIO_PinSource9,GPIO_AF_2);\/\/PC9-PE15(LED6) \t\t    \/\/\u0442\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \t\t  RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3,ENABLE); \t    \/\/\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0442\u0438\u043c\u0435\u0440\u0430 \t    TIM_TimeBaseStructInit(&timer3); \t    timer3.TIM_Prescaler = 720; \t    timer3.TIM_Period = 100; \t    TIM_TimeBaseInit(TIM3, &timer3); \t \t    TIM_OCStructInit(&timer3_oc); \t    timer3_oc.TIM_OCMode=TIM_OCMode_PWM1; \t    timer3_oc.TIM_OutputState=TIM_OutputState_Enable; \t    TIM_OC1Init(TIM3, &timer3_oc);\/\/LED4 \t    TIM_OC2Init(TIM3, &timer3_oc);\/\/LED5 \t    TIM_OC3Init(TIM3, &timer3_oc);\/\/LED9 \t    TIM_OC4Init(TIM3, &timer3_oc);\/\/LED6 \t    TIM3-&gt;CCR1=10; \t    \/\/\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u043c\u043f\u0430\u0440\u0430\u0442\u043e\u0440\u0430. \t    TIM_SetCompare1(TIM3,0); \t    TIM_SetCompare2(TIM3,0); \t    TIM_SetCompare3(TIM3,0); \t    TIM_SetCompare4(TIM3,0);  \t    TIM_CCxCmd(TIM3,TIM_Channel_1,TIM_CCx_Enable);\/\/\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043a LED4 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0443 \t    TIM_CCxCmd(TIM3,TIM_Channel_2,TIM_CCx_Enable);\/\/\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043a LED5 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0443 \t    TIM_CCxCmd(TIM3,TIM_Channel_3,TIM_CCx_Enable);\/\/\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043a LED9 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0443 \t    TIM_CCxCmd(TIM3,TIM_Channel_4,TIM_CCx_Enable);\/\/\u043f\u0440\u0438\u0432\u044f\u0437\u043a\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0433\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043a LED8 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0443 \t    TIM_Cmd(TIM3,ENABLE); }&lt;source&gt;  \u041d\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u044d\u0442\u0430\u043f\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u043c\u043d\u043e\u0433\u043e - \u043d\u0435 \u043c\u0430\u043b\u043e 8 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u0434\u043b\u044f \u0437\u0430\u0436\u0438\u0433\u0430\u043d\u0438\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0443\u0433\u043b\u0430 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430.  \u0411\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u0434\u0432\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b: \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u0438 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u0438. \u0412 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0437 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u0443 HadingValue. \u0412\u043e \u0432\u0442\u043e\u0440\u043e\u043c, \u0438\u0437 \u043c\u0435\u043d\u044f\u044e\u0449\u0435\u0439\u0441\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b (HadingValue) \u0432\u044b\u0447\u0438\u0442\u0430\u0435\u043c \u043d\u0438\u0436\u043d\u044e\u044e \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u0443\u0433\u043b\u0430.  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043e\u0442 0 \u0434\u043e 45 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432. \u0434\u043b\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 - \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e.  void onLED(void) {  \t if(HeadingValue &lt; 0) \t     \t\t{ \t     \t\tHeadingValue=HeadingValue+360; \t     \t\t} \t     \t\tif ((fRollAng &lt;= 40.0f) && (fPitchAng &lt;= 40.0f))\/\/\u043d\u0430 LED10 \t     \t\t{ \t     \t\t    \t\t if (((HeadingValue &lt; 25.0f)&&(HeadingValue &gt;= 0.0f))||((HeadingValue &gt;=340.0f)&&(HeadingValue &lt;= 360.0f))) \t     \t\t    \t\t {  \t     \t\t    \t\t\t TIM_SetCompare1(TIM1,0); \t     \t\t    \t\t\t TIM_SetCompare2(TIM1,0); \t     \t\t    \t\t\t TIM_SetCompare3(TIM1,((int)(45.0f-HeadingValue))*2);\/\/LED10 \t     \t\t    \t\t\t TIM_SetCompare4(TIM1,((int)(HeadingValue-0))*2);\/\/led8 \t     \t\t    \t\t\t \/\/---------------------- \t     \t\t    \t\t\t TIM_SetCompare1(TIM3,0); \t     \t\t    \t\t\t TIM_SetCompare2(TIM3,0); \t     \t\t    \t\t\t TIM_SetCompare3(TIM3,0); \t     \t\t    \t\t\t TIM_SetCompare4(TIM3,0);  } \/*..... *\/ }   \u0427\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u043f\u0430\u0441 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044e (\u0440\u0430\u0437 \u0432 1 \u043c\u0441) \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0442\u0430\u0439\u043c\u0435\u0440\u043d\u043e\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0443\u0433\u043b\u0430 \u0438 \u0437\u0430\u0436\u0438\u0433\u0430\u043d\u0438\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u043e\u0432. \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u0441\u0447\u0430\u0441\u0442\u044c\u044f \u0435\u0449\u0451 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 TIM2.  &lt;source&gt;\/\/\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0430\u0439\u043c\u0435\u0440\u0430 void timer_init(void) { \tRCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE); \tTIM_TimeBaseStructInit(&timer); \ttimer.TIM_Prescaler=720; \ttimer.TIM_Period=100;\/\/\u0432\u044b\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b \tTIM_TimeBaseInit(TIM2,&timer); \tTIM_ITConfig(TIM2,TIM_IT_Update,ENABLE); \tTIM_Cmd(TIM2,ENABLE); \tNVIC_EnableIRQ(TIM2_IRQn); }  \/\/\u0442\u0430\u0439\u043c\u0435\u0440\u043d\u043e\u0435 \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0435 void TIM2_IRQHandler(void) { \t\tcalcangle(); \t\tonLED(); \t\tTIM_ClearFlag(TIM2, TIM_FLAG_Update); }&lt;source&gt;  \u041d\u0443 \u0438 \u043f\u043e\u0434 \u043a\u043e\u043d\u0435\u0446 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f main:  &lt;source&gt;uint16_t intensity=0; TIM_OCInitTypeDef timer_oc; RCC_ClocksTypeDef RCC_Clocks; TIM_TimeBaseInitTypeDef timer; TIM_TimeBaseInitTypeDef timer3; TIM_OCInitTypeDef timer3_oc; GPIO_InitTypeDef gpio; GPIO_InitTypeDef gpio2; float fNormAcc=0.0f; float HeadingValue=0.0f; float fSinRoll=0.0f,fCosRoll=0.0f; float fSinPitch=0.0f, fCosPitch=0.0f; float fRollAng=0.0f,fPitchAng=0.0f; float fTitledX=0.0f, fTitledY=0.0f; uint32_t TimingDelay = 0;  const float PI=3.14;  float MagBuffer[3]={0.0f}; float AccBuffer[3]={0.0f};   int main(void) {     \/\/\u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0442\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \tRCC_GetClocksFreq(&RCC_Clocks); \tSysTick_Config(RCC_Clocks.HCLK_Frequency \/ 100); \t\/\/\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0432\u0435\u0442\u043e\u0434\u043e\u0438\u043e\u0434\u043e\u0432 \ttimer3_init();\/\/\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f 1 \u0438 3 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \ttimer1_init(); \t\/\/\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u043e\u043c\u0435\u0442\u0440 \u0438 \u043c\u0430\u0433\u043d\u0435\u0442\u043e\u043c\u0435\u0442\u0440 \tDemo_CompassConfig(); \t\/\/calcangle(); \t\/\/onLED(); \t\/\/\u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \ttimer_init();      while(1)     {      } }&lt;source&gt;  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451!  \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442: https:\/\/yadi.sk\/d\/s7vAizVKh3jFx  Datasheet: https:\/\/yadi.sk\/i\/kmUrRQzeh3jJ9  User Manual: https:\/\/yadi.sk\/i\/IxbW4Gn-h3jKa<\/code><\/pre>\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:\/\/habrahabr.ru\/post\/259473\/\"> http:\/\/habrahabr.ru\/post\/259473\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>             \u0418\u0434\u0435\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043c\u043f\u0430\u0441\u0430 \u043d\u0430 stm32 \u0441 \u0428\u0418\u041c (\u0448\u0438\u0440\u043e\u043a\u043e\u0438\u043c\u043f\u0443\u043b\u044c\u0441\u043d\u0430\u044f \u043c\u043e\u0434\u0443\u043b\u044f\u0446\u0438\u044f) \u2014 \u0442\u0430\u043a\u0430\u044f \u0444\u0438\u0447\u0430, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c\u0438 \u0441\u0432\u0435\u0442\u043e\u0434\u0438\u043e\u0434\u0430\u043c\u0438 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0442\u0438 \u043e\u0442 \u0443\u0433\u043b\u0430 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0430 \u043a\u043e\u043c\u043f\u0430\u0441\u0430. \u041d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u043a\u043e\u0434\u0438\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0430\u0441 (\u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b \u043d\u0430 \u0441\u0435\u0432\u0435\u0440).<\/p>\n<p>  \u0412\u0441\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b\u0430\u0441\u044c \u0432 CooCox \u2014 \u0441\u0440\u0435\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0442 Eclipse (\u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0433\u043b\u044e\u0447\u043d\u0430\u044f). \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c STM32Cub MX \u2014 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0430, \u043d\u043e \u0441\u043b\u043e\u0436\u043d\u0430\u044f (\u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432 \u0442\u0430\u043a \u0438 \u043d\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0441\u044f). <\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0442\u0430\u043a\u0438\u043c \u043f\u043b\u044e\u0448\u043a\u0430\u043c\u0438, \u043a\u0430\u043a \u0430\u043a\u0441\u0435\u043b\u0435\u0440\u043e\u043c\u0435\u0442\u0440, \u043c\u0430\u0433\u043d\u0438\u0442\u043e\u043c\u0435\u0442\u0440 (\u0434\u0430 \u0432\u0441\u0451 \u044d\u0442\u043e \u0435\u0441\u0442\u044c \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u043c \u0447\u0438\u043f\u0435 \u043d\u0430 stm-\u043a\u0435) \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a (\u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0430\u0432\u0442\u043e\u0440\u0441\u043a\u0438\u0439 \u043a\u043e\u043b\u043b\u0435\u043a\u0442\u0438\u0432 \u043d\u0435 \u0445\u043e\u0442\u0435\u043b \u0440\u0443\u0447\u043a\u0430\u043c\u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043a\u043e\u0434\u0430).  <\/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-258602","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258602","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=258602"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/258602\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=258602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=258602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=258602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}