{"id":3233,"date":"2024-01-18T17:26:04","date_gmt":"2024-01-18T16:26:04","guid":{"rendered":"https:\/\/www.macerobotics.com\/?p=3233"},"modified":"2024-01-18T17:26:04","modified_gmt":"2024-01-18T16:26:04","slug":"controle-de-votre-raspberry-pi-pico-avec-un-terminal-serie","status":"publish","type":"post","link":"https:\/\/www.macerobotics.com\/?p=3233","title":{"rendered":"Contr\u00f4le de votre Raspberry Pi Pico avec un terminal serie"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>Un exemple de programme pour envoyer des commandes \u00e0 la carte Raspberry Pi Pico a partir de votre PC en utlisant la liaison micro-usb&nbsp; :<\/p>\n<pre>import select\r\nimport sys\r\nimport time\r\nimport machine\r\n\r\npoll_obj = select.poll()\r\n\r\npoll_obj.register(sys.stdin,1)\r\n\r\nwhile True:\r\n  # Si data de disponible\r\n  if poll_obj.poll(0):\r\n    # Lecture des donn\u00e9es\r\n    data_reception = sys.stdin.read(1)\r\n\r\n    if data_reception=='a':\r\n      print (\"Reception de la lettre a\" )\r\n\r\n    if data_reception=='b':\r\n      print (\"Reception de la lettre b\" )\r\n\r\ntime.sleep(0.1)<\/pre>\n<p>Exemple avec putty :<\/p>\n<p><a href=\"http:\/\/www.macerobotics.com\/wp-content\/uploads\/2024\/01\/Capture-decran-2024-01-18-172427.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3234\" src=\"http:\/\/www.macerobotics.com\/wp-content\/uploads\/2024\/01\/Capture-decran-2024-01-18-172427.png\" alt=\"\" width=\"822\" height=\"520\" srcset=\"https:\/\/www.macerobotics.com\/wp-content\/uploads\/2024\/01\/Capture-decran-2024-01-18-172427.png 822w, https:\/\/www.macerobotics.com\/wp-content\/uploads\/2024\/01\/Capture-decran-2024-01-18-172427-300x190.png 300w, https:\/\/www.macerobotics.com\/wp-content\/uploads\/2024\/01\/Capture-decran-2024-01-18-172427-768x486.png 768w, https:\/\/www.macerobotics.com\/wp-content\/uploads\/2024\/01\/Capture-decran-2024-01-18-172427-600x380.png 600w\" sizes=\"auto, (max-width: 822px) 100vw, 822px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Un exemple de programme pour envoyer des commandes \u00e0 la carte Raspberry Pi Pico a partir de votre PC en utlisant la liaison micro-usb&nbsp; : import select import sys import time import machine poll_obj = select.poll() poll_obj.register(sys.stdin,1) while True: # Si data de disponible if poll_obj.poll(0): # Lecture des donn\u00e9es data_reception = sys.stdin.read(1) if &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[88,87],"tags":[],"class_list":["post-3233","post","type-post","status-publish","format-standard","hentry","category-micropython","category-raspberry-pico"],"_links":{"self":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/3233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3233"}],"version-history":[{"count":1,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/3233\/revisions"}],"predecessor-version":[{"id":3235,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=\/wp\/v2\/posts\/3233\/revisions\/3235"}],"wp:attachment":[{"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.macerobotics.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}