{"id":3143,"date":"2023-07-11T10:36:52","date_gmt":"2023-07-11T09:36:52","guid":{"rendered":"https:\/\/www.macerobotics.com\/?p=3143"},"modified":"2023-07-11T10:43:57","modified_gmt":"2023-07-11T09:43:57","slug":"controle-de-2-moteurs-avec-la-carte-mr-4","status":"publish","type":"post","link":"http:\/\/www.macerobotics.com\/?p=3143","title":{"rendered":"Contr\u00f4le de 2 moteurs avec la carte MR-4"},"content":{"rendered":"<p>Exemple d&#8217;application de contr\u00f4le de 2 moteurs \u00e0 courant continu avec la carte MR-4.<\/p>\n<p>Les 2 moteurs&nbsp; sont connect\u00e9s \u00e0 la carte MR-4, une alimentation alimente la carte avec une tension de 24 Volts.<\/p>\n<p><a href=\"http:\/\/www.macerobotics.com\/wp-content\/uploads\/2023\/07\/MR-4_moteurs.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3144 aligncenter\" src=\"http:\/\/www.macerobotics.com\/wp-content\/uploads\/2023\/07\/MR-4_moteurs.jpg\" alt=\"\" width=\"657\" height=\"342\" srcset=\"http:\/\/www.macerobotics.com\/wp-content\/uploads\/2023\/07\/MR-4_moteurs.jpg 790w, http:\/\/www.macerobotics.com\/wp-content\/uploads\/2023\/07\/MR-4_moteurs-300x156.jpg 300w, http:\/\/www.macerobotics.com\/wp-content\/uploads\/2023\/07\/MR-4_moteurs-768x400.jpg 768w, http:\/\/www.macerobotics.com\/wp-content\/uploads\/2023\/07\/MR-4_moteurs-600x312.jpg 600w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\" \/><\/a>Le programme en micropython :<\/p>\n<pre>import time\r\nimport motor\r\n\r\n# initialisation\r\nmotor1 = motor.Motor(11,10)\r\nmotor2 = motor.Motor(13,12)\r\n\r\n\r\n# contr\u00f4les des moteurs \r\nmotor1.control(1,30) #avec une vitesse de 30 %, direction 1\r\nmotor2.control(0,40) #avec une vitesse de 40 %, direction 0\r\n\r\n# end of file<\/pre>\n<p>La carte MR-4 est disponible en boutique :<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exemple d&#8217;application de contr\u00f4le de 2 moteurs \u00e0 courant continu avec la carte MR-4. Les 2 moteurs&nbsp; sont connect\u00e9s \u00e0 la carte MR-4, une alimentation alimente la carte avec une tension de 24 Volts. Le programme en micropython : import time import motor # initialisation motor1 = motor.Motor(11,10) motor2 = motor.Motor(13,12) # contr\u00f4les des moteurs &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[86,87],"tags":[],"class_list":["post-3143","post","type-post","status-publish","format-standard","hentry","category-mr-4","category-raspberry-pico"],"_links":{"self":[{"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/3143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3143"}],"version-history":[{"count":2,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/3143\/revisions"}],"predecessor-version":[{"id":3146,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/3143\/revisions\/3146"}],"wp:attachment":[{"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3143"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}