{"id":231,"date":"2021-02-09T18:03:38","date_gmt":"2021-02-09T09:03:38","guid":{"rendered":"https:\/\/sakae-shokai.com\/?p=231"},"modified":"2021-02-09T18:10:01","modified_gmt":"2021-02-09T09:10:01","slug":"ampy-esp32%e3%81%a8%e3%81%ae%e9%80%9a%e4%bf%a1%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/sakae-shokai.com\/wordpress\/?p=231","title":{"rendered":"AMPY&#8211;ESP32\u3068\u306e\u901a\u4fe1\u65b9\u6cd5"},"content":{"rendered":"\n<p>ESP32\u3092MicroPython\u3067\u4f7f\u7528\u3059\u308b\u969b\u306b\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3001\u524a\u9664\u306a\u3069\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u304f\u308b\u3002<\/p>\n\n\n\n<p>AMPY\u306f\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\uff08Windows\u3067\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\uff09\u306b\u3066\u5bfe\u8a71\u7684\u306b\u884c\u3048\u308b\u3002<\/p>\n\n\n\n<p>\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067ampy\u3068\u5165\u529b\u3059\u308b\u3068\u4e0b\u306e\u3088\u3046\u306a\u8aac\u660e\u304c\u51fa\u3066\u304f\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\Users\\&gt;ampy\nUsage: ampy-script.py &#91;OPTIONS] COMMAND &#91;ARGS]...\n\n  ampy - Adafruit MicroPython Tool\n\n  Ampy is a tool to control MicroPython boards over a serial connection.\n  Using ampy you can manipulate files on the board's internal filesystem and\n  even run scripts.\n\nOptions:\n  -p, --port PORT    Name of serial port for connected board.  Can optionally\n                     specify with AMPY_PORT environemnt variable.  &#91;required]\n  -b, --baud BAUD    Baud rate for the serial connection (default 115200).\n                     Can optionally specify with AMPY_BAUD environment\n                     variable.\n  -d, --delay DELAY  Delay in seconds before entering RAW MODE (default 0).\n                     Can optionally specify with AMPY_DELAY environment\n                     variable.\n  --version          Show the version and exit.\n  --help             Show this message and exit.\n\nCommands:\n  get    Retrieve a file from the board.\n  ls     List contents of a directory on the board.\n  mkdir  Create a directory on the board.\n  put    Put a file or folder and its contents on the...\n  reset  Perform soft reset\/reboot of the board.\n  rm     Remove a file from the board.\n  rmdir  Forcefully remove a folder and all its...\n  run    Run a script and print its output.<\/code><\/pre>\n\n\n\n<p>\u5f53\u65b9\u306e\uff30\uff23\u74b0\u5883\u3067\u306fUSB\u304cCOM3\u30dd\u30fc\u30c8\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u6b21\u306e\u3088\u3046\u306a\u4f7f\u3044\u65b9\u3068\u306a\u308b\u3002<\/p>\n\n\n\n<p>ESP32\u5185\u306e\u30d5\u30a1\u30a4\u30eb\u8868\u793a\u3059\u308b\u5834\u5408\u306f\u3000-p\u3000com3(com\u30dd\u30fc\u30c8\u756a\u53f7\uff09\u3000ls\uff08\u30d5\u30a1\u30a4\u30eb\u8868\u793a\uff09\u3092\u5165\u529b\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\Users\\&gt;ampy -p com3 ls\nboot.py\ntest.py\nmain.py\nssd1306.py\nhcsr04.py\ntemp.py\ndisplay.py\ntest3.py\ntest4.py\ndistance.py\ntest_ave.py\ntest5.py<\/code><\/pre>\n\n\n\n<p>ESP32\u4e0a\u306e\u30d5\u30a1\u30a4\u30eb\u3092PC\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u5834\u5408\u306fget\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3002c:\u4ee5\u4e0b\u306f\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3068\u30d5\u30a1\u30a4\u30eb\u540d<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\Users\\&gt;ampy -p com3 get main.py c:\\micropython\\new\\main1.py<\/code><\/pre>\n\n\n\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u306b\u306fput\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\Users\\&gt;ampy -p com3 put c:\\micropython\\new\\main1.py\nC:\\Users\\&gt;ampy -p com3 ls\nboot.py\ntest.py\nmain.py\nssd1306.py\nhcsr04.py\ntemp.py\ndisplay.py\ntest3.py\ntest4.py\ndistance.py\ntest_ave.py\ntest5.py\nmain1.py<\/code><\/pre>\n\n\n\n<p>\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664\u3059\u308b\u5834\u5408\u306f\u3001rm\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>C:\\Users\\&gt;ampy -p com3 rm main1.py\n\nC:\\Users\\&gt;ampy -p com3 ls\nboot.py\ntest.py\nmain.py\nssd1306.py\nhcsr04.py\ntemp.py\ndisplay.py\ntest3.py\ntest4.py\ndistance.py\ntest_ave.py\ntest5.py<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ESP32\u3092MicroPython\u3067\u4f7f\u7528\u3059\u308b\u969b\u306b\u306f\u3001\u30d5\u30a1\u30a4\u30eb\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3001\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3001\u524a\u9664\u306a\u3069\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u304f\u308b\u3002 AMPY\u306f\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\uff08Windows\u3067\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\uff09\u306b\u3066\u5bfe\u8a71\u7684\u306b\u884c\u3048\u308b\u3002 \u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/sakae-shokai.com\/wordpress\/?p=231\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;AMPY&#8211;ESP32\u3068\u306e\u901a\u4fe1\u65b9\u6cd5&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":234,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,15,8],"tags":[],"class_list":["post-231","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-micropython","category-15","category-archive"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/sakae-shokai.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sakae-shokai.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sakae-shokai.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sakae-shokai.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sakae-shokai.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=231"}],"version-history":[{"count":2,"href":"https:\/\/sakae-shokai.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/231\/revisions"}],"predecessor-version":[{"id":233,"href":"https:\/\/sakae-shokai.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/231\/revisions\/233"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sakae-shokai.com\/wordpress\/index.php?rest_route=\/wp\/v2\/media\/234"}],"wp:attachment":[{"href":"https:\/\/sakae-shokai.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sakae-shokai.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sakae-shokai.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}